:root{
  --am-primary:#173b67;
  --am-primary-2:#245a96;
  --am-accent:#0ea5e9;
  --am-surface:#ffffff;
  --am-soft:#f8fbff;
  --am-soft-2:#eef6ff;
  --am-text:#0f172a;
  --am-muted:#475569;
  --am-border:#dbe7f3;
  --am-shadow:0 18px 50px rgba(15, 23, 42, 0.08);
  --am-radius:20px;
}

.am-tools-index,
.am-tool-card,
.am-tool-index-card{
  box-sizing:border-box;
}

.am-index-hero{
  background:linear-gradient(135deg,var(--am-primary) 0%, var(--am-primary-2) 100%);
  color:#fff;
  border-radius:24px;
  padding:28px;
  margin-bottom:20px;
  box-shadow:var(--am-shadow);
}

.am-index-hero h2{
  margin:0 0 8px;
  color:#fff;
}

.am-index-hero p{
  margin:0;
  color:rgba(255,255,255,.9);
}

.am-tool-card{
  background:linear-gradient(180deg,#ffffff 0%, var(--am-soft) 100%);
  border:1px solid var(--am-border);
  border-radius:24px;
  padding:24px;
  box-shadow:var(--am-shadow);
  margin:22px 0;
  position:relative;
  overflow:hidden;
}

.am-tool-card:before{
  content:"";
  position:absolute;
  inset:0 auto auto 0;
  width:100%;
  height:6px;
  background:linear-gradient(90deg,var(--am-accent),var(--am-primary));
}

/* ===== PROFESSIONAL TOOL HEADER ===== */
.am-tool-card-pro{
  padding:0;
  overflow:hidden;
  background:#ffffff;
  border:1px solid #d7e3ef;
  border-radius:24px;
  box-shadow:0 18px 50px rgba(15, 23, 42, 0.08);
}

.am-tool-card-pro::before{
  display:none !important;
}

.am-tool-head{
  background:linear-gradient(135deg,#183b66 0%, #274d7d 100%);
  padding:24px 24px 18px;
  border-bottom:1px solid rgba(255,255,255,0.08);
  margin-bottom:0;
}

.am-tool-head h3,
.am-tool-card h3,
.am-tool-index-card h3{
  margin:0 0 10px;
  color:var(--am-text);
  font-size:28px;
  line-height:1.2;
}

.am-tool-head h3{
  color:#ffffff !important;
  font-size:30px;
  margin:0 0 8px;
}

.am-tool-subtitle{
  margin:0;
  color:rgba(255,255,255,0.88) !important;
  font-size:14px;
  line-height:1.7;
}

/* content area after header */
.am-tool-card-pro .am-grid,
.am-tool-card-pro .am-actions,
.am-tool-card-pro .am-result,
.am-tool-card-pro .am-info-blocks{
  margin-left:24px;
  margin-right:24px;
}

.am-tool-card-pro .am-grid{
  margin-top:22px;
}

.am-grid{
  display:grid;
  gap:16px;
}

.am-grid.two{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.am-tool-card label{
  display:block;
  margin-bottom:8px;
  font-size:14px;
  font-weight:700;
  color:#0f172a;
}

/* ===== INPUTS MORE PROFESSIONAL ===== */
.am-input,
.am-tool-card select,
.am-tool-card input[type="text"],
.am-tool-card input[type="number"],
.am-tool-card input[type="date"],
.am-tool-card input[type="time"]{
  width:100%;
  min-height:52px;
  height:52px;
  padding:0 16px;
  border:1px solid #c9d9ea;
  border-radius:14px;
  background:#ffffff;
  color:#0f172a;
  font-size:15px;
  line-height:1.2;
  box-sizing:border-box;
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
}

.am-input:focus,
.am-tool-card select:focus,
.am-tool-card input:focus{
  outline:none;
  border-color:#2f80ed;
  box-shadow:0 0 0 4px rgba(47, 128, 237, 0.12);
}

/* ===== FIX SELECT / DROPDOWN ISSUE ===== */
.am-tool-card select.am-input,
.am-tool-card select{
  padding-right:44px;
  background-image:
    linear-gradient(45deg, transparent 50%, #4b5f77 50%),
    linear-gradient(135deg, #4b5f77 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 22px,
    calc(100% - 12px) 22px;
  background-size:6px 6px, 6px 6px;
  background-repeat:no-repeat;
  text-overflow:ellipsis;
  white-space:nowrap;
  overflow:hidden;
}

.am-tool-card select::-ms-expand{
  display:none;
}

.am-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:18px;
}

.am-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:12px 20px;
  border-radius:14px;
  border:0;
  background:linear-gradient(135deg,var(--am-primary),var(--am-primary-2));
  color:#fff !important;
  text-decoration:none;
  cursor:pointer;
  font-weight:800;
  letter-spacing:.1px;
  box-shadow:0 10px 24px rgba(23,59,103,.18);
}

.am-btn:hover{
  transform:translateY(-1px);
  opacity:.98;
}

.am-btn-light{
  background:#dbe7f3;
  color:#12304f !important;
  box-shadow:none;
}

.am-btn-secondary{
  background:#586f8d;
}

.am-result{
  margin-top:20px;
  background:#ffffff;
  border:1px solid #dbe7f3;
  border-radius:18px;
  padding:18px;
}

.am-placeholder{
  color:#64748b;
  line-height:1.8;
}

.am-error{
  color:#b91c1c;
  font-weight:700;
}

.am-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}

.am-summary-card{
  background:linear-gradient(180deg,#fff 0%, #f9fcff 100%);
  border:1px solid var(--am-border);
  border-radius:18px;
  padding:18px;
}

.am-summary-label{
  display:block;
  color:#64748b;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.4px;
  font-weight:800;
}

.am-summary-card strong{
  display:block;
  margin-top:8px;
  color:var(--am-text);
  font-size:22px;
  line-height:1.3;
}

.am-summary-card-highlight{
  background:linear-gradient(135deg,var(--am-primary),var(--am-primary-2));
  border-color:transparent;
}

.am-summary-card-highlight .am-summary-label,
.am-summary-card-highlight strong{
  color:#fff;
}

.am-result-explainer{
  background:#eff8ff;
  border:1px solid #bae6fd;
  color:#0c4a6e;
  border-radius:14px;
  padding:14px 16px;
  line-height:1.8;
  margin-bottom:14px;
}

.am-result-note{
  background:#f8fafc;
  border-left:4px solid var(--am-primary);
  color:#334155;
  border-radius:10px;
  padding:12px 14px;
  line-height:1.8;
  margin-bottom:16px;
}

.am-section-title{
  margin:18px 0 12px;
  color:var(--am-primary);
  font-size:18px;
}

.am-table-wrap{
  overflow-x:auto;
}

.am-table{
  width:100%;
  border-collapse:collapse;
  border:1px solid var(--am-border);
  border-radius:16px;
  overflow:hidden;
  background:#fff;
}

.am-table th,
.am-table td{
  text-align:left;
  padding:12px 14px;
  font-size:14px;
  border-bottom:1px solid #e5edf6;
}

.am-table th{
  background:linear-gradient(135deg,var(--am-primary),var(--am-primary-2));
  color:#fff;
}

.am-table tr:nth-child(even) td{
  background:#f8fbff;
}

.am-info-blocks{
  margin-top:18px;
  margin-bottom:24px;
  display:grid;
  gap:14px;
}

.am-info-block{
  background:#ffffff;
  border:1px solid #dbe7f3;
  border-radius:18px;
  padding:18px;
}

.am-info-block h4{
  margin:0 0 10px;
  color:#183b66;
}

.am-info-block p,
.am-info-block li{
  color:#334155;
  line-height:1.8;
}

.am-note-block{
  background:#fffdf7;
  border-color:#ecd8aa;
}

.am-tools-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:18px;
}

.am-tool-index-card{
  background:#fff;
  border:1px solid var(--am-border);
  border-radius:20px;
  padding:20px;
  box-shadow:0 10px 26px rgba(15,23,42,.05);
}

.am-tool-index-card p{
  color:var(--am-muted);
  line-height:1.7;
}

.am-shortcode-hint{
  margin-top:12px;
  font-size:13px;
  color:#64748b;
}

@media (max-width:991px){
  .am-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:767px){
  .am-grid.two,
  .am-summary-grid{
    grid-template-columns:1fr;
  }

  .am-tool-head{
    padding:20px 18px 16px;
  }

  .am-tool-head h3{
    font-size:24px;
  }

  .am-tool-card-pro .am-grid,
  .am-tool-card-pro .am-actions,
  .am-tool-card-pro .am-result,
  .am-tool-card-pro .am-info-blocks{
    margin-left:18px;
    margin-right:18px;
  }

  .am-actions{
    flex-direction:column;
  }

  .am-btn{
    width:100%;
  }

  .am-tool-card select.am-input,
  .am-tool-card select{
    background-position:
      calc(100% - 16px) 22px,
      calc(100% - 10px) 22px;
  }
}

@media print{
  body *{
    visibility:hidden !important;
  }

  .am-print-target,
  .am-print-target *{
    visibility:visible !important;
  }

  .am-print-target{
    position:absolute !important;
    left:0 !important;
    top:0 !important;
    width:100% !important;
    margin:0 !important;
    box-shadow:none !important;
    border:0 !important;
    background:#fff !important;
  }

  .am-print-target:before{
    display:none !important;
  }

  .am-print-target .am-actions{
    display:none !important;
  }
}