/* ============================================================
   IT Portal — Modern Design System
   Converted from React/JSX design to plain CSS
   Font: Plus Jakarta Sans (Google Fonts)
   Primary color: #1B5BD3 (dirB Modern)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }

/* ── Design Tokens ── */
:root {
  --font-sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Brand */
  --brand:      #1B5BD3;
  --brand-700:  #0E47B0;
  --brand-500:  #3B7BF0;
  --brand-50:   #EAF2FE;
  --brand-grad: linear-gradient(135deg, #1B5BD3 0%, #5B3FE3 100%);
  --accent:     #14B8A6;

  /* Surfaces */
  --bg:           #F4F6FB;
  --surface:      #FFFFFF;
  --surface-2:    #F1F5FB;
  --border:       #E6EBF3;
  --border-strong:#C9D3E2;

  /* Ink */
  --ink:    #0B1530;
  --ink-2:  #2C3A57;
  --ink-3:  #5A6A86;
  --ink-4:  #9AA6BD;

  /* Semantic */
  --ok:     #10B981;
  --warn:   #F59E0B;
  --danger: #EF4444;
  --info:   #06B6D4;

  /* Per-service colors */
  --c-kendala:        #E11D48;  --c-kendala-soft:    #FFE4E6;
  --c-email:          #4F46E5;  --c-email-soft:      #EEF2FF;
  --c-hardware:       #D97706;  --c-hardware-soft:   #FFF7E6;
  --c-software:       #059669;  --c-software-soft:   #D1FAE5;
  --c-pengadaan:      #8B5CF6;  --c-pengadaan-soft:  #F3EEFE;
  --c-onboarding:     #0891B2;  --c-onboarding-soft: #E0F7FA;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --shadow-md: 0 4px 6px -1px rgba(15,23,42,.06), 0 2px 4px -2px rgba(15,23,42,.06);
  --shadow-lg: 0 10px 15px -3px rgba(15,23,42,.08), 0 4px 6px -4px rgba(15,23,42,.06);
  --shadow-card: 0 1px 2px rgba(11,91,211,.04), 0 12px 36px -10px rgba(27,91,211,.14);
  --shadow-glow: 0 0 0 4px color-mix(in oklab, var(--brand) 18%, transparent);

  /* Radii */
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   14px;
  --r-xl:   20px;
  --r-pill: 999px;
  --card-radius: 20px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ── Base ── */
body {
  font-family: var(--font-sans);
  font-feature-settings: 'cv11', 'ss01';
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

/* ── Topbar ── */
.itp-topbar {
  position: sticky; top: 0; z-index: 100;
  height: 64px;
  display: flex; align-items: center;
  padding: 0 32px; gap: 24px;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(230,235,243,.6);
}
.itp-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
}
.itp-brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--brand-grad);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; letter-spacing: -.04em;
  box-shadow: 0 4px 12px -2px rgba(27,91,211,.35);
}
.itp-brand-name { font-size: 14px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.itp-brand-sub  { font-size: 10px; font-weight: 500; opacity: .7; letter-spacing: .04em; text-transform: uppercase; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-weight: 600; font-size: 14px; letter-spacing: -.005em;
  cursor: pointer; border: none; white-space: nowrap;
  transition: transform .12s var(--ease), box-shadow .15s, background .15s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--brand-grad); color: #fff;
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: var(--shadow-glow); }
.btn-secondary {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
  overflow: hidden;
}
.card-body { padding: 20px; }
.section-h {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.section-h .ico {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--brand-50); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.section-h h3 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.section-h .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ── Form elements ── */
.label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--ink-2); margin-bottom: 6px; letter-spacing: -.005em;
}
.label .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--font-sans); font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.textarea {
  height: auto; padding: 12px 14px;
  resize: vertical; min-height: 96px; line-height: 1.5;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 14%, transparent);
}
.input.valid   { border-color: var(--ok); background: #f0fff4; }
.input.invalid { border-color: var(--danger); background: #fff5f5; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%239AA6BD' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 36px; cursor: pointer;
}
.help { font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.4; }
.ferr { font-size: 12px; color: var(--danger); margin-top: 4px; display: none; }
.ferr.show { display: block; }

/* ── Avatar ── */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
  flex-shrink: 0; background: var(--brand);
}

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600; letter-spacing: -.005em;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-baru     { color: #B45309; background: #FEF3C7; }
.badge-diproses { color: #1D4ED8; background: #DBEAFE; }
.badge-selesai  { color: #166534; background: #DCFCE7; }
.badge-open     { color: #B45309; background: #FEF3C7; }
.badge-ditolak  { color: #991B1B; background: #FEE2E2; }
.badge-pending  { color: #6B21A8; background: #F3E8FF; }

/* ── Chip ── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12px; font-weight: 500; color: var(--ink-2);
}

/* ── Tag ── */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600;
}

/* ── Email pill ── */
.email-pill {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--brand-50); border-radius: 12px;
  border: 1px solid color-mix(in oklab, var(--brand) 18%, transparent);
}

/* ── Category select card ── */
.cat-card {
  border: 1.5px solid var(--border);
  border-radius: var(--card-radius);
  padding: 16px 12px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, transform .15s var(--ease), box-shadow .15s;
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; text-align: center;
  min-height: 110px; justify-content: center;
}
.cat-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.cat-card.selected {
  border-color: var(--brand);
  background: var(--brand-50);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 12%, transparent);
}
.cat-card .cat-ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--brand-50); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.cat-card .cat-name { font-size: 13px; font-weight: 600; color: var(--ink); }

/* ── Service cards (portal beranda) ── */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.svc-card {
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 22px;
  background: var(--surface);
  cursor: pointer;
  text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column;
  align-items: flex-start; text-align: left;
  transition: border-color .15s, box-shadow .15s, transform .15s var(--ease);
}
.svc-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.svc-card.locked { opacity: .55; cursor: not-allowed; pointer-events: none; }
.svc-card.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.svc-ico {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 14px;
}
.svc-name { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.svc-desc { font-size: 13px; color: var(--ink-3); line-height: 1.5; margin-bottom: 14px; }

/* ── Stat cards ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  position: relative; overflow: hidden;
  transition: transform .15s var(--ease), box-shadow .15s;
  text-decoration: none; display: block;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card .stat-ico {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.stat-card .stat-v {
  font-size: 36px; font-weight: 800; letter-spacing: -.025em;
  line-height: 1; font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.stat-card .stat-l {
  font-size: 13px; font-weight: 500;
  color: var(--ink-3); margin-top: 8px;
}

/* ── Admin sidebar ── */
.sidebar {
  width: 256px; flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  height: 100vh; position: sticky; top: 0;
  overflow-y: auto;
}
.sb-section {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-4); padding: 18px 24px 6px;
}
.sb-item {
  display: flex; align-items: center; gap: 12px;
  height: 40px; padding: 0 14px; margin: 1px 10px;
  border-radius: 8px; color: var(--ink-2);
  font-size: 14px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: background .12s, color .12s;
}
.sb-item:hover { background: var(--surface-2); color: var(--ink); }
.sb-item.active { background: var(--brand-grad); color: #fff; border-radius: 10px; }
.sb-item svg { stroke: currentColor; }

/* ── Ticket row (admin dashboard) ── */
.ticket-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px; padding: 18px 20px;
  display: grid; grid-template-columns: 1fr auto;
  gap: 16px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s var(--ease);
}
.ticket-row:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.ticket-row.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 14%, transparent);
}
.ticket-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }
.ticket-id {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  color: var(--brand); background: var(--brand-50);
  padding: 2px 8px; border-radius: 8px;
}
.ticket-title { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute; left: 9px; top: 4px; bottom: 4px;
  width: 2px; background: var(--border);
}
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute;
  left: -23px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border-strong);
}
.tl-item.done::before   { background: var(--ok); border-color: var(--ok); }
.tl-item.active::before {
  background: var(--brand); border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 24%, transparent);
}
.tl-item.reject::before { background: var(--danger); border-color: var(--danger); }
.tl-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.tl-time  { font-size: 11px; color: var(--ink-4); margin-top: 2px; }
.tl-body  { font-size: 13px; color: var(--ink-3); margin-top: 4px; line-height: 1.5; }

