:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  
  /* Bảng màu Xanh Trắng Dịu Mắt */
  --color-bg: #f4f8f6;
  --color-surface: #ffffff;
  --color-surface-hover: #f0f7f3;
  --color-border: #dbeae2;
  --color-border-light: #c8dfd4;
  
  --color-primary: #0d9488;
  --color-primary-dark: #0f766e;
  --color-accent: #059669;
  --color-accent-light: #10b981;
  
  --color-text-main: #132a22;
  --color-text-title: #0f382c;
  --color-text-muted: #415f53;
  --color-text-dim: #6d887d;
  
  --color-success: #059669;
  --color-success-bg: rgba(5, 150, 105, 0.1);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  
  --shadow-card: 0 8px 24px -4px rgba(19, 42, 34, 0.05), 0 2px 6px -1px rgba(19, 42, 34, 0.03);
  --shadow-hover: 0 12px 30px -4px rgba(19, 42, 34, 0.08);
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding: 40px 20px 80px;
}

/* Background Atmospheric Glow */
.background-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.45;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent 70%);
  top: -100px;
  left: 10%;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.12), transparent 70%);
  bottom: 0;
  right: 5%;
}

/* Container */
.container {
  max-width: 1140px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  margin-bottom: 32px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.22);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--color-primary);
  box-shadow: 0 0 8px rgba(13, 148, 136, 0.5);
}

.main-title {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--color-text-title);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.25;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 760px;
  margin-bottom: 28px;
}

/* Meta Cards */
.meta-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.meta-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-card);
}

.meta-label {
  font-size: 0.76rem;
  color: var(--color-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.meta-value {
  font-size: 0.95rem;
  color: var(--color-text-title);
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-success);
  background: var(--color-success-bg);
  padding: 3px 10px;
  border-radius: 6px;
  width: fit-content;
}

/* Toolbar */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.toolbar-left, .toolbar-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
}

.btn-primary:hover {
  opacity: 0.94;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.32);
}

/* Table */
.table-wrapper {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 28px;
}

.quote-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.quote-table th {
  background: #edf5f1;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
}

.quote-table td {
  padding: 18px;
  border-bottom: 1px solid #edf4f0;
  vertical-align: top;
  font-size: 0.92rem;
  transition: var(--transition);
}

.quote-table tr:last-child td {
  border-bottom: none;
}

.quote-table tbody tr {
  cursor: pointer;
  transition: var(--transition);
}

.quote-table tbody tr:hover {
  background-color: var(--color-surface-hover);
}

.quote-table tbody tr.row-selected {
  background-color: rgba(13, 148, 136, 0.04);
}

.col-check {
  width: 50px;
  text-align: center;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

.col-module {
  width: 25%;
}

.module-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.module-name {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--color-text-title);
  margin-bottom: 6px;
}

.module-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: #edf5f1;
  color: var(--color-text-muted);
}

.col-desc {
  width: 40%;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feature-list li {
  position: relative;
  padding-left: 16px;
}

.feature-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
}

.col-time {
  width: 15%;
  font-weight: 600;
  color: var(--color-text-main);
  white-space: nowrap;
}

.time-pill {
  display: inline-block;
  background: #f0f7f3;
  border: 1px solid var(--color-border);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--color-text-main);
}

.col-price {
  width: 18%;
  text-align: right;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-primary-dark);
  white-space: nowrap;
}

.free-badge {
  display: inline-block;
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.25);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Summary Section */
.summary-section {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

.summary-details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--color-border);
}

.summary-item strong {
  color: var(--color-text-title);
  font-size: 1rem;
}

.summary-item.notice {
  border-bottom: none;
  padding-bottom: 0;
}

.infra-note strong {
  color: var(--color-success);
}

.total-box {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  border: 1px solid #0f766e;
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  box-shadow: 0 10px 28px rgba(13, 148, 136, 0.22);
}

.total-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a7f3d0;
  font-weight: 700;
  margin-bottom: 8px;
}

.total-amount {
  font-family: var(--font-sans);
  font-size: 2.4rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.vat-note {
  font-size: 0.78rem;
  color: #d1fae5;
}

/* Phases Section */
.phases-section {
  margin-bottom: 40px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--color-text-title);
  margin-bottom: 20px;
}

.phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.phase-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.phase-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-primary);
}

.phase-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 8px;
  opacity: 0.85;
}

.phase-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--color-text-title);
  margin-bottom: 8px;
}

.phase-desc {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
  flex-grow: 1;
}

.phase-duration {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  background: #edf5f1;
  border: 1px solid var(--color-border);
  padding: 4px 10px;
  border-radius: 4px;
  width: fit-content;
}

/* Footer Notes */
.footer {
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
}

.notes-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
}

.notes-block h4 {
  font-size: 0.95rem;
  color: var(--color-text-title);
  margin-bottom: 10px;
  font-weight: 700;
}

.notes-block ul {
  list-style: square;
  padding-left: 20px;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notes-block strong {
  color: var(--color-text-title);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--color-primary-dark);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 860px) {
  .summary-section {
    grid-template-columns: 1fr;
  }
  
  .quote-table th:nth-child(3),
  .quote-table td:nth-child(3) {
    display: none; /* Hide detailed desc on mobile for brevity */
  }

  .col-module {
    width: 50%;
  }

  .main-title {
    font-size: 2rem;
  }
}

/* Print Stylesheet */
@media print {
  body {
    background: #ffffff !important;
    color: #111111 !important;
    padding: 0 !important;
  }

  .background-decor, .toolbar, .toast {
    display: none !important;
  }

  .container {
    max-width: 100% !important;
  }

  .quote-table {
    border: 1px solid #ddd !important;
  }

  .quote-table th {
    background: #f4f4f4 !important;
    color: #111 !important;
    border-bottom: 2px solid #ccc !important;
  }

  .quote-table td {
    color: #222 !important;
    border-bottom: 1px solid #eee !important;
  }

  .module-name, .phase-title, .summary-item strong {
    color: #000 !important;
  }

  .total-box {
    background: #f8f9fa !important;
    border: 2px solid #333 !important;
    color: #000 !important;
    box-shadow: none !important;
  }

  .total-amount {
    color: #0d9488 !important;
  }

  .meta-card, .phase-card, .summary-details, .notes-block {
    background: #fff !important;
    border: 1px solid #ddd !important;
  }
}
