@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* URT Technician Portal — Design System & Tokens */
:root {
  color-scheme: light;
  --navy: #101b36;
  --navy-soft: #1b2b4b;
  --blue: #2864e8;
  --blue-dark: #174fc8;
  --blue-pale: #edf4ff;
  --page: #f4f7fb;
  --surface: #ffffff;
  --ink: #17233b;
  --muted: #718096;
  --line: #e4eaf2;
  --green: #16845b;
  --green-pale: #e9f8f0;
  --amber: #a96309;
  --amber-pale: #fff4df;
  --red: #b93838;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(25, 45, 82, .055);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html {
  min-width: 320px;
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
:root {
  --sidebar-width: 248px;
  --sidebar-width-collapsed: 72px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  transition: grid-template-columns 240ms cubic-bezier(0.2, 0, 0, 1);
  background: var(--page);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.sidebar-collapsed {
  --sidebar-width: var(--sidebar-width-collapsed);
}

/* Sidebar — Sticky on desktop */
body > header {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: start;
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
  padding: 24px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--navy);
  color: #fff;
  z-index: 30;
  transition: padding 240ms cubic-bezier(0.2, 0, 0, 1);
}

body > header::-webkit-scrollbar {
  width: 4px;
}

body > header::-webkit-scrollbar-track {
  background: transparent;
}

body > header::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

body > header > a:first-child {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 8px;
  text-decoration: none;
}

/* Renders SVG logo in pure white against the dark navy sidebar */
body > header > a:first-child img {
  display: block;
  width: auto;
  height: 38px;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
}

body > header > p {
  margin: 0;
  padding: 0 10px 14px;
  color: #aebbd3;
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

body > header nav { 
  margin-top: 2px; 
}

body > header nav ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Matching navigation items from Portal Pemilik */
body > header nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 9px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

body > header nav a svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body > header nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

body > header nav a[aria-current="page"] {
  background: #1e293b;
  color: #fff;
}

body > header nav a[aria-current="page"] svg {
  color: #60a5fa;
}

body > header nav a.nav-item--logout {
  color: #f87171;
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 12px;
}

body > header nav a.nav-item--logout:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

body > header nav a.nav-item--logout svg {
  color: #f87171;
}

/* Mobile Hamburger Toggle Button */
.sidebar-toggle,
button.sidebar-toggle {
  display: none;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  max-width: 42px !important;
  max-height: 42px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 9px !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease !important;
}

.sidebar-toggle:hover,
button.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.sidebar-toggle:active,
button.sidebar-toggle:active {
  transform: translateY(1px) !important;
}

.sidebar-toggle svg,
button.sidebar-toggle svg {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  stroke: #ffffff !important;
  stroke-width: 2 !important;
  fill: none !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  color: #ffffff !important;
}

.sidebar-toggle .icon-close,
button.sidebar-toggle .icon-close {
  display: none !important;
}

header.is-open .sidebar-toggle .icon-hamburger,
header.is-open button.sidebar-toggle .icon-hamburger {
  display: none !important;
}

header.is-open .sidebar-toggle .icon-close,
header.is-open button.sidebar-toggle .icon-close {
  display: block !important;
}

@keyframes sidebarDropdown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Status badges */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}
.status--success { background: #d1fae5; color: #065f46; }
.status--warning { background: #fef3c7; color: #92400e; }
.status--progress { background: #e0f2fe; color: #0369a1; }
.status--danger { background: #fee2e2; color: #991b1b; }
.status--neutral { background: #f1f5f9; color: #475569; }

/* Desktop Collapse Button */
.desktop-collapse-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 38px !important;
  margin-top: 10px !important;
  margin-bottom: 6px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease !important;
}

.desktop-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.desktop-collapse-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: transform 240ms cubic-bezier(0.2, 0, 0, 1);
  flex-shrink: 0;
}

/* Desktop Collapsed Sidebar State (min-width: 861px) */
@media (min-width: 861px) {
  body.sidebar-collapsed body > header,
  body.sidebar-collapsed header {
    padding: 24px 8px 18px;
    align-items: center;
  }

  body.sidebar-collapsed header > a:first-child {
    padding: 0;
    justify-content: center;
  }

  body.sidebar-collapsed header > a:first-child img {
    height: 32px;
    width: 32px;
    object-position: left center;
  }

  body.sidebar-collapsed header > p {
    display: none !important;
  }

  body.sidebar-collapsed header nav {
    width: 100%;
  }

  body.sidebar-collapsed header nav ul {
    justify-items: center;
  }

  body.sidebar-collapsed header nav a {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
    position: relative;
    border-radius: 10px;
  }

  body.sidebar-collapsed header nav a span {
    display: none !important;
  }

  body.sidebar-collapsed header nav a[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #0f172a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 1000;
  }

  body.sidebar-collapsed header nav a[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(2px);
  }

  body.sidebar-collapsed .desktop-collapse-btn {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 10px;
    position: relative;
  }

  body.sidebar-collapsed .desktop-collapse-btn .collapse-text {
    display: none !important;
  }

  body.sidebar-collapsed .desktop-collapse-btn svg {
    transform: rotate(180deg);
  }

  body.sidebar-collapsed .desktop-collapse-btn[title]::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #0f172a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 1000;
  }

  body.sidebar-collapsed .desktop-collapse-btn:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(2px);
  }

  body.sidebar-collapsed header > div[style*="margin-top: auto"] {
    padding: 12px 0 !important;
    justify-content: center !important;
  }

  body.sidebar-collapsed header > div[style*="margin-top: auto"] > div:last-child {
    display: none !important;
  }
}

@media (max-width: 860px) {
  .desktop-collapse-btn {
    display: none !important;
  }
}

/* Main content and page headings */
main {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: 1280px;
  min-width: 0;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 36px clamp(20px, 3vw, 48px) 30px;
}

main > section:first-child > h1,
main > article > header h1,
main > section > article > header h1 {
  margin: 0 0 5px;
  color: #17233b;
  font-size: clamp(24px, 2vw, 31px);
  font-weight: 780;
  letter-spacing: -.035em;
  line-height: 1.25;
}

main > section:first-child > p,
main > article > header > p {
  margin: 0 0 25px;
  color: var(--muted);
  font-size: 13px;
}

main h2 {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 750;
  letter-spacing: -.015em;
}

main h3 { 
  margin: 0 0 10px; 
  font-size: 14px; 
}

main > section, main > article {
  margin: 0 0 22px;
}

main > section > section,
main > section > article,
main > article > section,
main > article > article {
  margin: 18px 0;
  padding: 21px 22px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

main > section > section > p:first-child { 
  margin-top: 0; 
}

main > section > section > section,
main > article > section > section {
  margin-top: 16px;
}

/* Metric summaries */
main section:has(> ul > li strong) > ul,
main section[aria-labelledby="statistik"] > ul,
main section[aria-labelledby="ringkasan-selesai"] > ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

main section[aria-labelledby="statistik"] > ul { 
  grid-template-columns: repeat(4, minmax(0, 1fr)); 
}

main section > ul > li {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcff;
  color: #65748a;
  font-size: 12px;
}

main section > ul > li strong {
  display: block;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.25;
  font-weight: 800;
}

/* Ticket summary cards */
main article[aria-labelledby="tiket-terpilih"] {
  border-top: 3px solid var(--blue);
}

main dl {
  display: grid;
  grid-template-columns: minmax(125px, .75fr) minmax(0, 1.5fr);
  gap: 9px 16px;
  margin: 16px 0;
}

main dt { 
  color: var(--muted); 
  font-size: 12px; 
}

main dd { 
  min-width: 0; 
  margin: 0; 
  color: var(--ink); 
  font-weight: 600; 
  overflow-wrap: anywhere; 
}

main article > p > strong { 
  color: var(--blue); 
}

/* Links as clear actions */
a { 
  color: var(--blue); 
}

main a:not([href^="#"]) {
  font-weight: 650;
  text-decoration: none;
}

main p > a,
td a,
main article > a,
main footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid #d9e5ff;
  border-radius: 8px;
  background: var(--blue-pale);
  color: var(--blue-dark);
  font-size: 12px;
  white-space: nowrap;
}

main p > a:hover, 
td a:hover, 
main article > a:hover, 
main footer a:hover {
  background: #dfeaff;
  border-color: #b9ceff;
}

/* Tables */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 12px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 12px;
}

caption { 
  padding: 0 0 10px; 
  color: var(--muted); 
  text-align: left; 
  font-size: 12px; 
}

th, td { 
  padding: 13px 14px; 
  text-align: left; 
  vertical-align: middle; 
  border-bottom: 1px solid var(--line); 
}

th { 
  background: #f7f9fd; 
  color: #6b7890; 
  font-size: 10px; 
  font-weight: 800; 
  letter-spacing: .055em; 
  text-transform: uppercase; 
}

td { 
  color: #43516a; 
}

td:first-child { 
  color: #1e4fae; 
  font-weight: 750; 
  white-space: nowrap; 
}

tbody tr:last-child td { 
  border-bottom: 0; 
}

tbody tr:hover { 
  background: #f8faff; 
}

/* History list */
main ol:not(.timeline-steps) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ticket;
}