/* ── Upload zone ── */
.upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: 12px; padding: 28px;
  text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
  position: relative;
}
.upload-zone:hover { border-color: var(--brand); background: var(--brand-50); }
.upload-zone.dragover { border-color: var(--brand); background: color-mix(in oklab, var(--brand) 8%, transparent); }
.upload-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload-preview {
  display: none; margin-top: 10px;
  background: #f0fff4; border: 1px solid #c3e6cb;
  border-radius: 8px; padding: 8px 12px;
  font-size: 13px; color: #155724;
  align-items: center; gap: 8px;
}

/* ── Hero banner ── */
.itp-hero {
  padding: 64px 32px 96px;
  color: #fff; position: relative; overflow: hidden;
  background: var(--brand-grad);
}
.itp-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.08), transparent 40%),
              radial-gradient(circle at 80% 70%, rgba(255,255,255,.06), transparent 40%);
}
.itp-hero-inner {
  max-width: 1080px; margin: 0 auto;
  text-align: center; position: relative;
}
.itp-hero h1 {
  font-size: 44px; font-weight: 800;
  letter-spacing: -.03em; line-height: 1.1; margin: 0 0 16px;
}
.itp-hero p {
  font-size: 17px; opacity: .85;
  max-width: 580px; margin: 0 auto; line-height: 1.5;
}

