/* Service requests and the Axiata brand layer. Brand colours are sampled from the supplied Axiata logo (same
   values as the Micro Games project). Cobalt stays the action colour and red/amber/teal keep their status
   meaning, so brand colour is identity only and never reads as a breach. */
:root {
  --ax-yellow: #fcb434;
  --ax-orange: #f49424;
  --ax-red: #ec6c24;
  --ax-pink: #ec3c84;
  --ax-crimson: #b4234f;
  --ax-plum: #8b2f6e;
  --ax-gradient: linear-gradient(120deg, #fcb434 0%, #f49424 26%, #ec6c24 44%, #ec3c84 70%, #8b2f6e 100%);
  --ax-accent-text: #8b2f6e;
  --ax-accent-soft: #f7ecf3;
}
:root[data-theme='dark'] {
  --ax-accent-text: #f0a3cf;
  --ax-accent-soft: #33203a;
}

/* Brand: logo in the rail and on sign-in, thin gradient under the top bar and on the rail edge. */
.topbar { position: relative; }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--ax-gradient); pointer-events: none; }
.wordmark { display: flex; align-items: center; gap: 10px; }
.brand-logo { display: block; height: 30px; width: auto; flex: 0 0 auto; }
.wordmark-stack { display: grid; line-height: 1.15; min-width: 0; }
[data-rail='collapsed'] .rail .wordmark-stack { display: none; }
[data-rail='collapsed'] .rail .brand-logo { height: 22px; }
.rail-link.is-active { box-shadow: inset 3px 0 0 var(--ax-pink); }
.auth-brand-logo { display: block; height: 40px; width: auto; }
.auth-brand-logo-dark { display: none; }
:root[data-theme='dark'] .auth-brand-logo-light { display: none; }
:root[data-theme='dark'] .auth-brand-logo-dark { display: block; }
.auth-card { position: relative; overflow: hidden; }
.auth-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--ax-gradient); }

/* List */
.req-head-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.req-toolbar { display: grid; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.req-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); }
.req-tab { min-height: 40px; padding: 0 14px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--text-2); font: inherit; font-weight: 500; cursor: pointer; }
.req-tab:hover { color: var(--text); }
.req-tab.is-active { color: var(--text); border-bottom-color: var(--ax-pink); }
.req-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.req-inline { display: grid; gap: 4px; font-size: 0.75rem; color: var(--text-2); }
.req-inline .input { min-width: 220px; }
.req-scroll { overflow-x: auto; }
.data-table.req-table { table-layout: auto; min-width: 640px; }
.data-table.req-table th { position: static; }
.req-link { display: grid; gap: 2px; min-height: 44px; align-content: center; text-decoration: none; color: inherit; }
.req-link:hover .req-title { text-decoration: underline; }
.req-title { font-weight: 600; color: var(--text); }
.req-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--ax-pink); }

/* Wizard */
.req-wizard { display: grid; gap: 16px; padding: 20px; outline: none; }
.req-steps { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0 0 12px; list-style: none; border-bottom: 1px solid var(--border); color: var(--text-3); font-size: 0.8rem; }
.req-steps li { display: flex; align-items: center; gap: 8px; }
.req-step-n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border-strong); font-weight: 600; font-size: 0.75rem; }
.req-steps .is-current { color: var(--text); font-weight: 600; }
.req-steps .is-current .req-step-n { border-color: var(--ax-plum); background: var(--ax-plum); color: #fff; }
.req-steps .is-done .req-step-n { border-color: var(--teal); color: var(--teal-text); }
.req-h { margin: 0; font-size: 1.05rem; }
.req-note { margin: 0; padding: 10px 12px; border-left: 3px solid var(--ax-plum); background: var(--ax-accent-soft); border-radius: var(--r-sm); font-size: 0.85rem; }
.req-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.req-card { display: grid; gap: 6px; justify-items: start; text-align: left; padding: 18px; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.req-card svg { color: var(--ax-accent-text); }
.req-card strong { font-size: 1.05rem; }
.req-card span { color: var(--text-2); font-size: 0.85rem; }
.req-card small { color: var(--text-3); font-size: 0.78rem; }
.req-card:hover { border-color: var(--ax-plum); }
.req-card.is-selected { border-color: var(--ax-plum); box-shadow: 0 0 0 2px var(--ax-plum); background: var(--ax-accent-soft); }
.req-options { display: grid; gap: 8px; }
.req-option { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); cursor: pointer; }
.req-option input { margin-top: 3px; }
.req-option strong { display: block; font-size: 0.9rem; }
.req-option small { color: var(--text-3); font-size: 0.78rem; }
.req-option:hover { border-color: var(--border-strong); }
.req-option.is-selected { border-color: var(--ax-plum); background: var(--ax-accent-soft); }
.req-switch { justify-self: start; }
.req-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; }
.req-actions .btn { min-height: 40px; }

