:root {
  --brand: #fbbc00;
  --brand-dark: #8a6800;
  --navy: #080725;
  --navy-2: #12103d;
  --background: #f5f6fa;
  --surface: #ffffff;
  --text: #17182a;
  --muted: #6f7283;
  --line: #e5e7ef;
  --success: #157a45;
  --success-bg: #e8f7ef;
  --danger: #b33131;
  --danger-bg: #fdecec;
  --info: #245eb5;
  --info-bg: #eaf2ff;
  --warning-bg: #fff6d8;
  --shadow: 0 18px 50px rgba(8, 7, 37, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--background); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
input, select, textarea {
  width: 100%;
  border: 1px solid #d9dce6;
  border-radius: 10px;
  background: white;
  padding: 11px 12px;
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(251, 188, 0, .18);
}
textarea { resize: vertical; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.eyebrow { margin-bottom: 4px; color: var(--brand-dark); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.panel-note { color: var(--muted); font-size: 12px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  transition: transform .15s ease, filter .15s ease, background .15s ease;
}
.button:hover { transform: translateY(-1px); filter: brightness(.98); }
.button:disabled { cursor: not-allowed; opacity: .58; transform: none; }
.button-primary { background: var(--brand); color: var(--navy); }
.button-secondary { border-color: var(--line); background: white; color: var(--navy); }
.button-dark { background: var(--navy); color: white; }
.button-ghost { border-color: rgba(255,255,255,.2); background: transparent; color: white; }
.button-small { min-height: 36px; padding: 8px 12px; font-size: 11px; }
.button-block { width: 100%; }

.field { display: grid; align-content: start; gap: 7px; }
.field > span, .field-label { font-size: 12px; font-weight: 750; }
.field small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.field-full { grid-column: 1 / -1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 15px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }

.toast-container { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 10px; }
.toast { min-width: 260px; max-width: 380px; padding: 13px 15px; border-radius: 11px; background: var(--navy); color: white; box-shadow: var(--shadow); font-size: 12px; animation: slideIn .2s ease; }
.toast.error { background: #8e2525; }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } }

/* Login */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 10% 10%, rgba(251,188,0,.25), transparent 30%),
    linear-gradient(135deg, var(--navy), #121049 62%, #20195a);
}
.auth-shell { width: min(960px, 100%); display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden; border-radius: 24px; background: white; box-shadow: 0 28px 80px rgba(0,0,0,.28); }
.auth-brand { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 570px; padding: 46px; color: white; background: var(--navy); overflow: hidden; }
.auth-brand::after { content: ''; position: absolute; right: -120px; bottom: -130px; width: 360px; height: 360px; border: 70px solid rgba(251,188,0,.17); border-radius: 50%; }
.brand-lockup { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--brand); color: var(--navy); font-weight: 900; }
.brand-lockup strong, .brand-lockup span { display: block; }
.brand-lockup strong { font-size: 18px; }
.brand-lockup span { margin-top: 2px; color: #bbb9d8; font-size: 11px; }
.auth-copy { position: relative; z-index: 1; max-width: 390px; }
.auth-copy h1 { margin-bottom: 14px; font-size: clamp(32px, 5vw, 51px); line-height: 1.05; }
.auth-copy p { color: #c9c7df; line-height: 1.7; }
.auth-highlight { color: var(--brand); }
.auth-form-wrap { display: grid; align-content: center; padding: 50px; }
.auth-form-wrap h2 { margin-bottom: 8px; font-size: 28px; }
.auth-form-wrap > p { margin-bottom: 28px; color: var(--muted); line-height: 1.55; }
.auth-form { display: grid; gap: 16px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 78px; }
.password-toggle { position: absolute; top: 50%; right: 10px; border: 0; background: transparent; transform: translateY(-50%); color: var(--brand-dark); font-size: 11px; font-weight: 800; }
.auth-hint { margin-top: 22px; padding: 12px; border-radius: 10px; background: #fff8df; color: #6d5500; font-size: 11px; line-height: 1.55; }
.auth-link { margin-top: 18px; text-align: center; color: var(--muted); font-size: 12px; }
.auth-link a { color: var(--brand-dark); font-weight: 800; }

/* Requester portal */
.public-page { min-height: 100vh; background: #f6f6fb; }
.public-header { background: var(--navy); color: white; }
.public-nav { width: min(1120px, calc(100% - 32px)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 0; }
.public-nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-dropdown { position: relative; }
.nav-dropdown summary {
  list-style: none;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown[open] summary { filter: brightness(.98); }
.dropdown-caret { font-size: 11px; line-height: 1; }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 210px;
  padding: 8px;
  border: 1px solid rgba(8,7,37,.08);
  border-radius: 14px;
  background: white;
  box-shadow: 0 16px 36px rgba(8,7,37,.16);
  z-index: 30;
}
.nav-dropdown-item {
  display: block;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}
.nav-dropdown-item:hover {
  background: #fff8df;
  color: var(--navy);
}
.public-hero { width: min(1120px, calc(100% - 32px)); margin: 0 auto; display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; padding: 54px 0 72px; }
.public-hero h1 { margin-bottom: 16px; font-size: clamp(35px, 5vw, 58px); line-height: 1.04; }
.public-hero p { max-width: 620px; color: #c8c6df; font-size: 16px; line-height: 1.75; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-chip { padding: 8px 11px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; color: #e9e8f4; font-size: 11px; }
.hero-visual { position: relative; min-height: 260px; }
.hero-card { position: absolute; padding: 18px; border: 1px solid rgba(255,255,255,.13); border-radius: 18px; background: rgba(255,255,255,.08); backdrop-filter: blur(10px); box-shadow: 0 20px 45px rgba(0,0,0,.18); }
.hero-card-main { inset: 0 30px 34px 0; }
.hero-card-small { right: 0; bottom: 0; width: 205px; background: var(--brand); color: var(--navy); transform: rotate(2deg); }
.hero-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hero-card h3 { margin: 16px 0 8px; }
.hero-card p { color: inherit; font-size: 12px; line-height: 1.55; }
.progress-line { height: 7px; margin-top: 18px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.14); }
.progress-line span { display: block; width: 66%; height: 100%; background: var(--brand); }
.public-content { width: min(1120px, calc(100% - 32px)); margin: -34px auto 0; padding-bottom: 56px; }
.public-tabs { display: inline-flex; gap: 5px; margin-bottom: 18px; padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 10px 30px rgba(8,7,37,.07); }
.tab-button { border: 0; border-radius: 9px; background: transparent; padding: 10px 15px; color: var(--muted); font-size: 12px; font-weight: 800; }
.tab-button.active { background: var(--navy); color: white; }
.public-grid { display: grid; grid-template-columns: 1fr .42fr; gap: 20px; align-items: start; }
.public-card { border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 12px 35px rgba(8,7,37,.06); }
.public-card-header { padding: 22px 24px; border-bottom: 1px solid var(--line); }
.public-card-header h2 { margin-bottom: 6px; font-size: 22px; }
.public-card-body { padding: 24px; }
.public-side { display: grid; gap: 14px; }
.info-card { padding: 18px; border-radius: 16px; background: var(--navy); color: white; }
.info-card.yellow { background: var(--brand); color: var(--navy); }
.info-card h3 { margin-bottom: 8px; font-size: 15px; }
.info-card p { margin: 0; color: #c7c5df; font-size: 11px; line-height: 1.6; }
.info-card.yellow p { color: #584500; }
.success-card { padding: 24px; border: 1px solid #cfe8db; border-radius: 16px; background: #f0fbf5; }
.email-notice { margin: 14px 0 16px; padding: 12px 14px; border-radius: 10px; font-size: 11px; line-height: 1.55; }
.email-notice-success { border: 1px solid #bfe4cf; background: #eaf8f0; color: #126b3e; }
.email-notice-warning { border: 1px solid #efd477; background: #fff8df; color: #6b5200; }
.success-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px; border-radius: 50%; background: var(--success); color: white; font-size: 22px; font-weight: 900; }
.tracking-code { display: inline-block; margin: 8px 0 14px; padding: 8px 11px; border-radius: 9px; background: white; color: var(--navy); font-weight: 900; letter-spacing: .04em; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { min-width: 0; }
.saved-ticket-list { display: grid; gap: 10px; }
.saved-ticket { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--text); text-align: left; }
.saved-ticket strong, .saved-ticket span { display: block; }
.saved-ticket span { margin-top: 3px; color: var(--muted); font-size: 10px; }

/* Shared ticket details */
.badge { display: inline-flex; align-items: center; width: max-content; border-radius: 999px; padding: 6px 9px; font-size: 10px; font-weight: 850; }
.badge-pending { background: var(--warning-bg); color: #765900; }
.badge-in-progress { background: var(--info-bg); color: var(--info); }
.badge-done { background: var(--success-bg); color: var(--success); }
.badge-rejected { background: var(--danger-bg); color: var(--danger); }
.priority-urgent { color: var(--danger); font-weight: 850; }
.priority-high { color: #b86800; font-weight: 800; }
.ticket-view { display: grid; gap: 18px; }
.ticket-view-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.ticket-number { color: var(--brand-dark); font-size: 11px; font-weight: 850; letter-spacing: .08em; }
.ticket-description { color: #555b6b; line-height: 1.7; white-space: pre-wrap; }
.detail-grid { display: grid; grid-template-columns: 1.18fr .82fr; gap: 18px; }
.detail-section { padding: 17px; border: 1px solid var(--line); border-radius: 13px; }
.detail-section h3 { margin-bottom: 13px; font-size: 14px; }
.meta-list { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.meta-item span, .meta-item strong { display: block; }
.meta-item span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.meta-item strong { margin-top: 4px; font-size: 12px; }
.rejection-box { padding: 13px; border-radius: 10px; background: var(--danger-bg); color: #902828; font-size: 12px; line-height: 1.55; }
.comments, .timeline { display: grid; gap: 10px; }
.comment { padding: 12px; border-radius: 10px; background: #f7f8fb; }
.comment.internal { border-left: 3px solid var(--brand); background: #fffbec; }
.comment strong { font-size: 11px; }
.comment p { margin: 5px 0 4px; font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.comment small { color: var(--muted); font-size: 9px; }
.timeline-item { position: relative; padding-left: 22px; }
.timeline-item::before { content: ''; position: absolute; left: 2px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(251,188,0,.15); }
.timeline-item strong { display: block; font-size: 12px; line-height: 1.45; }
.timeline-item span { color: var(--muted); font-size: 10px; }
.comment-form { display: grid; gap: 9px; margin-top: 14px; }
.rating-box { padding: 17px; border: 1px solid #f0d77f; border-radius: 13px; background: #fffaf0; }
.star-picker { display: flex; gap: 5px; margin: 10px 0 14px; }
.star-button { border: 0; padding: 0; background: transparent; color: #c7c8cf; font-size: 31px; line-height: 1; }
.star-button.selected { color: var(--brand); }
.rating-display { color: var(--brand-dark); font-size: 17px; font-weight: 850; }

/* Admin */
.admin-body { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 250px; display: flex; flex-direction: column; padding: 24px 16px; background: var(--navy); color: white; }
.sidebar .brand-lockup { padding: 0 8px 24px; }
.nav-list { display: grid; gap: 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; border-radius: 10px; padding: 11px 12px; color: #c9c7dd; text-decoration: none; font-size: 12px; font-weight: 750; }
.nav-item:hover, .nav-item.active { background: var(--brand); color: var(--navy); }
.sidebar-spacer { flex: 1; }
.sidebar-portal { margin-bottom: 14px; }
.sidebar-footer { display: flex; align-items: center; gap: 11px; padding: 14px 8px 0; border-top: 1px solid rgba(255,255,255,.12); }
.avatar { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 12px; background: var(--brand); color: var(--navy); font-weight: 900; }
.sidebar-footer strong, .sidebar-footer span { display: block; }
.sidebar-footer strong { font-size: 12px; }
.sidebar-footer span { margin-top: 2px; color: #aaa8c7; font-size: 9px; }
.main-content { margin-left: 250px; padding: 28px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.topbar h1 { margin: 0; font-size: 27px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.realtime-status { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; background: white; padding: 8px 11px; color: var(--muted); font-size: 10px; font-weight: 750; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #9ca0af; }
.realtime-status.online .status-dot { background: #21a464; box-shadow: 0 0 0 4px rgba(33,164,100,.12); }
.stats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 13px; margin-bottom: 22px; }
.stat-card { min-height: 148px; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 14px; background: white; box-shadow: 0 7px 20px rgba(8,7,37,.04); }
.stat-label { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.stat-card strong { font-size: 32px; }
.stat-card small { color: var(--muted); font-size: 10px; }
.stat-rejected { border-top-color: var(--danger); }
.stat-done { border-top-color: var(--success); }
.stat-progress { border-top-color: var(--info); }
.rating-five { color: var(--muted); font-size: 14px; }
.panel { margin-bottom: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 8px 25px rgba(8,7,37,.04); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 0; font-size: 18px; }
.filters { display: flex; gap: 9px; }
.search-field input { min-width: 240px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 15px; border-bottom: 1px solid #f0f1f5; text-align: left; white-space: nowrap; font-size: 11px; }
th { color: var(--muted); background: #fafafd; font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.ticket-title strong, .ticket-title span { display: block; }
.ticket-title strong { max-width: 290px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.ticket-title span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.table-action { border: 0; background: transparent; color: var(--info); font-weight: 800; }
.empty-state { display: grid; place-items: center; gap: 6px; padding: 42px; color: var(--muted); }
.empty-state strong { color: var(--text); }
.performance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; padding: 20px; }
.performance-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, #fff, #fbfbfd); }
.performance-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.performance-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--navy); color: var(--brand); font-weight: 900; }
.stars { color: var(--brand-dark); letter-spacing: 1px; font-weight: 900; }
.performance-card h3 { margin: 14px 0 5px; font-size: 16px; }
.performance-card p { color: var(--muted); font-size: 12px; }
.performance-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metric { padding: 10px; border-radius: 10px; background: #f5f6fa; text-align: center; }
.metric strong, .metric span { display: block; }
.metric span { margin-top: 3px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: rgba(8,7,37,.67); backdrop-filter: blur(4px); }
.modal-card { width: min(980px, 100%); max-height: 92vh; overflow-y: auto; border-radius: 18px; background: white; box-shadow: var(--shadow); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 22px; border-bottom: 1px solid var(--line); }
.icon-button { border: 0; background: #f1f2f6; border-radius: 9px; width: 36px; height: 36px; font-size: 22px; color: var(--muted); }
.modal-body { padding: 22px; }
.status-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.status-button { border: 1px solid var(--line); border-radius: 9px; background: white; padding: 8px 10px; font-size: 11px; font-weight: 800; }
.status-button:hover { border-color: var(--brand); background: #fffaf0; }
.assignment-row { display: flex; gap: 8px; align-items: end; }
.assignment-row .field { flex: 1; }
.internal-check { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.internal-check input { width: auto; }

@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .public-grid { grid-template-columns: 1fr; }
  .public-side { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .public-hero { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .sidebar { position: static; width: 100%; min-height: auto; }
  .nav-list { grid-template-columns: repeat(3, 1fr); }
  .sidebar-spacer, .sidebar-footer { display: none; }
  .sidebar-portal { margin: 14px 0 0; }
  .main-content { margin-left: 0; padding: 20px; }
  .topbar, .panel-header { align-items: flex-start; flex-direction: column; }
  .filters, .search-field, .search-field input { width: 100%; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .auth-form-wrap { padding: 30px 22px; }
  .public-nav { align-items: flex-start; }
  .public-nav-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .nav-dropdown-menu {
    right: 0;
    left: auto;
    min-width: 180px;
  }
  .public-hero { padding: 38px 0 62px; }
  .public-content { margin-top: -26px; }
  .public-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .public-card-header, .public-card-body { padding: 18px; }
  .public-side { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-actions { width: 100%; justify-content: space-between; }
  .realtime-status span:last-child { display: none; }
  .nav-item { justify-content: center; font-size: 0; }
  .nav-item span { font-size: 17px; }
  .ticket-view-head { flex-direction: column; }
  .meta-list { grid-template-columns: 1fr; }
  .copy-row { flex-direction: column; }
}


/* Admin printable reports */
.report-controls { overflow: visible; }
.report-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 13px; padding: 20px; align-items: end; }
.report-filter-search { grid-column: span 2; }
.report-filter-actions { display: flex; gap: 8px; align-items: end; padding-bottom: 1px; }
.print-report { border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 8px 25px rgba(8,7,37,.04); overflow: hidden; }
.print-report-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 28px; color: white; background: var(--navy); }
.print-brand { display: flex; align-items: center; gap: 13px; }
.print-brand h1 { margin: 0; font-size: 21px; }
.print-brand p { margin: 4px 0 0; color: #c2c0db; font-size: 11px; }
.print-report-meta { display: grid; gap: 5px; text-align: right; }
.print-report-meta strong { color: var(--brand); font-size: 15px; }
.print-report-meta span { color: #c2c0db; font-size: 10px; }
.print-filter-summary { display: flex; gap: 9px; padding: 13px 28px; border-bottom: 1px solid var(--line); background: #fff9e8; font-size: 11px; }
.print-filter-summary span { color: #675300; }
.report-summary-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; padding: 20px 28px; }
.report-summary-grid article { padding: 13px; border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 10px; }
.report-summary-grid span, .report-summary-grid strong { display: block; }
.report-summary-grid span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.report-summary-grid strong { margin-top: 7px; font-size: 21px; }
.report-section { padding: 0 28px 24px; }
.report-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.report-section-heading h2 { margin: 0; font-size: 16px; }
.report-section-heading span { color: var(--muted); font-size: 9px; }
.report-table-wrap { border: 1px solid var(--line); border-radius: 10px; }
.report-table td:first-child strong, .report-table td:first-child small { display: block; }
.report-table td:first-child small { max-width: 230px; margin-top: 3px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; }
.print-report-footer { display: flex; justify-content: space-between; gap: 15px; padding: 14px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }

@media (max-width: 1100px) {
  .report-filter-grid { grid-template-columns: repeat(2, 1fr); }
  .report-summary-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .report-filter-grid { grid-template-columns: 1fr; }
  .report-filter-search { grid-column: auto; }
  .report-filter-actions { flex-wrap: wrap; }
  .print-report-header, .print-report-footer { flex-direction: column; }
  .print-report-meta { text-align: left; }
  .report-summary-grid { grid-template-columns: repeat(2, 1fr); padding: 16px; }
  .report-section { padding: 0 16px 20px; }
}

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  body { background: white !important; }
  .no-print, .sidebar, .topbar, .report-controls, .toast-container { display: none !important; }
  .main-content, .report-main { margin: 0 !important; padding: 0 !important; }
  .print-report { border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
  .print-report-header { padding: 15px 18px; }
  .print-filter-summary { padding: 8px 18px; }
  .report-summary-grid { grid-template-columns: repeat(6, 1fr); gap: 5px; padding: 10px 18px; }
  .report-summary-grid article { padding: 8px; }
  .report-summary-grid strong { font-size: 16px; }
  .report-section { padding: 0 18px 13px; break-inside: avoid; }
  .report-table-wrap, .table-wrap { overflow: visible; border: 0; }
  .report-table { table-layout: fixed; }
  .report-table th, .report-table td { padding: 5px 6px; white-space: normal; font-size: 7.5pt; word-break: break-word; }
  .report-table th { font-size: 6.5pt; }
  .report-table td:first-child small { max-width: none; }
  .print-report-footer { padding: 8px 18px; }
  tr { break-inside: avoid; }
}

/* Account management, destructive actions, and staff portal additions */
.button-danger { background: var(--danger); color: white; }
.danger-action { color: var(--danger); }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.avatar-small { width: 32px; height: 32px; border-radius: 10px; font-size: 10px; flex: 0 0 auto; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-color: #efc9c9; background: #fff8f8; }
.danger-zone h3 { margin-bottom: 4px; color: var(--danger); }
.danger-zone .panel-note { margin: 0; max-width: 580px; line-height: 1.55; }
.management-layout { display: grid; grid-template-columns: minmax(280px, .38fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.account-form-panel { position: sticky; top: 20px; }
.account-form { display: grid; gap: 15px; padding: 20px; }
code { border-radius: 6px; padding: 2px 5px; background: #f1f2f6; color: #3f4250; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }

@media (max-width: 1050px) {
  .management-layout { grid-template-columns: 1fr; }
  .account-form-panel { position: static; }
}
@media (max-width: 620px) {
  .danger-zone { align-items: stretch; flex-direction: column; }
  .row-actions { align-items: stretch; flex-direction: column; }
  .row-actions .table-action { text-align: left; }
}


/* STCQC branding */
.brand-lockup > div:last-child { min-width: 0; }
.brand-mark-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.brand-mark-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-lockup strong {
  line-height: 1.18;
}
.brand-lockup span {
  line-height: 1.35;
}
.sidebar .brand-lockup {
  align-items: flex-start;
}
.sidebar .brand-mark-logo {
  width: 50px;
  height: 50px;
  flex-basis: 50px;
}
.sidebar .brand-lockup strong {
  font-size: 13px;
}
.sidebar .brand-lockup span {
  max-width: 145px;
  font-size: 8.5px;
}
.public-nav .brand-lockup strong,
.auth-brand .brand-lockup strong {
  font-size: 16px;
}
.public-nav .brand-lockup span,
.auth-brand .brand-lockup span {
  max-width: 280px;
}
.print-logo {
  width: 62px;
  height: 62px;
  flex-basis: 62px;
}
@media (max-width: 680px) {
  .public-nav .brand-mark-logo { width: 46px; height: 46px; flex-basis: 46px; }
  .public-nav .brand-lockup strong { font-size: 13px; }
  .public-nav .brand-lockup span { max-width: 180px; font-size: 8px; }
}

/* Request form alignment and IT personnel workspace refinements */
.routing-field { align-self: start; }
.routing-field select { min-height: 56px; }
.staff-workspace .stats-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.staff-workspace .topbar-actions { margin-left: auto; }

@media (max-width: 1200px) {
  .staff-workspace .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .staff-workspace .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Secure ticket attachments */
.file-field input[type="file"],
.attachment-form input[type="file"] {
  padding: 9px;
  background: #fafafd;
}
.file-summary {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.45;
}
.attachment-list {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}
.attachment-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafafd;
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.attachment-item:hover {
  border-color: rgba(251, 188, 0, .8);
  background: #fffaf0;
  transform: translateY(-1px);
}
.attachment-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--brand);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .04em;
}
.attachment-copy {
  min-width: 0;
  flex: 1;
}
.attachment-copy strong,
.attachment-copy small {
  display: block;
}
.attachment-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}
.attachment-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}
.attachment-download {
  color: var(--info);
  font-size: 9px;
  font-weight: 850;
}
.attachment-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

@media (max-width: 620px) {
  .attachment-item { align-items: flex-start; }
  .attachment-download { display: none; }
}


/* Data privacy consent gate */
body.privacy-locked { overflow: hidden; }
.public-footer {
  width: min(1120px, calc(100% - 32px));
  margin: -32px auto 0;
  padding: 0 0 32px;
  text-align: center;
}
.privacy-review-link {
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.privacy-consent-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(8, 7, 37, .82);
  backdrop-filter: blur(8px);
}
.privacy-consent-card {
  width: min(920px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 24px;
  background: white;
  box-shadow: 0 32px 90px rgba(0, 0, 0, .34);
}
.privacy-consent-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 620px;
}
.privacy-seal-panel {
  display: grid;
  place-items: center;
  padding: 34px 24px;
  background:
    radial-gradient(circle at 50% 28%, rgba(251, 188, 0, .22), transparent 34%),
    linear-gradient(160deg, #0d0b39, var(--navy));
}
.privacy-seal-panel img {
  display: block;
  width: min(220px, 100%);
  max-height: 520px;
  object-fit: contain;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, .26));
}
.privacy-consent-content {
  padding: 34px 38px 32px;
}
.privacy-consent-content h2,
.privacy-declined-view h2 {
  margin-bottom: 10px;
  color: var(--navy);
  font-size: clamp(25px, 4vw, 34px);
}
.privacy-lead {
  margin-bottom: 20px;
  color: var(--muted);
  line-height: 1.65;
}
.privacy-summary-list {
  display: grid;
  gap: 10px;
}
.privacy-summary-list p {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid var(--brand);
  border-radius: 0 10px 10px 0;
  background: #f8f8fc;
  color: #4c5060;
  font-size: 12px;
  line-height: 1.58;
}
.privacy-summary-list strong { color: var(--navy); }
.privacy-details {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.privacy-details summary {
  padding: 12px 14px;
  color: var(--navy);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.privacy-details > div {
  padding: 0 14px 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.privacy-details p { margin: 8px 0 0; }
.privacy-confirmation {
  margin: 16px 0 0;
  color: #525667;
  font-size: 11px;
  line-height: 1.6;
}
.privacy-consent-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
.privacy-consent-actions .button { min-width: 142px; }
.privacy-declined-view {
  display: grid;
  justify-items: center;
  padding: 52px 34px;
  text-align: center;
}
.privacy-declined-view p:not(.eyebrow) {
  max-width: 590px;
  color: var(--muted);
  line-height: 1.7;
}
.privacy-declined-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 32px;
  font-weight: 900;
}

@media (max-width: 760px) {
  .privacy-consent-backdrop { padding: 12px; }
  .privacy-consent-layout { grid-template-columns: 1fr; }
  .privacy-seal-panel { padding: 18px; }
  .privacy-seal-panel img { width: 112px; max-height: 145px; }
  .privacy-consent-content { padding: 24px 20px 22px; }
  .privacy-consent-actions { flex-direction: column-reverse; }
  .privacy-consent-actions .button { width: 100%; }
  .privacy-declined-view { padding: 38px 22px; }
}