/* ── Form hero band ── */
.form-hero {
  padding: 40px 32px; color: #fff;
  position: relative; overflow: hidden;
}
.form-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.08), transparent 40%),
              radial-gradient(circle at 80% 70%, rgba(255,255,255,.06), transparent 40%);
}
.form-hero::after {
  content: ''; position: absolute;
  right: -40px; top: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.form-hero-inner {
  max-width: 760px; margin: 0 auto;
  display: flex; align-items: center; gap: 18px; position: relative;
}
.form-hero-ico {
  width: 56px; height: 56px; border-radius: 16px;
  background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
}
.form-hero h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.form-hero p  { font-size: 14px; opacity: .85; margin: 4px 0 0; }

/* ── Disclaimer box ── */
.disclaimer {
  background: #fffbeb; border: 1.5px solid #f6e05e;
  border-radius: 12px; padding: 18px;
}
.disclaimer-title { font-size: 14px; font-weight: 700; color: #744210; margin-bottom: 10px; }
.disclaimer-body  { font-size: 13px; color: #744210; line-height: 1.8; }
.disclaimer-body ul { padding-left: 18px; margin-top: 6px; }
.disclaimer-body li { margin-bottom: 4px; }
.disclaimer-check {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid #fde68a;
}
.disclaimer-check input[type=checkbox] {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px;
  accent-color: var(--brand); cursor: pointer;
}
.disclaimer-check label { font-size: 13px; color: #744210; font-weight: 600; cursor: pointer; }

/* ── Alerts ── */
.alert { padding: 12px 16px; border-radius: 12px; font-size: 13px; line-height: 1.6; }
.alert-ok  { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-err { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: var(--brand-50); color: #1e3a5f; border: 1px solid color-mix(in oklab, var(--brand) 20%, transparent); }
.alert-warn { background: #fffbeb; color: #744210; border: 1px solid #f6e05e; }

/* ── Tiket result (sukses) ── */
.tiket-result { text-align: center; padding: 10px 0; }
.tiket-no {
  font-family: var(--font-mono);
  font-size: 26px; font-weight: 700;
  letter-spacing: 3px; display: inline-block;
  padding: 12px 28px; border-radius: 12px;
  border: 2px dashed; margin: 12px 0;
}
.tiket-note { font-size: 13px; color: var(--ink-3); margin-top: 8px; line-height: 1.8; }

/* ── Char counter ── */
.char-counter { font-size: 11px; color: var(--ink-4); text-align: right; margin-top: 4px; }
.char-ok   { color: var(--ok); }
.char-warn { color: var(--warn); }

/* ── Utilities ── */
.row   { display: flex; align-items: center; gap: 12px; }
.col   { display: flex; flex-direction: column; gap: 12px; }
.grow  { flex: 1; min-width: 0; }
.wrap  { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.form-wrap { max-width: 760px; margin: 0 auto; padding: 32px 16px 80px; display: flex; flex-direction: column; gap: 16px; }
.form-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .form-row { grid-template-columns: 1fr; } }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
svg { stroke: currentColor; flex-shrink: 0; }

/* ── Fade-in animation ── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fade-up .35s var(--ease) both; }
.fade-in-2 { animation: fade-up .35s .1s var(--ease) both; }
.fade-in-3 { animation: fade-up .35s .2s var(--ease) both; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
scrollbar-width: thin;
scrollbar-color: var(--border-strong) transparent;

/* ── Mobile responsive ── */
@media (max-width: 768px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .itp-hero { padding: 40px 20px 72px; }
  .itp-hero h1 { font-size: 28px; }
  .itp-topbar { padding: 0 16px; }
  .form-hero { padding: 28px 20px; }
}
@media (max-width: 480px) {
  .svc-grid { grid-template-columns: 1fr 1fr; }
}

/* ── SVG icons inline helper ── */
.ico-svg {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