/* Form */
.req-form { display: grid; gap: 14px; }
.req-form-type { display: grid; gap: 2px; margin: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); font-size: 0.8rem; color: var(--text-2); }
.req-form-type strong { font-size: 0.95rem; color: var(--text); }
.req-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.req-wide { grid-column: 1 / -1; }
.req-field { display: grid; gap: 5px; min-width: 0; }
.req-field label { font-size: 0.8rem; font-weight: 600; color: var(--text-2); }
.req-field .input, .req-field .select, .req-field .textarea { width: 100%; min-width: 0; }
.req-required { color: var(--red-text); }
.req-optional { font-weight: 400; color: var(--text-3); }
.req-field.has-error .input, .req-field.has-error .select, .req-field.has-error .textarea { border-color: var(--red); }
.req-error { color: var(--red-text); font-size: 0.78rem; }

/* Attachments */
.req-file { max-width: 100%; min-height: 40px; font: inherit; font-size: 0.85rem; color: var(--text-2); }
.req-file::file-selector-button { min-height: 36px; margin-right: 10px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; }
.req-hint { color: var(--text-3); font-size: 0.78rem; }
.req-files { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0; padding: 0; list-style: none; font-size: 0.82rem; }
.req-files li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.req-files .btn { max-width: 100%; white-space: normal; text-align: left; height: auto; min-height: 32px; }
.req-attached h3 { margin: 14px 0 8px; font-size: 0.8rem; font-weight: 600; color: var(--text-2); }
.req-msg .req-files { margin-top: 8px; }

/* Detail */
.req-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.req-main, .req-side { display: grid; gap: 16px; min-width: 0; }
.req-details { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.req-details th, .req-details td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.req-details th { width: 34%; color: var(--text-2); font-weight: 600; }
.req-details td { white-space: pre-wrap; overflow-wrap: anywhere; }
.req-pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.req-thread { display: grid; gap: 12px; }
.req-msg { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); }
.req-msg header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 0.78rem; color: var(--text-3); }
.req-msg header strong { color: var(--text); font-size: 0.85rem; }
.req-msg.is-client { border-left: 3px solid var(--ax-plum); }
.req-msg.is-internal { border-style: dashed; background: var(--amber-soft); }
.req-compose { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.req-compose label { font-size: 0.8rem; font-weight: 600; color: var(--text-2); }
.req-history { display: grid; gap: 10px; margin: 0; padding: 14px 16px; list-style: none; font-size: 0.82rem; }
.req-history li { display: grid; gap: 1px; }
.req-history small { color: var(--text-3); }
.req-saved { margin: 0; padding: 0 16px 14px; font-size: 0.78rem; }
@media (max-width: 980px) { .req-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .req-wizard { padding: 14px; } .req-actions { justify-content: stretch; } .req-actions .btn { flex: 1 1 140px; } .req-inline .input { min-width: 0; width: 100%; } .req-filters > * { flex: 1 1 100%; } .req-details th { width: 42%; } }
