/* Byte ICT house style. Fonts and images are served by the app itself (no CDN). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter/inter-latin-400-normal.f837d382a885.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter/inter-latin-600-normal.75fb76ec3559.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter/inter-latin-700-normal.3714175d15f3.woff2") format("woff2"); }

:root {
  --navy: #0b1f3a;
  --navy-2: #14315b;
  --accent: #0077b6;        /* buttons and links; white text on it passes WCAG AA */
  --accent-hover: #005f92;
  --coral: #ee746c;         /* logo colour, used sparingly */
  --grey: #f3f5f8;
  --grey-2: #e6eaf0;
  --border: #d8dde6;
  --text: #111418;
  --muted: #5a6472;
  --danger: #c62828;
  --success: #2e7d32;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); line-height: 1.6; background: #fff; font-size: 15px; }
h1, h2, h3 { color: var(--navy); font-weight: 700; line-height: 1.25; }
h1 { font-size: 1.6rem; margin: .2rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.4rem 0 .6rem; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }

.topbar { background: var(--navy); color: #fff; padding: .55rem 1.2rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 3px solid var(--coral); }
.brand { display: flex; align-items: center; gap: .8rem; color: #fff; text-decoration: none; }
.brand img { height: 28px; width: auto; display: block; }
.brand span { font-weight: 600; letter-spacing: .02em; opacity: .9; }
.topbar-user { font-size: .9rem; }
.topbar-user .link { color: #fff; }
.layout { display: flex; min-height: calc(100vh - 3.4rem); }
.sidebar { width: 14rem; background: var(--grey); padding: 1rem .8rem; display: flex; flex-direction: column; gap: .15rem; border-right: 1px solid var(--border); }
.sidebar a { color: var(--text); text-decoration: none; padding: .3rem .6rem; border-radius: 5px; }
.sidebar a:hover { background: var(--grey-2); }
.nav-heading { margin: 1rem 0 .25rem .6rem; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.content { flex: 1; padding: 1.5rem 2rem; max-width: 76rem; min-width: 0; }

table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .93rem; }
th, td { border-bottom: 1px solid var(--border); padding: .45rem .6rem; text-align: left; vertical-align: top; }
th { background: var(--grey); color: var(--navy); font-weight: 600; }
tbody tr:hover { background: #fafbfd; }
form.inline { display: inline; }
button, .button { background: var(--accent); color: #fff; border: 0; padding: .5rem 1rem; border-radius: 6px; cursor: pointer; text-decoration: none; display: inline-block; font: inherit; font-weight: 600; }
button:hover, .button:hover { background: var(--accent-hover); color: #fff; }
button:disabled { background: #9aa5b5; cursor: not-allowed; }
button.link { background: none; color: inherit; padding: 0 0 0 .5rem; text-decoration: underline; font-weight: 400; }
button.danger { background: var(--danger); }
.field { margin: .7rem 0; }
.field label { display: block; font-weight: 600; margin-bottom: .15rem; }
input, select, textarea { font: inherit; border: 1px solid var(--border); border-radius: 5px; padding: .4rem .5rem; background: #fff; }
.field input[type=text], .field input[type=number], .field input[type=email], .field select, .field textarea { width: 100%; max-width: 32rem; }
.help { color: var(--muted); font-size: .88rem; margin: .15rem 0; }
.errorlist { color: var(--danger); margin: .2rem 0; padding-left: 1rem; }
.message { padding: .6rem .9rem; border-radius: 6px; background: #e8f4fb; border-left: 4px solid var(--accent); }
.message-error { background: #fdecea; border-left-color: var(--danger); }
.message-success { background: #e8f5e9; border-left-color: var(--success); }
.status-success { color: var(--success); } .status-failed { color: var(--danger); }
.muted { color: var(--muted); }
fieldset { border: 1px solid var(--border); border-radius: 6px; margin: 1rem 0; padding: .5rem 1rem; }
legend { font-weight: 600; color: var(--navy); padding: 0 .3rem; }

/* Sign-in pages */
.page-login { background: var(--navy); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-card { background: #fff; border-radius: 10px; padding: 2rem 2.2rem; max-width: 26rem; width: 100%; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); border-top: 4px solid var(--coral); }
.login-logo { background: var(--navy); border-radius: 8px; padding: .9rem 1rem; margin-bottom: 1.2rem; }
.login-logo img { height: 36px; width: auto; display: block; }
.tagline { color: var(--muted); font-style: italic; margin-top: -.6rem; }
.login-card .button { width: 100%; text-align: center; padding: .7rem 1rem; margin-top: .5rem; }

.ticket-layout { display: flex; gap: 2rem; align-items: flex-start; }
.ticket-main { flex: 2; min-width: 0; }
.ticket-side { flex: 1; background: var(--grey); padding: 0 1rem 1rem; border-radius: 4px; }
.reply { border: 1px solid var(--border); border-radius: 4px; padding: .6rem .9rem; margin: .8rem 0; }
.reply-internal { background: #fff8e1; border-color: #ffe082; }
.reply header { display: flex; gap: .6rem; flex-wrap: wrap; align-items: baseline; }
.reply-body { margin-top: .4rem; overflow-wrap: anywhere; }
.tag { font-size: .75rem; background: #e3e8ef; border-radius: 3px; padding: 0 .35rem; }
.change { font-size: .85rem; margin: .2rem 0; }
.attachments { margin: .4rem 0 0; padding-left: 1.2rem; }
@media (max-width: 900px) { .ticket-layout { flex-direction: column; } .layout { flex-direction: column; } .sidebar { width: auto; } }
.sla { font-size: .8rem; border-radius: 3px; padding: 0 .35rem; white-space: nowrap; }
.sla-breached { background: #fdecea; color: #b71c1c; font-weight: 600; }
.sla-at_risk { background: #fff3e0; color: #e65100; font-weight: 600; }
.sla-paused { background: #e3e8ef; color: #37474f; }
.sla-ok, .sla-met { background: #e8f5e9; color: #1b5e20; }
.sla-none { color: #666; }
.sla-table th { width: 6rem; background: none; }
.filters { background: var(--grey); border-radius: 4px; padding: .5rem 1rem; margin: 1rem 0; }
.filters summary { cursor: pointer; font-weight: 600; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0 1rem; }
.filter-grid select[multiple] { width: 100%; min-height: 5.5rem; }
.filter-grid input[type=text], .filter-grid input[type=date], .filter-grid select { width: 100%; }
.save-view { border-top: 1px solid var(--border); padding-top: .5rem; }
.agreement { border: 2px solid var(--accent); border-radius: 6px; padding: .4rem 1rem .8rem; margin: 1rem 0; background: #f4fafe; }
.agreement-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.agreement-head h2 { margin: .4rem 0; }
.agreement-list { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1rem; margin: .4rem 0; }
.agreement-list dt { font-weight: 600; }
.agreement-list dd { margin: 0; }
.agreement-extra { margin-top: .5rem; padding: .5rem .7rem; background: #fff; border-radius: 4px; border: 1px solid var(--border); }
[hidden] { display: none !important; }
.live-banner { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: #fff8e1; border: 1px solid #ffe082; border-left: 4px solid var(--coral); border-radius: 6px; padding: .5rem .9rem; margin-bottom: 1rem; }