main ol:not(.timeline-steps) > li { 
  min-width: 0; 
}

main ol:not(.timeline-steps) article {
  height: 100%;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

main ol:not(.timeline-steps) h3 { 
  color: #20365b; 
  overflow-wrap: anywhere; 
}

main ol:not(.timeline-steps) p { 
  margin: 5px 0; 
  color: var(--muted); 
  font-size: 12px; 
}

main ol:not(.timeline-steps) p:nth-of-type(2) { 
  color: #485770; 
}

/* Forms */
form { 
  min-width: 0; 
}

fieldset { 
  min-width: 0; 
  margin: 0; 
  padding: 18px; 
  border: 1px solid var(--line); 
  border-radius: 11px; 
}

legend { 
  padding: 0 8px; 
  color: #334665; 
  font-weight: 750; 
}

label { 
  display: inline-block; 
  margin-bottom: 5px; 
  color: #46556d; 
  font-size: 12px; 
  font-weight: 700; 
}

input, textarea, select, button {
  max-width: 100%;
  font: inherit;
  font-family: inherit;
}

input:not([type="checkbox"]):not([type="radio"]), textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d7dfeb;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

textarea { 
  resize: vertical; 
  min-height: 110px; 
}

input:focus, textarea:focus, select:focus { 
  border-color: #6c96f4; 
  box-shadow: 0 0 0 3px rgba(40,100,232,.12); 
}

button:not(.btn-icon-circle):not(.sidebar-toggle):not(.desktop-collapse-btn):not(.pill-filter-item), input[type="submit"], input[type="button"] {
  cursor: pointer;
  padding: 10px 16px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
}

button:not(.btn-icon-circle):not(.sidebar-toggle):not(.desktop-collapse-btn):not(.pill-filter-item):hover, 
input[type="submit"]:hover, 
input[type="button"]:hover { 
  background: var(--blue-dark); 
}

.btn-icon-circle {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #64748b !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.btn-icon-circle:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.btn-icon-circle svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  stroke: currentColor !important;
  fill: none !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  flex-shrink: 0 !important;
}

/* Secondary page footer */
body > footer {
  grid-column: 2;
  grid-row: 2;
  padding: 16px clamp(20px, 3vw, 48px) 24px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line, #e2e8f0);
  margin-top: 24px;
}

body > footer p { 
  margin: 0; 
}

body > footer a,
footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

body > footer a:hover,
footer a:hover {
  color: var(--blue, #2563eb);
  text-decoration: underline;
}

:focus-visible { 
  outline: 3px solid rgba(73, 126, 245, .55); 
  outline-offset: 3px; 
}

::selection { 
  background: #dce8ff; 
  color: #17366f; 
}

@media (max-width: 1024px) {
  body { grid-template-columns: 210px minmax(0, 1fr); }
  body > header { padding: 20px 12px; }
  body > header > a:first-child img { width: 135px; }
  main { padding: 24px 18px; }
  main section[aria-labelledby="statistik"] > ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 860px) {
  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
  }

  body > header {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 56px !important;
    max-height: none !important;
    overflow: visible !important;
    z-index: 100 !important;
    padding: 12px 16px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0 !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18) !important;
    background: #0f172a !important;
  }

  body > header > a:first-child {
    min-height: auto !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
  }

  body > header > a:first-child img {
    height: 32px !important;
    width: auto !important;
  }

  body > header > p {
    display: none !important;
  }

  .sidebar-toggle,
  button.sidebar-toggle {
    display: inline-flex !important;
    margin-left: auto !important;
    flex: 0 0 auto !important;
  }

  body > header nav {
    display: none !important;
    width: 100% !important;
    flex: 1 1 100% !important;
    margin-top: 10px !important;
    padding-top: 10px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  }

  body > header.is-open nav {
    display: block !important;
    animation: sidebarDropdown 0.22s ease-out !important;
  }

  body > header nav ul {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  body > header nav a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: 44px !important;
    padding: 0 14px !important;
    border-radius: 9px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    background: transparent !important;
    text-decoration: none !important;
  }

  body > header nav a[aria-current="page"] {
    background: #1e293b !important;
    color: #ffffff !important;
    font-weight: 600 !important;
  }

  body > header nav a.nav-item--logout {
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
    margin-top: 10px !important;
    padding-top: 12px !important;
    color: #f87171 !important;
    background: transparent !important;
  }

  body > header > div:last-child {
    display: none !important;
    width: 100% !important;
    flex: 1 1 100% !important;
    margin-top: 10px !important;
    padding: 12px 0 4px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  body > header.is-open > div:last-child {
    display: flex !important;
    animation: sidebarDropdown 0.22s ease-out !important;
  }

  main {
    padding: 18px 14px 44px !important;
    max-width: 100%;
  }

  main > section > section,
  main > section > article,
  main > article > section,
  main > article > article {
    padding: 16px;
    border-radius: 12px;
  }

  main section:has(> ul > li strong) > ul,
  main section[aria-labelledby="statistik"] > ul,
  main section[aria-labelledby="ringkasan-selesai"] > ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    min-width: 560px;
  }

  main ol:not(.timeline-steps) {
    grid-template-columns: 1fr;
  }

  main dl {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  main dd {
    margin-bottom: 12px;
  }

  button,
  input[type="submit"],
  input[type="button"],
  input:not([type="checkbox"]):not([type="radio"]),
  select {
    min-height: 44px;
  }

  form button,
  form input[type="submit"] {
    width: 100%;
  }

  body > footer {
    padding: 0 14px 20px;
  }
}

@media (max-width: 480px) {
  main section:has(> ul > li strong) > ul,
  main section[aria-labelledby="statistik"] > ul,
  main section[aria-labelledby="ringkasan-selesai"] > ul {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* ==========================================================================
   Technician Dashboard Styles (beranda-teknisi.html)
   ========================================================================== */
.dashboard-main {
  background: #f8fafc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

.topbar-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px max(32px, calc((100% - 1200px) / 2 + 32px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-role-blue {
  background: #eff6ff;
  color: #2563eb;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.status-online-text {
  font-size: 13px;
  color: #64748b;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #2563eb;
  background: #ffffff;
  color: #2563eb;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-container {
  padding: 28px 32px 60px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.heading-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.eyebrow-blue {
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.page-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.btn-view-queue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.btn-view-queue:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

/* 3 Stat Cards Row */
.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.stat-box-title {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
}

.stat-icon-wrap {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon-blue { color: #2563eb; }
.stat-icon-orange { color: #ea580c; }
.stat-icon-green { color: #16a34a; }

.stat-box-value-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-accent-bar {
  width: 4px;
  height: 32px;
  border-radius: 4px;
}

.bar-blue { background: #2563eb; }
.bar-orange { background: #ea580c; }
.bar-green { background: #16a34a; }

.stat-big-number {
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

/* Middle 2-Column Grid */
.middle-columns-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-bottom: 24px;
}

.content-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

/* Left Card: Tiket Terpilih */
.ticket-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid #f1f5f9;
}

.ticket-tag-label {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.ticket-id-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.badge-status-soft-blue {
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
}

.ticket-details-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.detail-row-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.detail-icon-circle {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.detail-icon-blue { color: #2563eb; }
.detail-icon-orange { color: #f59e0b; }
.detail-icon-gray { color: #64748b; }

.detail-field-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 2px;
}

.detail-field-val {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.btn-open-ticket {
  display: block;
  width: 100%;
  background: #2563eb;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}

.btn-open-ticket:hover {
  background: #1d4ed8;
}

/* Right Card: Status Tiket (Timeline) */
.timeline-card-heading {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 20px;
}

.timeline-flow {
  display: flex;
  flex-direction: column;
}

.timeline-flow .timeline-step {
  display: flex;
  gap: 14px;
  position: relative;
  padding-bottom: 22px;
}

.timeline-flow .timeline-step:last-child {
  padding-bottom: 0;
}

.timeline-flow .timeline-step::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 5px;
  bottom: 0;
  width: 2px;
  background: #e2e8f0;
}

.timeline-flow .timeline-step:last-child::before {
  display: none;
}

.timeline-circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
  position: relative;
  z-index: 2;
}

.circle-blue {
  background: #2563eb;
  box-shadow: 0 0 0 3px #dbeafe;
}

.circle-gray {
  background: #cbd5e1;
}

.timeline-step-body {
  flex: 1;
}

.timeline-step-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.timeline-step-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.timeline-step-time {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.timeline-step-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

/* Bottom Card: Antrean Servis Mendesak */
.queue-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.queue-title-text {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px;
}

.queue-sub-text {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.filter-pills-wrap {
  display: flex;
  gap: 8px;
}

.pill-filter-item {
  background: transparent;
  border: 1px solid transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.pill-filter-item.is-active {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 600;
}

.pill-filter-item:hover:not(.is-active) {
  background: #f1f5f9;
  color: #0f172a;
}

.table-responsive-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.clean-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.clean-table th {
  text-align: left;
  padding: 12px 14px;
  color: #64748b;
  font-weight: 600;
  font-size: 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.clean-table td {
  padding: 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.clean-table tr:last-child td {
  border-bottom: none;
}

.table-ticket-link {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

.status-pill-amber {
  background: #fef3c7;
  color: #b45309;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
}

.status-pill-blue {
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
}

.status-pill-purple {
  background: #ede9fe;
  color: #6d28d9;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
}

.priority-danger {
  color: #dc2626;
  font-weight: 700;
}

.priority-default {
  color: #475569;
  font-weight: 500;
}

.action-arrow-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.action-arrow-link:hover {
  text-decoration: underline;
}

@media (max-width: 1150px) {
  .stats-cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
  }
  .middle-columns-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .dashboard-container {
    padding: 20px 16px 40px;
  }
  .topbar-header {
    padding: 12px 16px;
  }
}

@media (max-width: 580px) {
  .stats-cards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ==========================================================================
   Perjalanan Tiket / Timeline Steps Styling
   ========================================================================== */
.timeline-steps {
  display: flex !important;
  flex-direction: column !important;
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  position: relative;
}

.timeline-steps::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 13px;
  width: 2px;
  background: var(--border-soft, #e2e8f0);
  z-index: 0;
}

.timeline-steps .timeline-step,
.timeline-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 22px;
  font-size: 13px;
  z-index: 1;
}

.timeline-steps .timeline-step::before {
  content: none !important;
  display: none !important;
}

.timeline-step:last-child {
  padding-bottom: 0;
}

.timeline-step__marker {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px #ffffff;
  transition: all 0.2s ease;
}

/* COMPLETED STEP */
.timeline-step.is-done .timeline-step__marker {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.timeline-step.is-done .timeline-step__title {
  color: #0f172a;
}

/* CURRENT / IN-PROGRESS STEP */
@keyframes pulse-step-marker {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25), 0 0 0 2px #ffffff;
  }
  50% {
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.12), 0 0 0 2px #ffffff;
  }
}

.timeline-step.is-current .timeline-step__marker {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25), 0 0 0 2px #ffffff;
  animation: pulse-step-marker 2.4s infinite ease-in-out;
}

.timeline-step.is-current .timeline-step__title {
  color: #2563eb;
  font-weight: 700;
}

/* PENDING STEP */
.timeline-step:not(.is-done):not(.is-current) .timeline-step__marker {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #94a3b8;
}

.timeline-step:not(.is-done):not(.is-current) .timeline-step__title {
  color: #64748b;
  font-weight: 500;
}

.timeline-step__content {
  flex: 1;
  padding-top: 3px;
}

.timeline-step__title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 3px;
}

.timeline-step__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
}

.timeline-step__time {
  color: #64748b;
}

.timeline-step__actor {
  color: #475569;
  font-weight: 500;
}