/* =============================================
   GOMAX DIGITAL — INTERNAL PROPOSAL SYSTEM
   Design System v2.0
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&display=swap');

/* ---- CSS VARIABLES ---- */
:root {
  --primary: #FF3020;
  --primary-dark: #CC1800;
  --primary-light: #FF6040;
  --accent: #FFAA20;
  --grad: linear-gradient(135deg, #CC1800 0%, #FF3020 40%, #FF6040 75%, #FFAA20 100%);
  --grad-h: linear-gradient(135deg, #FF3020 0%, #FF6040 60%, #FFAA20 100%);
  --bg: #F8F7F6;
  --bg-dark: #14110E;
  --white: #ffffff;
  --text: #14110E;
  --text-muted: #6B6560;
  --text-light: #9E9890;
  --border: #E8E4E0;
  --shadow-sm: 0 2px 8px rgba(204,24,0,.06);
  --shadow: 0 8px 32px rgba(204,24,0,.1);
  --shadow-lg: 0 20px 60px rgba(204,24,0,.15);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --transition: cubic-bezier(0.4,0,0.2,1) 0.3s;
}

/* ---- RESET ---- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.6;
}

/* =============================================
   LOGIN PAGE
   ============================================= */
body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

body.login-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,48,32,.25) 0%, transparent 70%);
  top: -100px; left: -100px;
  animation: pulse 4s ease-in-out infinite;
}

body.login-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,170,32,.15) 0%, transparent 70%);
  bottom: -80px; right: -80px;
  animation: pulse 5s ease-in-out infinite reverse;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: .8; }
  50% { transform: scale(1.1); opacity: 1; }
}

.login-box {
  position: relative;
  z-index: 10;
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  width: 420px;
  text-align: center;
  animation: slideUp .6s var(--transition) both;
}

@keyframes slideUp {
  from { opacity:0; transform: translateY(30px); }
  to { opacity:1; transform: translateY(0); }
}

.login-logo {
  width: 64px; height: 64px;
  background: var(--grad);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; color: white;
  margin: 0 auto 24px;
  box-shadow: 0 12px 32px rgba(204,24,0,.4);
}

.login-box h1 {
  font-size: 22px; font-weight: 900;
  color: white;
  letter-spacing: -.02em;
  margin-bottom: 8px;
}

.login-box p {
  color: rgba(255,255,255,.5);
  font-size: 14px;
  margin-bottom: 36px;
}

.login-input-wrap {
  position: relative;
  margin-bottom: 16px;
}

.login-input-wrap input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  color: white;
  font-family: inherit;
  font-size: 15px;
  transition: var(--transition);
  outline: none;
}

.login-input-wrap input::placeholder { color: rgba(255,255,255,.3); }
.login-input-wrap input:focus {
  border-color: var(--primary);
  background: rgba(255,255,255,.12);
  box-shadow: 0 0 0 3px rgba(255,48,32,.2);
}

.btn-login {
  width: 100%;
  padding: 14px;
  background: var(--grad);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
  position: relative;
  overflow: hidden;
}

.btn-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: var(--transition);
}

.btn-login:hover::before { opacity: .08; }
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(204,24,0,.4); }
.btn-login:active { transform: translateY(0); }

.login-error {
  margin-top: 14px;
  color: #ff8070;
  font-size: 13px;
  min-height: 20px;
}

/* =============================================
   DASHBOARD LAYOUT
   ============================================= */
body.dashboard-page {
  background: var(--bg);
  padding-top: 80px;
}

/* ---- HEADER ---- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 72px;
  background: white;
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 40px; height: 40px;
  background: var(--grad);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900; color: white;
  box-shadow: 0 4px 12px rgba(204,24,0,.3);
}

.logo-text { font-size: 16px; font-weight: 900; color: var(--text); letter-spacing: -.02em; }
.logo-text span { color: var(--primary); }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover { color: var(--primary); background: rgba(255,48,32,.06); }
.nav-link.active { color: var(--primary); background: rgba(255,48,32,.08); }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.badge-internal {
  font-size: 11px; font-weight: 700;
  color: var(--primary);
  background: rgba(255,48,32,.08);
  border: 1px solid rgba(255,48,32,.2);
  padding: 4px 10px;
  border-radius: 99px;
  letter-spacing: .04em;
}

.btn-logout {
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.btn-logout:hover { border-color: var(--primary); color: var(--primary); }

/* =============================================
   PAGE WRAPPER
   ============================================= */
