body{font-family:Arial,sans-serif;margin:0;background:#f3f5f8;color:#0f172a}
a{color:#1d4ed8;text-decoration:none}a:hover{text-decoration:underline}
.container{max-width:1100px;margin:0 auto;padding:24px}
.topbar{background:#081a34;color:#fff}.topbar-inner{display:flex;justify-content:space-between;align-items:center;padding:18px 24px}.topbar-nav{display:flex;gap:14px;align-items:center}.topbar a{color:#fff}.inline-form{display:inline}.inline-form button,.topbar button{background:#1d5fbf;color:#fff;border:0;border-radius:8px;padding:10px 16px;cursor:pointer}.session-meta{font-size:12px;line-height:1.4;color:#dbeafe;text-align:right}
.page-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:20px}.actions-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.card{background:#fff;border:1px solid #d6dee8;border-radius:14px;padding:18px;margin-bottom:18px;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.form-grid{display:grid;gap:14px}.two-col{grid-template-columns:repeat(2,minmax(220px,1fr))}.three-col{grid-template-columns:repeat(3,minmax(180px,1fr))}.full-width{grid-column:1/-1}label{display:flex;flex-direction:column;gap:6px;font-weight:600}input,select,button{font:inherit}input,select{padding:10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff}button,.button-link{background:#0f3fa2;color:#fff;border:0;border-radius:8px;padding:10px 14px;cursor:pointer;display:inline-block}.button-link{text-decoration:none}
.repeat-row{display:grid;grid-template-columns:120px 1fr 1fr 160px 110px;gap:10px;margin-bottom:10px}
.stats-grid{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:12px}.stats-grid.compact{grid-template-columns:repeat(3,minmax(120px,1fr))}.stat .big{font-size:28px;font-weight:700}.muted{color:#64748b}.green-card{border-left:6px solid #22c55e}.yellow-card{border-left:6px solid #eab308}.red-card{border-left:6px solid #ef4444}
.badge{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:700}.badge-blue{background:#dbeafe;color:#1d4ed8}.badge-gray{background:#e5e7eb;color:#374151}.traffic-badge.green{background:#dcfce7;color:#166534}.traffic-badge.yellow{background:#fef9c3;color:#854d0e}.traffic-badge.red{background:#fee2e2;color:#991b1b}.traffic-badge.gray{background:#e5e7eb;color:#475569}.traffic-dot{display:inline-block;width:10px;height:10px;border-radius:999px;margin-right:6px;vertical-align:middle}.traffic-dot.green{background:#22c55e}.traffic-dot.yellow{background:#eab308}.traffic-dot.red{background:#ef4444}.traffic-dot.gray{background:#94a3b8}
.reference-card .reference-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.reference-status-pack{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.hidden{display:none}.success{color:#15803d}.danger{color:#b91c1c}.warning{color:#b45309}
.manifest-meta-grid{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:12px}.photo-manager{margin-top:14px;border:1px dashed #cbd5e1;border-radius:10px;padding:12px}.photo-manager-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.photo-item{display:flex;align-items:center;gap:8px;padding:6px 0}.photo-item button{background:#b91c1c}.photo-list-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.photo-list-grid img{width:100%;max-height:180px;object-fit:cover;border-radius:10px;border:1px solid #cbd5e1}.status-line{margin-top:12px;font-size:14px}.narrow{max-width:700px;margin:0 auto}.flash-wrap{margin-bottom:16px}.flash{padding:10px 14px;border-radius:8px;margin-bottom:8px}.flash.success{background:#dcfce7;color:#166534}.flash.warning{background:#fef9c3;color:#854d0e}.flash.danger{background:#fee2e2;color:#991b1b}
table{width:100%;border-collapse:collapse}th,td{padding:10px;border:1px solid #d6dee8;text-align:left;vertical-align:top}thead th{background:#eef2f7}
@media (max-width: 900px){.two-col,.three-col,.manifest-meta-grid,.stats-grid,.stats-grid.compact,.repeat-row{grid-template-columns:1fr}.topbar-inner,.page-header,.reference-card .reference-head{flex-direction:column;align-items:flex-start}.reference-status-pack{justify-content:flex-start}.container{padding:16px}}


/* AUTH1_SIMULATED_DELIVERY_CSS */
.auth-simulation-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #b8d4ff;
  background: #f7fbff;
  border-radius: 10px;
}

.auth-sim-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
  color: #073763;
}

.auth-sim-row {
  margin: 5px 0;
}

.auth-link-box {
  margin: 6px 0 10px 0;
  padding: 8px;
  background: #fff;
  border: 1px solid #d5dce8;
  border-radius: 6px;
  word-break: break-all;
  font-family: monospace;
  font-size: 13px;
}

.auth-sim-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.secondary-btn {
  background: #475569;
  color: white;
}

.success-btn {
  background: #15803d;
  color: white;
}

.danger-btn {
  background: #b91c1c;
  color: white;
}

.auth-sim-status {
  margin-top: 10px;
  font-weight: 600;
}

.auth-sim-status.success {
  color: #15803d;
}

.auth-sim-status.error {
  color: #b91c1c;
}


/* AUTH1C_PHOTO_SEQUENCE_UX */
.photo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.photo-help {
  margin: 6px 0 10px 0;
  color: #475569;
  font-size: 14px;
}

.uploaded-photos-title {
  margin-top: 10px;
  font-weight: 700;
  color: #0f172a;
}

.photo-count {
  font-weight: 700;
  color: #0f172a;
  background: #eaf2ff;
  padding: 4px 10px;
  border-radius: 999px;
}

.actions-row button {
  margin-right: 6px;
}


/* AUTH1E_LIGHT_GUIDED_WORKFLOW */
.workflow-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.wf-step {
  padding: 7px 12px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #334155;
  font-weight: 700;
  font-size: 13px;
}

.next-action-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 5px solid #0b4ea2;
  background: #f8fbff;
  border-radius: 8px;
}

.status-line.global-status.error {
  color: #b91c1c;
  font-weight: 700;
}

.status-line.global-status.success {
  color: #15803d;
  font-weight: 700;
}


/* LABEL1_SHEET_INTAKE */
textarea {
  width: 100%;
  font-family: monospace;
  min-height: 160px;
}

.button-link {
  display: inline-block;
  background: #0b4ea2;
  color: white !important;
  padding: 9px 14px;
  border-radius: 7px;
  text-decoration: none;
  margin-right: 8px;
}

.manifest-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}


/* WAREHOUSE1_INVENTORY */
.badge-green {
  background: #dcfce7;
  color: #166534;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
}


/* DASHBOARD1_DRILLDOWNS */
.stat-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.stat-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}


/* OUTBOUND1F_TABLE_FIX */
.table-wide {
  overflow-x: auto;
}

.table-wide table {
  min-width: 1180px;
}

.photo-grid img {
  object-fit: contain;
  background: #f8fafc;
}

/* BILLING-2A LAYOUT FIX */
.card.table-wide {
  max-width: none;
  width: 100%;
  overflow-x: auto;
}

.card.table-wide table {
  width: max-content;
  min-width: 1250px;
}

.card.table-wide th,
.card.table-wide td {
  white-space: nowrap;
  vertical-align: top;
}

.card.table-wide td:nth-child(2),
.card.table-wide td:nth-child(3) {
  white-space: normal;
  min-width: 140px;
}

.main-container,
.container {
  max-width: 1280px;
}


/* BILLING2B_TRACEABILITY */
.trace-table-wrap {
  overflow-x: auto;
}

.trace-table-wrap table {
  min-width: 1200px;
}

.trace-table-wrap th,
.trace-table-wrap td {
  white-space: nowrap;
}


/* BILLING2B1_CHARGE_CLARITY */
.billing-detail-table {
  margin-bottom: 22px;
}

.billing-detail-table th,
.billing-detail-table td {
  white-space: nowrap;
}

.billing-grand-total {
  margin-top: 18px;
  padding: 16px;
  background: #eef6ff;
  border-left: 5px solid #0047ab;
  font-size: 1.35rem;
  font-weight: 800;
}


/* NAV_BUTTON_FIX */
nav, .top-nav, header nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-button {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  background: #0047ab;
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.nav-button:hover {
  filter: brightness(1.08);
}

@media (max-width: 900px) {
  nav, .top-nav, header nav {
    justify-content: flex-start;
    gap: 8px;
  }

  .nav-button {
    padding: 12px 14px;
    font-size: 1rem;
  }
}


/* UX_OFFICE_PROCESS_V1 */
.process-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.process-card h2 {
  margin-top: 0;
  letter-spacing: 0.03em;
}

.workflow-steps {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.workflow-steps a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  text-decoration: none;
  font-weight: 800;
  color: #001233;
}

.workflow-steps a:hover {
  background: #e0ecff;
}

.inbound-card { border-left: 6px solid #16a34a; }
.outbound-card { border-left: 6px solid #2563eb; }
.billing-card { border-left: 6px solid #7c3aed; }
.reports-card { border-left: 6px solid #f59e0b; }

.table-wide {
  overflow-x: auto;
}

@media (max-width: 900px) {
  .process-grid {
    grid-template-columns: 1fr;
  }
}


/* UX2B_OPERATIONAL_PERIOD */
.period-card {
  margin-bottom: 18px;
  border-left: 6px solid #0f766e;
}

.period-form {
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 16px;
  align-items: end;
}

.period-form h2 {
  margin: 0 0 6px 0;
}

.period-form input[type="month"] {
  min-height: 44px;
}

.process-kpi {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}

@media (max-width: 900px) {
  .period-form {
    grid-template-columns: 1fr;
  }
}


/* DASHBOARD_UX2C_PREMIUM */
.dashboard-shell {
  max-width: 1450px;
  margin: 0 auto;
}

.dashboard-title-row {
  margin-bottom: 22px;
}

.dashboard-title-row h1 {
  margin-bottom: 4px;
}

.dashboard-subtitle {
  color: #536b92;
  font-weight: 600;
  margin: 0;
}

.premium-card {
  background: #ffffff;
  border: 1px solid #cbd8ea;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.period-card {
  padding: 24px;
  margin-bottom: 20px;
  border-left: 7px solid #0f8b8d;
}

.period-line {
  margin: 8px 0 0 0;
  color: #536b92;
}

.period-form {
  display: grid;
  grid-template-columns: 1fr 250px auto;
  gap: 18px;
  align-items: end;
}

.period-form h2 {
  margin: 0 0 8px 0;
}

.period-form input[type="month"] {
  height: 48px;
  font-size: 1rem;
  font-weight: 700;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.kpi-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 88px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #cbd8ea;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.kpi-card span {
  display: block;
  color: #536b92;
  font-weight: 700;
  margin-bottom: 6px;
}

.kpi-card strong {
  display: block;
  font-size: 2rem;
  color: #001233;
}

.kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.3rem;
  background: #f1f5f9;
}

.kpi-inbound { border-left: 5px solid #0f8b8d; }
.kpi-outbound { border-left: 5px solid #2563eb; }
.kpi-warning { border-left: 5px solid #f59e0b; }
.kpi-billing { border-left: 5px solid #7c3aed; }
.kpi-success { border-left: 5px solid #22c55e; }

.kpi-inbound .kpi-icon { color: #0f8b8d; }
.kpi-outbound .kpi-icon { color: #2563eb; }
.kpi-warning .kpi-icon { color: #f59e0b; }
.kpi-billing .kpi-icon { color: #7c3aed; }
.kpi-success .kpi-icon { color: #16a34a; }

.premium-process-grid {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  margin-bottom: 22px;
}

.process-card {
  padding: 24px;
}

.process-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.process-header h2 {
  margin: 0;
  letter-spacing: 0.06em;
}

.process-pill {
  font-size: .8rem;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
}

.inbound-pill, .inbound-soft {
  background: #e6fffa;
  color: #0f766e;
}

.outbound-pill, .outbound-soft {
  background: #e8f0ff;
  color: #1d4ed8;
}

.control-pill, .control-soft {
  background: #fff7ed;
  color: #ea580c;
}

.inbound-card { border-left: 7px solid #0f8b8d; }
.outbound-card { border-left: 7px solid #2563eb; }
.control-card { border-left: 7px solid #f59e0b; }

.process-kpi {
  margin: 14px 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
}

.premium-steps {
  border-top: 1px solid #dbe5f2;
  padding-top: 14px;
}

.premium-steps a {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 9px 4px;
  color: #075bd8;
}

.premium-steps a span {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #e8f0ff;
  color: #075bd8;
  font-weight: 900;
  font-size: .82rem;
}

.premium-steps a:hover {
  background: #f1f5f9;
}

.dashboard-lower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.dashboard-lower-grid .premium-card {
  padding: 22px;
}

.table-wide {
  overflow-x: auto;
}

@media (max-width: 1100px) {
  .kpi-row,
  .premium-process-grid,
  .dashboard-lower-grid {
    grid-template-columns: 1fr;
  }

  .period-form {
    grid-template-columns: 1fr;
  }
}


/* DASHBOARD_UX2C_STACK_TABLES */
.dashboard-lower-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 18px !important;
  width: 100%;
}

.dashboard-lower-grid > .premium-card {
  width: 100%;
  min-width: 0;
}

.dashboard-lower-grid table {
  width: 100%;
}

/* HEADER_LOGO_LAYOUT_FIX_V2 */
header {
  padding: 16px 48px !important;
  gap: 28px !important;
}

.brand-logo {
  height: 54px !important;
  width: auto !important;
  display: block !important;
  background: white;
  border-radius: 8px;
  padding: 4px 10px;
}

main {
  padding-top: 36px !important;
}

nav {
  gap: 12px !important;
  margin-left: 24px !important;
  flex-wrap: wrap;
}

.nav-button {
  margin: 2px 0;
}


/* BILLING4A2_RATE_RULES_UI */
.table-wide input,
.table-wide select {
  min-width: 120px;
}

.table-wide .description {
  min-width: 240px;
}

.table-wide .rule-code {
  min-width: 180px;
}


/* BILLING4A2B_LAYOUT_POLISH */
.billing-rates-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 42px 40px 42px;
}

.billing-rates-header {
  align-items: flex-start;
  margin-bottom: 18px;
}

.billing-rates-header h1 {
  margin-bottom: 6px;
}

.billing-rates-header .actions-row {
  margin-top: 8px;
  gap: 10px;
}

.billing-rates-container .card {
  margin-bottom: 18px;
  padding: 20px 22px;
}

.billing-rates-container .form-grid {
  gap: 18px;
}

.rate-rules-card {
  overflow-x: auto;
}

.rate-rules-card table {
  width: 100%;
  min-width: 1050px;
}

.rate-rules-card th {
  white-space: nowrap;
}

.rate-rules-card td input,
.rate-rules-card td select {
  width: 100%;
  box-sizing: border-box;
}

.rate-rules-card .page-header {
  margin-bottom: 12px;
}

#addRateRowBtn {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .billing-rates-container {
    padding: 22px 20px;
  }

  .billing-rates-header {
    flex-direction: column;
    gap: 12px;
  }

  .billing-rates-header .actions-row {
    margin-top: 0;
  }
}


/* BILLING4A3_CHARGE_ITEMS_LAYOUT */
.charge-row-grid {
  display: grid;
  grid-template-columns: minmax(260px, 2.4fr) 80px 95px 95px 95px 105px 115px 105px 115px 90px;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px dashed #cbd5e1;
}

.charge-row-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
}

.charge-row-grid input,
.charge-row-grid select {
  width: 100%;
  box-sizing: border-box;
}

.charge-concept-field select {
  min-width: 260px;
}

.charge-concept-field small {
  min-height: 32px;
  line-height: 1.25;
  font-weight: 400;
}

.charge-small-field input[readonly] {
  background: #f8fafc;
}

.charge-total-field input {
  font-weight: 800;
  background: #f1f5f9;
}

.charge-remove-btn {
  align-self: end;
  min-height: 42px;
  white-space: nowrap;
}

.charge-items {
  overflow-x: auto;
}

.closeout-card .reference-total {
  font-size: 1.1rem;
  font-weight: 800;
}

@media (max-width: 1200px) {
  .charge-row-grid {
    grid-template-columns: minmax(240px, 1.8fr) repeat(4, 95px);
  }

  .charge-remove-btn {
    grid-column: span 1;
  }
}


/* AUDIT5A2D_REVERSE_CLOSEOUT_UI */
.danger-button {
  background: #b91c1c !important;
  border-color: #991b1b !important;
  color: white !important;
}

.danger-button:hover {
  background: #991b1b !important;
}


/* CLOSEOUT_UI_BILLABLE_ITEMS_V1 */
.manifest-detail-container {
  max-width: 1480px;
  margin: 0 auto;
  padding: 26px 34px 48px 34px;
}

.closeout-card {
  padding: 22px 24px !important;
}

.warehouse-summary-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.compact-button {
  padding: 8px 12px !important;
  font-size: 0.9rem !important;
}

.billable-row-grid {
  display: grid;
  grid-template-columns: minmax(360px, 2.6fr) 90px 110px 125px 135px 100px;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px dashed #cbd5e1;
}

.billable-row-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 800;
}

.billable-row-grid input,
.billable-row-grid select {
  width: 100%;
  box-sizing: border-box;
}

.billable-row-grid .charge-concept-field select {
  min-width: 360px;
  font-weight: 700;
}

.billable-row-grid .concept-description {
  min-height: 28px;
  font-weight: 400;
}

.billable-row-grid .costing-hidden {
  display: none !important;
}

.billable-row-grid .charge-total-field input {
  font-weight: 900;
  background: #f1f5f9;
}

.billable-row-grid .charge-remove-btn {
  align-self: end;
  min-height: 42px;
}

.charge-items {
  overflow-x: auto;
}

@media (max-width: 1100px) {
  .manifest-detail-container {
    padding: 22px 18px;
  }

  .billable-row-grid {
    grid-template-columns: 1fr 90px 100px;
  }
}


/* BILLING4A5_INVOICE_SIMPLIFICATION */
.other-description-field {
  display: none;
  grid-column: 1 / span 2;
}

.other-description-field input {
  width: 100%;
}

.editable-rate {
  background: #fff7ed !important;
  border-color: #fb923c !important;
}

.billable-row-grid {
  grid-template-columns: minmax(420px, 2.6fr) 90px 110px 130px 140px 100px;
}


/* PHOTO_COMPLIANCE_1A */
.photo-compliance-box {
  margin-top: 8px;
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.86rem;
}

.compliance-ok {
  background: #dcfce7;
  color: #166534;
}

.compliance-warning {
  background: #fef3c7;
  color: #92400e;
}

/* UX-LAYOUT-1A: readable page width */
body {
  margin: 0;
}

main,
.page-content,
.content,
.container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.card,
.soft-card {
  max-width: 100%;
  box-sizing: border-box;
}

.table-wide,
.billing-print-page {
  overflow-x: auto;
}

.billing-print-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

@media (max-width: 768px) {
  main,
  .page-content,
  .content,
  .container,
  .billing-print-page {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ABD-UX-WIDE-LAYOUT-1B */
main,
.page-content,
.content,
.container,
.billing-print-page {
  width: min(92vw, 1800px);
  max-width: 1800px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

.card,
.soft-card,
.table-wide {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.table-wide,
.table-container {
  overflow-x: visible;
}

table {
  width: 100%;
}

@media (min-width: 1920px) {
  main,
  .page-content,
  .content,
  .container,
  .billing-print-page {
    width: min(94vw, 2000px);
    max-width: 2000px;
  }
}

@media (max-width: 900px) {
  main,
  .page-content,
  .content,
  .container,
  .billing-print-page {
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  .table-wide,
  .table-container {
    overflow-x: auto;
  }
}

/* ABD-BILLING-PDF-COMPACT-1A */
@media print {
  body {
    background: #fff !important;
    font-size: 10px;
  }

  nav,
  header,
  .no-print,
  .page-header,
  button,
  .actions-row {
    display: none !important;
  }

  .billing-print-page {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
  }

  .billing-print-page .card {
    padding: 10px 14px;
    margin: 0 0 8px 0;
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #d7dee8;
  }

  .billing-print-page h1 {
    font-size: 20px;
    margin: 0 0 8px 0;
  }

  .billing-print-page h2 {
    font-size: 15px;
    margin: 0 0 8px 0;
  }

  .billing-print-page h3 {
    font-size: 12px;
    margin: 6px 0;
  }

  .billing-detail-table th,
  .billing-detail-table td {
    padding: 4px 6px;
    font-size: 9.5px;
  }

  .billing-grand-total {
    font-size: 14px;
    padding: 8px 12px;
    margin-top: 8px;
  }

  .photo-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }

  .photo-grid img {
    max-height: 120px !important;
    object-fit: contain;
  }

  @page {
    size: Letter portrait;
    margin: 0.35in;
  }
}

/* ABD-BILLING-PDF-PHOTO-LAYOUT-1B */
@media print {
  .photo-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    align-items: start;
  }

  .photo-grid > div {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .photo-grid img {
    width: 100% !important;
    height: 260px !important;
    max-height: 260px !important;
    object-fit: contain !important;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
  }

  .photo-grid > div:only-child {
    grid-column: 1 / -1;
  }

  .photo-grid > div:only-child img {
    height: 360px !important;
    max-height: 360px !important;
  }

  .photo-grid .muted {
    text-align: center;
    font-size: 9px;
    margin-top: 4px;
  }
}

/* ABD-HEADER-UX-1A */
body > header,
.app-header,
header {
  position: relative;
  min-height: 96px;
  padding: 18px 48px 12px 48px;
  box-sizing: border-box;
}

/* Logo ABD: right side, no patch/card feeling */
img[src*="abd_group_logo"] {
  position: absolute;
  top: 18px;
  right: 48px;
  width: 170px;
  max-height: 72px;
  object-fit: contain;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

/* Role label */
header,
.app-header {
  color: #0f172a;
}

header div,
.app-header div {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

header div:has(+ nav),
.app-header div:has(+ nav) {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}

/* Nav no debe meterse debajo del logo */
nav {
  padding-right: 230px;
}

/* Mobile/tablet */
@media (max-width: 900px) {
  img[src*="abd_group_logo"] {
    position: static;
    width: 120px;
    display: block;
    margin-bottom: 8px;
  }

  nav {
    padding-right: 0;
  }

  body > header,
  .app-header,
  header {
    padding: 14px 16px;
  }
}


/* ABD-HEADER-HERO-1A */
@media screen {
  body > header,
  header {
    position: relative;
    min-height: 250px;
    padding: 44px 64px 28px 64px !important;
    box-sizing: border-box;
    background:
      radial-gradient(circle at 75% 15%, rgba(255,255,255,0.95), rgba(241,245,249,0.75) 34%, transparent 58%),
      linear-gradient(135deg, #f8fafc 0%, #eef4ff 48%, #e8eef8 100%);
    border-bottom: 1px solid #dbe4f0;
    overflow: hidden;
  }

  body > header::after,
  header::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(150deg, transparent 0%, transparent 42%, rgba(255,255,255,0.55) 43%, transparent 66%);
    pointer-events: none;
  }

  img[src*="abd_group_logo"] {
    position: absolute !important;
    top: 48px !important;
    right: 82px !important;
    width: 260px !important;
    max-height: 150px !important;
    object-fit: contain !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    z-index: 2;
  }

  header div {
    position: relative;
    z-index: 2;
  }

  header div:not(:has(*)) {
    color: #0f172a;
  }

  header div:has(+ nav),
  header .role-label {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 2px;
  }

  header div:has(+ nav)::after {
    content: "";
    display: block;
    width: 72px;
    height: 4px;
    background: #174ea6;
    border-radius: 999px;
    margin-top: 10px;
    margin-bottom: 34px;
  }

  nav {
    position: relative;
    z-index: 2;
    padding-right: 340px !important;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
  }

  nav a,
  nav button {
    border-radius: 10px !important;
    box-shadow: 0 8px 18px rgba(0, 55, 160, 0.18);
  }
}

@media screen and (max-width: 900px) {
  body > header,
  header {
    min-height: auto;
    padding: 24px 18px !important;
  }

  img[src*="abd_group_logo"] {
    position: static !important;
    width: 150px !important;
    display: block;
    margin-bottom: 14px;
  }

  nav {
    padding-right: 0 !important;
  }
}


/* ABD-LOGIN-UX-1B */
body:has(.login-page-shell) {
  background:
    radial-gradient(circle at 50% 10%, rgba(255,255,255,0.95), rgba(241,245,249,0.78) 42%, transparent 70%),
    linear-gradient(135deg, #f8fafc 0%, #eef4ff 48%, #e8eef8 100%);
}

body:has(.login-page-shell) > header {
  min-height: 190px !important;
  padding: 36px 0 10px 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

body:has(.login-page-shell) header img[src*="abd_group_logo"] {
  position: static !important;
  width: 220px !important;
  max-height: 130px !important;
  display: block !important;
  margin: 0 auto !important;
}

.login-page-shell {
  width: min(92vw, 620px);
  margin: 0 auto;
  padding-top: 28px;
}

.login-page-shell .card {
  width: 100%;
  max-width: 620px;
  padding: 28px 34px;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.login-page-shell h1,
.login-page-shell h2 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 22px;
}

.login-page-shell input[type="text"],
.login-page-shell input[type="password"] {
  height: 42px;
  font-size: 15px;
}

.login-page-shell button {
  height: 44px;
  font-size: 15px;
  font-weight: 700;
  margin-top: 10px;
}

.login-page-shell .muted {
  text-align: center;
  line-height: 1.5;
  margin-top: 16px;
}


/* ABD-LOGIN-PASSWORD-TOGGLE-1A */
.password-toggle-wrap {
  position: relative;
  width: 100%;
}

.password-toggle-wrap input[type="password"],
.password-toggle-wrap input[type="text"] {
  width: 100%;
  padding-right: 74px;
  box-sizing: border-box;
}

.toggle-password-btn {
  position: absolute;
  right: 8px;
  top: 8px;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 12px !important;
  margin: 0 !important;
  border-radius: 8px;
  font-size: 12px !important;
  font-weight: 700;
  width: auto !important;
}

.disabled-nav-link {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.35);
}

.disabled-nav-link {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.35);
}
