/* ==========================================================================
   AN VI METALS - MINIMAL MICROSOFT 365 CALCULATOR
   Extremely Clean, Minimal Text, Corporate Light Theme
   ========================================================================== */

:root {
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --ms-blue: #0078D4;
  --promo-red: #d9383a;
  
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  
  --text-dark: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Nav */
.top-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
}

.nav-container {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-company {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.01em;
}

.nav-actions {
  display: flex;
  gap: 0.5rem;
}

.btn {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-outline {
  background: #ffffff;
  border-color: var(--border-color);
  color: var(--text-dark);
}
.btn-outline:hover { background: var(--bg-subtle); }

.btn-secondary {
  background: var(--bg-subtle);
  border-color: var(--border-color);
  color: var(--text-dark);
}
.btn-secondary:hover { background: #e2e8f0; }

/* Main Container */
.page-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  flex: 1;
  width: 100%;
}

/* Hai Card Gói Cước */
.pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.plan-name {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
  line-height: 1.25;
}

.plan-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.price-box {
  padding: 1rem 0;
  border-top: 1px dashed var(--border-color);
  border-bottom: 1px dashed var(--border-color);
  margin-bottom: 1.25rem;
}

.price-strikethrough {
  font-size: 0.85rem;
  color: var(--text-light);
  text-decoration: line-through;
  margin-bottom: 0.15rem;
}

.price-main {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--promo-red);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

.price-main .unit {
  font-size: 0.85rem;
  font-weight: 700;
}

.renewal-tag {
  font-size: 0.82rem;
  color: var(--text-body);
  background: var(--bg-subtle);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  display: inline-block;
}

/* Features */
.features-list {
  flex: 1;
}

.feature-headline {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.6rem;
}

.app-icons-row {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.app-icon {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  color: #ffffff;
}

.icon-w { background-color: #185ABD; }
.icon-x { background-color: #107C41; }
.icon-o { background-color: #0078D4; }
.icon-p { background-color: #C43E1C; }
.icon-t { background-color: #4B53BC; }
.icon-od { background-color: #0078D4; }
.icon-ex { background-color: #0072C6; }

.feature-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-body);
}

.feature-bullets li::before {
  content: "✔";
  color: #107C41;
  font-weight: bold;
  margin-right: 0.5rem;
}

/* Inputs Section */
.section-inputs {
  margin-bottom: 2rem;
}

.input-panels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.input-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.panel-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.badge-pkg {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.25rem;
}

.badge-pkg.pkg-standard {
  color: #d97706;
  background: #fef3c7;
}

.panel-heading h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-dark);
}

.counter-badge {
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  background: var(--bg-subtle);
  border-radius: 9999px;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

.counter-badge.highlight {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--ms-blue);
}

.clean-textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  font-family: inherit;
  font-size: 0.88rem;
  resize: vertical;
  outline: none;
  margin-bottom: 0.75rem;
}

.clean-textarea:focus {
  border-color: var(--ms-blue);
}

.panel-stepper-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.stepper-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.stepper-wrap {
  display: inline-flex;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}

.btn-step {
  border: none;
  background: var(--bg-subtle);
  width: 28px;
  height: 28px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}
.btn-step:hover { background: #e2e8f0; }

.num-input {
  width: 44px;
  height: 28px;
  border: none;
  text-align: center;
  font-weight: 800;
  font-size: 0.88rem;
  outline: none;
}

.num-input::-webkit-outer-spin-button,
.num-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.btn-clear {
  border: none;
  background: none;
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: auto;
  text-decoration: underline;
}

/* Cycle Bar */
.cycle-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.65rem 1.25rem;
}

.cycle-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
}

.cycle-btns {
  display: flex;
  gap: 0.4rem;
}

.btn-cycle {
  border: 1px solid var(--border-color);
  background: #ffffff;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
}

.btn-cycle.active {
  background: var(--ms-blue);
  color: #ffffff;
  border-color: var(--ms-blue);
}

/* Price Table Section */
.section-price-table {
  margin-bottom: 2rem;
}

.price-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.simple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.simple-table th {
  background: var(--bg-subtle);
  padding: 0.85rem 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.82rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-color);
}

.simple-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.simple-table .text-center { text-align: center; }
.simple-table .text-right { text-align: right; }
.simple-table .font-bold { font-weight: 800; }
.simple-table .text-muted { color: var(--text-muted); }
.simple-table .text-orange { color: #d97706; }

.sub-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.row-calc td {
  background: #fafbfd;
  font-size: 0.92rem;
}

.row-fee td {
  background: #fffbeb;
}

.row-final td {
  background: #f0fdf4;
  padding: 1.25rem;
}

.final-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
}

.final-number {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.final-number.text-red { color: var(--promo-red); }
.final-number.text-dark { color: var(--text-dark); }

.final-note {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.2rem;
}

/* Send Action Box */
.send-action-box {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 1.25rem;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
}

.btn-send-main {
  background: var(--ms-blue);
  color: #ffffff;
  border: none;
  padding: 0.85rem 4rem;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 120, 212, 0.3);
}

.btn-send-main:hover {
  background: #0063b1;
  box-shadow: 0 6px 20px rgba(0, 120, 212, 0.4);
  transform: translateY(-1px);
}

.btn-send-main:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Roster Box */
.roster-box {
  padding: 1.25rem;
  background: #fafbfd;
  border-top: 1px solid var(--border-color);
}

.roster-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.roster-col h4 {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.mini-list {
  list-style: none;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-height: 160px;
  overflow-y: auto;
}

.mini-list li {
  padding: 0.3rem 0.5rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.mini-list li.empty {
  border: none;
  background: transparent;
  color: var(--text-light);
  font-style: italic;
  padding: 0.2rem 0;
}

/* Footer */
.clean-footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light);
  padding: 1.5rem;
  margin-top: auto;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #1e293b;
  color: #ffffff;
  padding: 0.65rem 1.15rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  transform: translateY(60px);
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 999;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Print */
@media print {
  .top-nav, .cycle-bar, .panel-stepper-row, .clean-footer, .toast {
    display: none !important;
  }
  .page-container { padding: 0; }
  .price-table-card { border: none; box-shadow: none; }
}

/* Responsive */
@media (max-width: 768px) {
  .pricing-cards-grid,
  .input-panels-grid,
  .roster-cols {
    grid-template-columns: 1fr;
  }
}