.page {
  display: none;
  animation: fadeIn .4s var(--transition) both;
}

.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 64px 0;
}

/* =============================================
   COMMON COMPONENTS
   ============================================= */

/* ---- CARDS ---- */
.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.card-sm {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

/* ---- SECTION LABELS ---- */
.section-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.03em;
  color: var(--text);
  margin-bottom: 8px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 15px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad);
  color: white;
  box-shadow: 0 4px 16px rgba(204,24,0,.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(204,24,0,.4);
}

.btn-secondary {
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.btn-ghost {
  background: rgba(255,48,32,.07);
  color: var(--primary);
}

.btn-ghost:hover { background: rgba(255,48,32,.14); }

/* ---- INPUTS ---- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .03em;
}

input, select, textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: white;
  transition: var(--transition);
  outline: none;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,48,32,.1);
}

input::placeholder, textarea::placeholder { color: var(--text-light); }

textarea { resize: vertical; min-height: 100px; }

/* ---- GRID ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.full { grid-column: 1 / -1; }

/* ---- DIVIDER ---- */
.divider { height: 1px; background: var(--border); margin: 24px 0; }

/* ---- TAG / BADGE ---- */
.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}

.tag-red { background: rgba(255,48,32,.1); color: var(--primary); }
.tag-green { background: rgba(22,163,74,.1); color: #16a34a; }
.tag-blue { background: rgba(59,130,246,.1); color: #3b82f6; }
.tag-orange { background: rgba(255,170,32,.15); color: #b45309; }

/* =============================================
   PROPOSAL PAGE — BẢNG GIÁ
   ============================================= */

/* ---- COMPANY HEADER CARD ---- */
.company-hero {
  background: var(--bg-dark);
  border-radius: var(--radius-xl);
  padding: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.company-hero::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,48,32,.2) 0%, transparent 70%);
  top: -100px; right: -100px;
  pointer-events: none;
}

/* company-hero-left — intentionally unstyled, flex child */

.company-name {
  font-size: 36px;
  font-weight: 900;
  color: white;
  letter-spacing: -.04em;
  margin-bottom: 4px;
}

.company-name span { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }

.company-tagline { color: rgba(255,255,255,.5); font-size: 14px; margin-bottom: 24px; }

.company-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.company-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.7);
  font-size: 13px;
}

.company-info-item .ic {
  width: 28px; height: 28px;
  background: rgba(255,255,255,.08);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.company-hero-right { text-align: right; position: relative; z-index: 1; }

.company-logo-big {
  width: 120px; height: 120px;
  background: var(--grad);
  border-radius: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; font-weight: 900; color: white;
  box-shadow: 0 20px 50px rgba(204,24,0,.4);
  margin-left: auto;
  margin-bottom: 16px;
}

.proposal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ---- FORM SECTIONS ---- */
.form-section {
  margin-bottom: 24px;
}

.form-section:last-child { margin-bottom: 0; }

/* ---- SERVICE GROUPS ---- */
.service-group {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  transition: var(--transition);
}

.service-group.expanded { border-color: var(--primary); box-shadow: 0 4px 20px rgba(255,48,32,.1); }

.service-group-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  background: white;
  transition: var(--transition);
  user-select: none;
}

.service-group-header:hover { background: #faf8f7; }

.service-checkbox {
  width: 22px; height: 22px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.service-group-title { font-size: 16px; font-weight: 700; flex: 1; }
.service-group-price { font-weight: 800; color: var(--primary); font-size: 15px; }

.service-group-body {
  display: none;
  padding: 0 24px 24px;
  background: white;
  border-top: 1px solid var(--border);
}

.service-group.expanded .service-group-body { display: block; }

.service-detail-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
  margin: 20px 0 16px;
}

.service-features {
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.service-features ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.service-features li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 10px;
  background: white;
  border-radius: 99px;
  border: 1px solid var(--border);
}

.service-features li::before { content: '✓ '; color: #16a34a; font-weight: 700; }

/* ---- SUMMARY BOX ---- */
.summary-table { width: 100%; }

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.summary-row:last-child { border-bottom: none; }
.summary-row .label { color: var(--text-muted); }
.summary-row .value { font-weight: 600; }

.summary-total {
  background: var(--grad);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

.summary-total .label { font-size: 14px; opacity: .85; }
.summary-total .value { font-size: 24px; font-weight: 900; letter-spacing: -.02em; }

/* ---- DISCOUNT ---- */
.discount-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

/* ---- PAYMENT TERMS ---- */
.payment-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.payment-card-header {
  background: var(--grad);
  color: white;
  padding: 18px 24px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .04em;
}

.payment-card-body {
  background: white;
  padding: 24px;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.payment-row:last-child { border-bottom: none; }

.payment-total-box {
  background: var(--bg-dark);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 16px;
  text-align: center;
  color: white;
}

.payment-total-label { font-size: 13px; opacity: .6; margin-bottom: 8px; }
.payment-total-amount { font-size: 36px; font-weight: 900; letter-spacing: -.04em; }
.payment-total-amount span { font-size: 16px; opacity: .7; }

/* ---- SIGNATURE ---- */
.sign-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.sign-box {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
}

.sign-title { font-weight: 700; margin-bottom: 4px; font-size: 14px; }
.sign-name { color: var(--text-muted); font-size: 13px; margin-bottom: 60px; }
.sign-line { border-top: 1.5px solid var(--text-light); padding-top: 8px; font-size: 13px; color: var(--text-muted); }

/* =============================================
   PLAN PAGE
   ============================================= */
.hero-plan {
  background: var(--bg-dark);
  border-radius: var(--radius-xl);
  padding: 72px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 64px;
}

.hero-plan::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,48,32,.25) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(255,170,32,.15) 0%, transparent 60%);
}

.hero-plan-content { position: relative; z-index: 1; }

.hero-plan h1 {
  font-size: 56px;
  font-weight: 900;
  color: white;
  letter-spacing: -.05em;
  line-height: 1.05;
  margin-bottom: 16px;
}

.hero-plan h1 span { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.hero-plan p {
  color: rgba(255,255,255,.6);
  font-size: 18px;
  max-width: 560px;
  margin: 0 auto;
}

/* ---- PLAN TABS ---- */
.plan-tabs {
  display: flex;
  gap: 8px;
  background: white;
  padding: 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: fit-content;
  margin-bottom: 40px;
}

.plan-tab {
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  border: none;
  background: none;
  font-family: inherit;
}

.plan-tab.active { background: var(--grad); color: white; box-shadow: 0 4px 12px rgba(204,24,0,.3); }

/* ---- PLAN CARDS ---- */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.plan-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: relative;
  transition: var(--transition);
  cursor: pointer;
  overflow: hidden;
}

.plan-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad);
  opacity: 0;
  transition: var(--transition);
}

.plan-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.plan-card:hover::before { opacity: .03; }

.plan-card.featured {
  border-color: var(--primary);
  box-shadow: 0 12px 40px rgba(204,24,0,.15);
}

.plan-badge {
  position: absolute;
  top: 16px; right: -28px;
  background: var(--grad);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 6px 36px;
  letter-spacing: .06em;
  transform: rotate(30deg);
}

.plan-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.plan-name {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -.02em;
}

.plan-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }

/* plan-price gradient handled inline in HTML */

.plan-price-unit { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }

.plan-features { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.plan-features li .check { color: #16a34a; font-weight: 800; flex-shrink: 0; }
.plan-features li .dash { color: var(--border); }

/* ---- COMPARE TABLE ---- */
.compare-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 48px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.compare-table th {
  padding: 16px 20px;
  background: var(--bg-dark);
  color: white;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.compare-table th:first-child { text-align: left; }

.compare-table th.highlight { background: var(--primary); }

.compare-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  text-align: center;
  background: white;
}

.compare-table td:first-child { text-align: left; font-weight: 600; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:nth-child(even) td { background: #faf9f8; }

.compare-table .yes { color: #16a34a; font-size: 16px; font-weight: 800; }
.compare-table .no { color: var(--border); font-size: 16px; }
.compare-table .highlight-col { background: rgba(255,48,32,.04) !important; }

/* ---- PROCESS ---- */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 24px;
  position: relative;
}

.process-steps::before {
  content: '';
  position: absolute;
  top: 28px; left: 60px; right: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 0;
}

.process-step {
  text-align: center;
  position: relative;
  z-index: 1;
}

.process-num {
  width: 56px; height: 56px;
  background: white;
  border: 3px solid var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900; color: var(--primary);
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(204,24,0,.2);
}

.process-step h4 { font-size: 14px; font-weight: 800; margin-bottom: 6px; }
.process-step p { font-size: 12px; color: var(--text-muted); }

/* ---- POLICY ---- */
.policy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.policy-item {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}

.policy-item:hover { border-color: var(--primary); transform: translateY(-3px); }

.policy-icon { font-size: 28px; margin-bottom: 12px; }
.policy-item h4 { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.policy-item p { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

/* =============================================
   DỊCH VỤ KHÁC PAGE
   ============================================= */
.services-hero {
  background: var(--grad);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  color: white;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}

.services-hero::after {
  content: '◐';
  position: absolute;
  right: 48px; top: 50%;
  transform: translateY(-50%);
  font-size: 160px;
  opacity: .1;
  line-height: 1;
}

.services-hero h1 { font-size: 40px; font-weight: 900; letter-spacing: -.04em; margin-bottom: 12px; }
.services-hero p { opacity: .8; font-size: 16px; max-width: 500px; }

.service-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.service-big-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.service-big-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.service-big-header {
  background: var(--bg-dark);
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.service-big-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 50%, rgba(255,48,32,.3) 0%, transparent 60%);
}

.service-big-icon { font-size: 40px; margin-bottom: 12px; position: relative; z-index: 1; }
.service-big-name { font-size: 22px; font-weight: 900; color: white; letter-spacing: -.02em; position: relative; z-index: 1; }
.service-big-tag { margin-top: 8px; position: relative; z-index: 1; }

.service-big-body { padding: 28px 32px; }
.service-big-body p { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 20px; }

.service-big-price { font-size: 28px; font-weight: 900; color: var(--primary); margin-bottom: 4px; }
.service-big-price-note { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }

.service-includes { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.service-includes li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.service-includes .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--grad); flex-shrink: 0; }

/* =============================================
   AI CHAT PAGE
   ============================================= */
.chat-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  height: calc(100vh - 140px);
  padding: 32px 32px 32px;
}

.chat-sidebar {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.chat-sidebar-header h3 { font-size: 14px; font-weight: 800; margin-bottom: 12px; }

.btn-new-chat {
  width: 100%;
  padding: 10px 16px;
  background: var(--grad);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-new-chat:hover { opacity: .9; }

.chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-history-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-history-item:hover, .chat-history-item.active { background: var(--bg); color: var(--text); }

.chat-sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.chat-model-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.model-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; animation: blink 2s infinite; }
@keyframes blink { 0%, 100% { opacity:1; } 50% { opacity:.3; } }

/* ---- CHAT MAIN ---- */
.chat-main {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info { display: flex; align-items: center; gap: 12px; }

.chat-avatar {
  width: 40px; height: 40px;
  background: var(--grad);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: white;
}

.chat-header-name { font-size: 15px; font-weight: 800; }
.chat-header-sub { font-size: 12px; color: var(--text-muted); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-welcome {
  text-align: center;
  padding: 40px 20px;
}

.chat-welcome-icon {
  width: 72px; height: 72px;
  background: var(--grad);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; color: white;
  margin: 0 auto 20px;
}

.chat-welcome h2 { font-size: 22px; font-weight: 900; margin-bottom: 8px; }
.chat-welcome p { color: var(--text-muted); font-size: 14px; max-width: 400px; margin: 0 auto 24px; }

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.chat-suggestion {
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.chat-suggestion:hover { border-color: var(--primary); color: var(--primary); background: rgba(255,48,32,.04); }

/* ---- MESSAGES ---- */
.msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: msgSlide .3s var(--transition) both;
}

@keyframes msgSlide {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg.user { flex-direction: row-reverse; }

.msg-avatar {
  width: 34px; height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}

.msg.ai .msg-avatar { background: var(--grad); color: white; }
.msg.user .msg-avatar { background: var(--bg-dark); color: white; }

.msg-bubble {
  max-width: 72%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.65;
}

.msg.ai .msg-bubble { background: var(--bg); border-radius: 4px 16px 16px 16px; }
.msg.user .msg-bubble { background: var(--grad); color: white; border-radius: 16px 4px 16px 16px; }

.msg-time { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* ---- TYPING ---- */
.typing-indicator {
  display: none;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 4px 16px 16px 16px;
  width: fit-content;
}

.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.typing-dot {
  width: 6px; height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.2s infinite;
}

.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ---- CHAT INPUT ---- */
.chat-input-area {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: white;
}

.chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 12px 12px 16px;
  transition: var(--transition);
}

.chat-input-wrap:focus-within { border-color: var(--primary); background: white; box-shadow: 0 0 0 3px rgba(255,48,32,.08); }

.chat-textarea {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  resize: none;
  max-height: 120px;
  min-height: 22px;
  line-height: 1.5;
  padding: 0;
}

.chat-textarea::placeholder { color: var(--text-light); }

.btn-send {
  width: 38px; height: 38px;
  background: var(--grad);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.btn-send:hover { opacity: .9; transform: scale(1.05); }

.chat-hint { font-size: 11px; color: var(--text-light); margin-top: 8px; text-align: center; }

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .plan-grid { grid-template-columns: 1fr 1fr; }
  .service-cards-grid { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 1fr; height: auto; }
  .chat-sidebar { display: none; }
}

@media (max-width: 768px) {
  .header-inner { padding: 0 16px; }
  .nav { display: none; }
  .container { padding: 0 16px; }
  .section { padding: 40px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr 1fr; }
  .process-steps::before { display: none; }
  .company-hero { flex-direction: column; gap: 24px; padding: 36px 24px; }
  .company-hero-right { text-align: left; }
  .sign-grid { grid-template-columns: 1fr; }
  .policy-grid { grid-template-columns: 1fr; }
  .card { padding: 24px; }
}

/* ---- PLAN PRICE ---- */
.plan-price {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -.04em;
  color: var(--primary);
  margin-bottom: 4px;
}

/* ---- UTILITIES ---- */
@keyframes spin  { to { transform: rotate(360deg); } }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-6px)} 40%,80%{transform:translateX(6px)} }

.btn-spin {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

/* ---- LOGO ANIMATED ---- */
.logo-icon-anim {
  background: var(--grad);
  background-size: 200% 200%;
  animation: gradShift 3s ease infinite;
}

@keyframes gradShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- COMPANY LOGO PULSE ---- */
.company-logo-big {
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%,100% { box-shadow: 0 20px 50px rgba(204,24,0,.4); }
  50%     { box-shadow: 0 24px 60px rgba(255,48,32,.65); transform: translateY(-3px); }
}

/* ---- PLAN MODULE hidden by default, shown via JS ---- */
.plan-module { display: none; }
.plan-module.active { display: block; animation: fadeIn .4s var(--transition) both; }

/* ---- SVG ICON COLORS ---- */
.icon-grad { fill: url(#iconGrad); }

/* ---- GANTT / ROADMAP ---- */
.gantt-wrap { overflow-x: auto; margin-bottom: 32px; }
.gantt-table { width: 100%; border-collapse: collapse; min-width: 700px; font-size: 13px; }
.gantt-table th { background: var(--bg-dark); color: white; padding: 12px 14px; text-align: left; font-size: 12px; letter-spacing:.04em; }
.gantt-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.gantt-table tr:nth-child(even) td { background: #faf9f8; }
.gantt-bar { height: 8px; border-radius: 99px; background: var(--grad); margin-top: 6px; }

/* ---- MATRIX TABLE ---- */
.matrix-table { width:100%; border-collapse:collapse; font-size:13px; }
.matrix-table th { background: var(--primary); color:white; padding:12px 16px; text-align:left; }
.matrix-table td { padding:12px 16px; border-bottom:1px solid var(--border); vertical-align:top; }
.matrix-table tr:nth-child(even) td { background:#faf9f8; }

/* ---- KPI CARDS GRID ---- */
.kpi-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:32px; }
.kpi-card { background:white; border:1.5px solid var(--border); border-radius:var(--radius); padding:20px; text-align:center; transition:var(--transition); }
.kpi-card:hover { border-color:var(--primary); transform:translateY(-3px); box-shadow:var(--shadow); }
.kpi-card .kpi-icon { width:48px;height:48px;border-radius:14px;display:flex;align-items:center;justify-content:center;margin:0 auto 12px; }
.kpi-card .kpi-val { font-size:22px;font-weight:900;color:var(--primary);margin-bottom:4px; }
.kpi-card .kpi-label { font-size:12px;color:var(--text-muted); }

@media(max-width:768px){ .kpi-grid{grid-template-columns:1fr 1fr;} }
/* =============================================
   MULTI-SELECT PACKAGE CHIPS  (v4.2)
   ============================================= */
.multi-hint {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 9px;
}

.pkg-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 8px;
}

.pkg-chip-grid--cast {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

/* ── base chip ── */
.pkg-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  background: var(--surface);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.pkg-chip:hover {
  border-color: var(--primary);
  background: rgba(255,48,32,.04);
}

/* ── checkbox dot ── */
.chip-cb {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
  position: relative;
}

/* ── text parts ── */
.chip-koc {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.chip-p {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

/* ── ACTIVE STATE — V1 (red) ── */
.pkg-chip.chip--active {
  border-color: var(--primary);
  background: rgba(255,48,32,.07);
  box-shadow: 0 0 0 2.5px rgba(255,48,32,.15);
}
.pkg-chip.chip--active .chip-cb {
  background: var(--primary);
  border-color: var(--primary);
}
.pkg-chip.chip--active .chip-cb::after {
  content: '';
  position: absolute;
  left: 2px; top: 5px;
  width: 8px; height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-2px);
}
.pkg-chip.chip--active .chip-p { color: var(--primary); font-weight: 700; }

/* ── ACTIVE STATE — V2 (amber) ── */
.pkg-chip--v2:hover { border-color: #f59e0b; background: rgba(245,158,11,.04); }
.pkg-chip--v2.chip--active {
  border-color: #f59e0b;
  background: rgba(245,158,11,.09);
  box-shadow: 0 0 0 2.5px rgba(245,158,11,.18);
}
.pkg-chip--v2.chip--active .chip-cb { background: #f59e0b; border-color: #f59e0b; }
.pkg-chip--v2.chip--active .chip-p  { color: #d97706; font-weight: 700; }

/* ── ACTIVE STATE — Cast (blue) ── */
.pkg-chip--cast:hover { border-color: #3b82f6; background: rgba(59,130,246,.04); }
.pkg-chip--cast.chip--active {
  border-color: #3b82f6;
  background: rgba(59,130,246,.09);
  box-shadow: 0 0 0 2.5px rgba(59,130,246,.18);
}
.pkg-chip--cast.chip--active .chip-cb { background: #3b82f6; border-color: #3b82f6; }
.pkg-chip--cast.chip--active .chip-p  { color: #2563eb; font-weight: 700; }

/* ── summary row beneath grid ── */
.chip-summary {
  margin-top: 8px;
  min-height: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

@media (max-width: 640px) {
  .pkg-chip-grid,
  .pkg-chip-grid--cast { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================
   "THÊM DỊCH VỤ" ACCORDION  (v4.3)
   ============================================= */
.add-svc-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 18px;
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  transition: border-color .2s, background .2s, color .2s;
}

.add-svc-trigger:hover,
.add-svc-trigger--open {
  border-color: var(--primary);
  background: rgba(255,48,32,.04);
  color: var(--primary);
}

/* individual service card inside panel */
.add-svc-card {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s;
  background: var(--bg);
  position: relative;
}

.add-svc-card:hover {
  border-color: var(--primary);
  background: var(--surface);
}

.add-svc-card--active {
  border-color: var(--primary);
  background: rgba(255,48,32,.05);
  box-shadow: 0 0 0 2px rgba(255,48,32,.12);
}

/* icon circle */
.add-svc-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.add-svc-icon--red   { background: var(--primary); }
.add-svc-icon--blue  { background: #3b82f6; }
.add-svc-icon--green { background: #16a34a; }

.add-svc-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.add-svc-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* checkbox indicator top-right */
.add-svc-check {
  display: none;
  width: 20px; height: 20px;
  background: var(--primary);
  border-radius: 50%;
  align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
  margin-top: 2px;
}
.add-svc-check--show { display: flex; }

/* options area — hidden until card is active */
.add-svc-options { display: none; }
.add-svc-opts--show { display: block; }

.add-svc-opts--show select {
  width: 100%;
  padding: 7px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.add-svc-opts--show select:focus {
  outline: none;
  border-color: var(--primary);
}

/* =============================================
   ACCORDION CARD ENHANCEMENTS  (v4.3)
   ============================================= */

/* price tag badge top-right of card */
.add-svc-price-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(255,48,32,.1);
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 8px;
}
.add-svc-price-tag--blue  { background: rgba(59,130,246,.12); color: #2563eb; }
.add-svc-price-tag--green { background: rgba(22,163,74,.12);  color: #16a34a; }

/* mini price list shown on every card */
.add-svc-price-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 6px 0 4px;
  font-size: 11px;
  color: var(--text-muted);
}
.add-svc-price-list b { color: var(--text); }

/* computed total line (shop card) */
.add-svc-computed-total {
  display: none;
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(59,130,246,.08);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
  text-align: center;
}

/* bonus note (ads2 card) */
.add-svc-bonus-note {
  display: none;
  margin-top: 7px;
  padding: 5px 10px;
  background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.3);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
}

/* select inside accordion opts — clean style */
.add-svc-opts--show select {
  width: 100%;
  padding: 7px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  margin-top: 0;
}
.add-svc-opts--show select:focus {
  outline: none;
  border-color: var(--primary);
}

/* =============================================
   PRINT OVERRIDES — Force B&W for screen UI
   (PDF builder already handles its own styles;
    this covers the iframe/window print path)
   ============================================= */
@media print {
  /* Force all text to black */
  * {
    color: #000 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Preserve white backgrounds for cards */
  .card,
  .service-group,
  .service-big-card,
  .service-group-body,
  input,
  select,
  textarea {
    background: #fff !important;
    border-color: #ccc !important;
  }

  /* Preserve dark header for contrast */
  .pg-hdr,
  .company-hero,
  .nav-header { background: #1a1a1a !important; }
  .pg-hdr *,
  .company-hero *,
  .nav-header * { color: #fff !important; }

  /* Table headers stay dark */
  .svc-tbl thead tr,
  table thead tr { background: #222 !important; }
  .svc-tbl thead tr th,
  table thead tr th { color: #fff !important; }

  /* Price values — black bold */
  [id$="Total"],
  [id$="total"],
  [id$="GroupPrice"],
  [id$="Price"],
  .service-group-price,
  .summary-value,
  .stotal .val {
    color: #000 !important;
    font-weight: 800 !important;
  }

  /* Remove decorative elements */
  .nav-header,
  .tab-bar,
  .company-hero-buttons,
  button:not(.print-btn) {
    display: none !important;
  }

  /* Ensure page breaks work */
  .card { page-break-inside: avoid; }
  .service-group { page-break-inside: avoid; }
}