/* TSR Gadai — tema meniru GC Sales Support (kartu membulat, sidebar putih, topbar blur, login terbelah), warna merek sendiri */
:root {
  --font-sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --primary: #004aad;
  --primary-dark: #00357f;
  --primary-light: #1a68cf;
  --primary-foreground: #ffffff;
  --secondary: #fac803;
  --secondary-foreground: #252525;
  --secondary-soft: #fff6cc;
  --tertiary: #252525;
  --accent: #eaf1fb;
  --accent-foreground: #252525;
  --ring: #004aad;

  --background: #ffffff;
  --foreground: #252525;
  --muted: #f1f5fb;
  --muted-foreground: #64748b;
  --border: #e3e9f2;
  --input: #d7dfec;
  --bg: #f1f5fb;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(0, 74, 173, .06);
  --sidebar-w: 16.5rem;
  --sidebar-w-mini: 4.5rem;
}

html, body, button, input, select, textarea { font-family: var(--font-sans); }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--foreground); font-size: 14px; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }

/* ---------- Tombol & form (target sentuh nyaman di ponsel) ---------- */
.btn { border-radius: var(--radius); font-weight: 600; min-height: 2.5rem; transition: all .15s ease; }
.btn[data-size=sm] { min-height: 2.1rem; }
.btn:not([data-variant]), .btn[data-variant=primary] { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(0, 74, 173, .22); }
.btn:not([data-variant]):hover, .btn[data-variant=primary]:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn[data-variant=secondary] { background: var(--secondary); color: var(--secondary-foreground); }
.btn[data-variant=secondary]:hover { background: #e6b800; }
.btn[data-variant=outline] { background: #fff; border-color: var(--input); color: var(--foreground); }
.btn[data-variant=outline]:hover { background: var(--accent); }
.input, .select, .textarea { border-radius: var(--radius); border-color: var(--input); min-height: 2.6rem; background-color: #fff; }
.textarea { min-height: 4.5rem; }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 .22rem rgba(0, 74, 173, .15); }
.label { font-weight: 600; font-size: .85rem; color: #334155; }
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.field-error { color: #dc2626; font-size: 12.5px; }
.hint { color: var(--muted-foreground); font-size: 12.5px; }
@media (max-width: 767px) { .input, .select, .textarea { font-size: 16px; } }  /* cegah zoom otomatis iOS */

/* ---------- Layout admin ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 1040; transition: width .2s ease, transform .25s ease;
}
.app-main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); transition: margin-left .2s ease; display: flex; flex-direction: column; }
.sidebar-backdrop { display: none; }
.sidebar-collapsed .app-sidebar { width: var(--sidebar-w-mini); }
.sidebar-collapsed .app-main { margin-left: var(--sidebar-w-mini); }
.sidebar-collapsed .s-label, .sidebar-collapsed .s-brand-text, .sidebar-collapsed .s-foot { display: none; }
.sidebar-collapsed .s-link { justify-content: center; padding-inline: 0; }
.sidebar-collapsed .s-brand { justify-content: center; padding: 0; }

.s-brand { display: flex; align-items: center; gap: .75rem; min-height: 4.25rem; padding: 0 1.25rem; }
.s-brand img { width: 2.4rem; height: 2.4rem; object-fit: contain; border-radius: .55rem; flex: none; }
.s-brand-text { font-weight: 800; font-size: 1.02rem; line-height: 1.15; color: var(--tertiary); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.s-nav { flex: 1; overflow-y: auto; padding: .25rem .9rem 1rem; display: flex; flex-direction: column; gap: 2px; }
.s-group { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; padding: .9rem .9rem .4rem; }
.sidebar-collapsed .s-group { visibility: hidden; height: .4rem; padding: 0; }
.s-link { display: flex; align-items: center; gap: .8rem; padding: .72rem .9rem; border-radius: var(--radius); color: #475569; font-weight: 500; font-size: .92rem; text-decoration: none; transition: all .15s ease; }
.s-link i { width: 1.15rem; text-align: center; font-size: 1.05rem; }
.s-link:hover { background: var(--bg); color: var(--primary); }
.s-link.active { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; box-shadow: 0 6px 14px rgba(0, 74, 173, .28); }
.s-link.active i { color: var(--secondary); }
.s-foot { padding: 1rem 1.25rem; border-top: 1px solid var(--border); font-size: .75rem; color: var(--muted-foreground); }

.app-header {
  position: sticky; top: 0; z-index: 1030; background: rgba(241, 245, 251, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: .8rem 1.75rem; display: flex; align-items: center; gap: .9rem; min-height: 4.25rem;
}
.topbar-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; margin: 0 auto 0 0; color: var(--tertiary); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { width: 2.6rem; height: 2.6rem; display: inline-grid; place-items: center; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; cursor: pointer; color: #475569; flex: none; box-shadow: var(--shadow); }
.icon-btn:hover { background: var(--accent); color: var(--primary); }
.app-content { padding: .5rem 1.75rem 2.5rem; max-width: 1600px; width: 100%; }
.page-title { display: none; }                      /* judul pindah ke topbar */
.page-sub { color: var(--muted-foreground); margin: 0; font-size: .92rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }

.user-menu { position: relative; }
.user-trigger { display: flex; align-items: center; gap: .65rem; padding: .3rem .85rem .3rem .3rem; border: 1px solid var(--border); border-radius: 14px; background: #fff; cursor: pointer; box-shadow: var(--shadow); }
.avatar { width: 2.3rem; height: 2.3rem; border-radius: 12px; background: linear-gradient(135deg, var(--secondary), #ffdf5c); color: var(--tertiary); display: grid; place-items: center; font-weight: 800; font-size: .85rem; flex: none; }
.user-pop { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 14rem; background: #fff; border: 0; border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, .16); padding: .35rem; display: none; z-index: 1050; }
.user-pop.open { display: block; }
.user-pop a, .user-pop button { display: flex; width: 100%; align-items: center; gap: .6rem; padding: .65rem .75rem; border-radius: 8px; color: var(--foreground); background: none; border: 0; cursor: pointer; text-decoration: none; font-size: 14px; text-align: left; }
.user-pop a:hover, .user-pop button:hover { background: var(--bg); }
.user-pop .head { padding: .6rem .75rem; border-bottom: 1px solid var(--border); margin-bottom: .25rem; }

/* ---------- Kartu ---------- */
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.panel-head { padding: 1rem 1.4rem; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 1rem; }
.panel-body { padding: 1.4rem; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 1.15rem 1.3rem; display: flex; align-items: center; gap: 1rem; min-width: 0; }
.stat-icon { width: 3.2rem; height: 3.2rem; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.stat-icon.navy { background: rgba(0, 74, 173, .1); color: var(--primary); }
.stat-icon.yellow { background: var(--secondary-soft); color: #a47f00; }
.stat-icon.red { background: #fee2e2; color: #dc2626; }
.stat-icon.green { background: #dcfce7; color: #16a34a; }
.stat-body { min-width: 0; }
.stat-label { color: var(--muted-foreground); font-weight: 500; font-size: .8rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.stat-value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin-top: .15rem; overflow-wrap: anywhere; }
.welcome-banner { background: linear-gradient(120deg, var(--primary) 0%, var(--primary-light) 60%, #3d8bf0 140%); color: #fff; border-radius: var(--radius-lg); padding: 1.5rem 1.7rem; position: relative; overflow: hidden; margin-bottom: 1.25rem; }
.welcome-banner::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(250, 200, 3, .22); }
.welcome-banner h2 { font-size: 1.3rem; font-weight: 800; margin: 0 0 .25rem; position: relative; z-index: 1; }
.welcome-banner p { margin: 0; opacity: .9; font-size: .92rem; position: relative; z-index: 1; }
.welcome-banner .btn { position: relative; z-index: 1; }

.badge-status { display: inline-flex; align-items: center; padding: .22rem .65rem; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }

.alert { display: flex; gap: .6rem; padding: .75rem .95rem; border-radius: 12px; border: 0; font-size: 13.5px; margin-bottom: 1rem; }
.alert-error { background: #fee2e2; color: #b91c1c; }
.alert-success { background: #dcfce7; color: #15803d; }

/* ---------- Grid responsif ---------- */
.grid-stats { display: grid; gap: 1rem; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 1.25rem; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1rem; }
.grid-2-1 { display: grid; gap: 1rem; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; margin-bottom: 1rem; }
.sticky-side { position: sticky; top: 5.25rem; }
.grid-form { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 1rem; }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c6 { grid-column: span 6; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
@media (max-width: 1199px) { .grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 991px) { .grid-2-1, .grid-2 { grid-template-columns: minmax(0, 1fr); } .sticky-side { position: static; } }
@media (max-width: 900px) { .c3, .c4, .c6, .c8 { grid-column: span 12; } }
@media (max-width: 575px) {
  .grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .stat-card { flex-direction: column; align-items: flex-start; gap: .6rem; padding: .9rem; }
  .stat-icon { width: 2.6rem; height: 2.6rem; font-size: 1.1rem; border-radius: 12px; }
  .stat-value { font-size: 1.1rem !important; }
}

.kv { display: grid; grid-template-columns: 9.5rem 1fr; gap: .6rem 1rem; margin: 0; }
.kv dt { color: var(--muted-foreground); } .kv dd { font-weight: 500; margin: 0; overflow-wrap: anywhere; }
@media (max-width: 575px) { .kv { grid-template-columns: 1fr; gap: 0; } .kv dt { font-size: 12px; margin-top: .6rem; } }

/* ---------- Tabel, toolbar, pager ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.toolbar .input, .toolbar .select { width: auto; min-width: 9rem; }
.toolbar .grow { flex: 1; min-width: 14rem; }
.toolbar .grow .input { width: 100%; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl-wrap table { width: 100%; }
.tbl-wrap th { white-space: nowrap; color: var(--muted-foreground); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; background: #f8fafc; }
.tbl-wrap th, .tbl-wrap td { padding: .8rem 1.1rem; }
.tbl-wrap td { vertical-align: middle; border-color: var(--border); }
.tbl-wrap td.num, .tbl-wrap th.num { text-align: right; white-space: nowrap; }
.tbl-empty { text-align: center; color: var(--muted-foreground); padding: 2.5rem 1rem !important; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .8rem 1.25rem; border-top: 1px solid var(--border); color: var(--muted-foreground); }
.pager .pg { display: flex; gap: .25rem; }
.pg button { min-width: 2.2rem; height: 2.2rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; font-size: 13px; color: var(--primary); }
.pg button:hover:not(:disabled) { background: var(--accent); }
.pg button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.pg button:disabled { opacity: .45; cursor: default; }
.loading { opacity: .5; pointer-events: none; }

/* Tabel menjadi kartu di layar kecil (label kolom diisi otomatis oleh app.js) */
@media (max-width: 767px) {
  .toolbar { padding: .9rem 1rem; }
  .toolbar > * { flex: 1 1 100%; }
  .toolbar .grow { min-width: 0; }
  .toolbar .input, .toolbar .select { width: 100%; }
  .toolbar label { display: flex; gap: .5rem; align-items: center; }
  .toolbar label .input { flex: 1; }
  .toolbar .ml-auto { margin-left: 0; display: flex; gap: .5rem; } .toolbar .ml-auto .btn { flex: 1; }
  .pager { justify-content: center; text-align: center; }

  .tbl-wrap table.table, .tbl-wrap table.table tbody, .tbl-wrap table.table tfoot, .tbl-wrap table.table tr, .tbl-wrap table.table td { display: block; width: 100%; }
  .tbl-wrap table.table thead { display: none; }
  .tbl-wrap table.table tr { width: auto; border: 1px solid var(--border); border-radius: 12px; margin: .7rem .85rem; padding: .35rem .9rem; background: #fff; box-shadow: var(--shadow); }
  .tbl-wrap table.table tfoot tr { background: var(--secondary-soft); }
  .tbl-wrap table.table td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .5rem 0; text-align: right !important; border: 0; border-bottom: 1px dashed var(--border); max-width: none !important; white-space: normal !important; }
  .tbl-wrap table.table td:last-child { border-bottom: 0; }
  .tbl-wrap table.table td::before { content: attr(data-label); font-weight: 600; font-size: 12px; color: var(--muted-foreground); text-align: left; flex: none; max-width: 40%; }
  .tbl-wrap table.table td[data-label=""]::before { display: none; }
  .tbl-wrap table.table td.tbl-empty { display: block; text-align: center !important; }
  .tbl-wrap table.table td.tbl-empty::before { display: none; }
  .tbl-wrap table.table td:has(> .btn, > form) { justify-content: flex-end; flex-wrap: wrap; }
  .tbl-wrap table.table td .truncate { white-space: normal; }
}

/* ---------- Tab ---------- */
.tabbar { display: flex; gap: .25rem; padding: .3rem; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); width: fit-content; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabbar button { padding: .55rem 1rem; border: 0; background: transparent; border-radius: var(--radius); font-weight: 600; font-size: .86rem; color: #475569; cursor: pointer; white-space: nowrap; }
.tabbar button:hover { background: var(--bg); color: var(--primary); }
.tabbar button.on { background: var(--primary); color: #fff; }
[data-tab-panel][hidden] { display: none; }

/* ---------- Dialog ---------- */
dialog.dlg { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(34rem, 94vw); max-height: 92vh; box-shadow: 0 24px 60px rgba(16, 24, 40, .28); color: var(--foreground); margin: auto; overflow: hidden; }
dialog.dlg.lg { width: min(52rem, 94vw); }
dialog.dlg::backdrop { background: rgba(15, 23, 42, .5); }
.dlg-head { padding: 1.2rem 1.4rem .6rem; }
.dlg-head h2 { font-size: 1.1rem; font-weight: 800; }
.dlg-head p { color: var(--muted-foreground); margin-top: .2rem; }
.dlg-body { padding: .6rem 1.4rem 1rem; overflow-y: auto; max-height: calc(92vh - 9rem); }
.dlg-foot { padding: .9rem 1.4rem; border-top: 1px solid var(--border); background: #f8fafc; display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
@media (max-width: 575px) { .dlg-foot .btn { flex: 1 1 45%; } dialog.dlg { width: 96vw; } }

/* ---------- Komponen lain ---------- */
.preview-logo { width: 6rem; height: 6rem; object-fit: contain; border: 1px dashed var(--input); border-radius: var(--radius); padding: .4rem; background: #f8fafc; }
.thumb { width: 3rem; height: 3rem; object-fit: cover; border-radius: .5rem; border: 1px solid var(--border); }
.sum-box { background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; }
.sum-row { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; }
.sum-row.total { border-top: 1px solid var(--border); margin-top: .35rem; padding-top: .6rem; font-weight: 800; font-size: 1.05rem; color: var(--primary); }
.lookup { position: relative; }
.lookup-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 53, 127, .18); z-index: 20; max-height: 15rem; overflow-y: auto; padding: .35rem; }
.lookup-list button { display: block; width: 100%; text-align: left; padding: .6rem .7rem; background: none; border: 0; border-radius: 10px; cursor: pointer; }
.lookup-list button:hover { background: var(--secondary-soft); }
.item-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem 1rem .2rem; margin-bottom: .75rem; background: #fff; }
.avatar-lg { width: 3rem; height: 3rem; }
a.hover-link:hover { color: var(--primary); }
.tbl-wrap a.font-semibold:hover, .panel a:not(.btn):hover { color: var(--primary); }

/* Toast */
#toasts { position: fixed; right: 1rem; bottom: 1rem; left: 1rem; display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; z-index: 2000; pointer-events: none; }
.toast-item { background: #fff; border: 0; border-left: 4px solid var(--primary); border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, .2); padding: .8rem 1.1rem; min-width: 16rem; max-width: 100%; animation: tin .2s ease; pointer-events: auto; }
.toast-item.success { border-left-color: #16a34a; } .toast-item.error { border-left-color: #dc2626; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Login terbelah ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; background: #fff; }
.auth-hero { position: relative; overflow: hidden; color: #fff; padding: 3.5rem; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  background: linear-gradient(145deg, #00205a 0%, var(--primary) 52%, #2f7fe0 120%); isolation: isolate; }
.auth-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5; background-image: radial-gradient(rgba(255, 255, 255, .22) 1px, transparent 1px); background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(160deg, #000 0%, transparent 70%); mask-image: linear-gradient(160deg, #000 0%, transparent 70%); }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); z-index: -1; will-change: transform; }
.blob-1 { width: 420px; height: 420px; background: rgba(250, 200, 3, .38); top: -140px; left: -110px; animation: drift1 16s ease-in-out infinite alternate; }
.blob-2 { width: 360px; height: 360px; background: rgba(60, 130, 255, .5); bottom: -120px; right: -60px; animation: drift2 19s ease-in-out infinite alternate; }
.blob-3 { width: 240px; height: 240px; background: rgba(250, 200, 3, .22); top: 42%; left: 46%; animation: drift3 22s ease-in-out infinite alternate; }
.ring { position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); z-index: -1; }
.ring-1 { width: 560px; height: 560px; right: -200px; bottom: -220px; animation: spin 60s linear infinite; border-style: dashed; }
.ring-2 { width: 340px; height: 340px; right: -80px; bottom: -100px; animation: spin 40s linear infinite reverse; }
.hero-badge { display: inline-flex; align-items: center; gap: .55rem; align-self: flex-start; padding: .45rem .95rem; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: blur(8px); font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--secondary); box-shadow: 0 0 0 0 rgba(250, 200, 3, .7); animation: pulse 2s infinite; }
.hero-body h2 { font-size: clamp(2rem, 3.2vw, 2.9rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; max-width: 520px; margin: 0 0 1rem; }
.hero-body h2 span { background: linear-gradient(90deg, #ffe066, var(--secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-body p { opacity: .85; max-width: 440px; font-size: 1.02rem; margin: 0; }
.hero-cards { position: relative; height: 230px; max-width: 520px; }
.glass { position: absolute; display: flex; align-items: center; gap: .85rem; padding: .85rem 1.1rem; border-radius: 16px; min-width: 240px; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 18px 40px rgba(0, 20, 70, .3); animation: float 6s ease-in-out infinite; }
.glass .g-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; flex: none; }
.glass small { display: block; opacity: .75; font-size: .72rem; }
.glass strong { font-size: .95rem; font-weight: 700; }
.glass-1 { top: 0; left: 0; } .glass-1 .g-ico { background: rgba(250, 200, 3, .35); }
.glass-2 { top: 78px; left: 150px; animation-delay: -2s; } .glass-2 .g-ico { background: rgba(120, 190, 255, .35); }
.glass-3 { top: 156px; left: 30px; animation-delay: -4s; } .glass-3 .g-ico { background: rgba(94, 234, 180, .3); }
.hero-foot { font-size: .82rem; opacity: .7; }
.reveal { opacity: 0; transform: translateY(18px); animation: rise .8s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--d, 0) * 1s); }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes drift1 { to { transform: translate(120px, 80px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-100px, -90px) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-80px, 60px) scale(.85); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(250, 200, 3, 0); } 100% { box-shadow: 0 0 0 0 rgba(250, 200, 3, 0); } }

.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 2rem; background: #fff; }
.auth-card { width: 100%; max-width: 410px; }
.auth-logo { display: block; height: 110px; width: auto; max-width: 100%; margin: 0 auto 1.25rem; object-fit: contain; }
.auth-card h1 { font-size: 1.65rem; font-weight: 800; letter-spacing: -.02em; text-align: center; color: var(--tertiary); }
.auth-card .auth-sub { text-align: center; color: var(--muted-foreground); margin: .2rem 0 1.5rem; }
.input-icon { position: relative; }
.input-icon > i.lead { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); pointer-events: none; }
.input-icon > .input { padding-left: 2.6rem; }
.input-icon > .toggle-pass { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted-foreground); padding: .5rem; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .blob, .ring, .glass, .hero-badge .dot { animation: none; } .reveal { opacity: 1; transform: none; animation: none; } }

/* ---------- Mobile: sidebar off-canvas ---------- */
@media (max-width: 991px) {
  .app-sidebar { transform: translateX(-100%); width: var(--sidebar-w) !important; }
  .sidebar-open .app-sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  .sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 1035; }
  .app-main, .sidebar-collapsed .app-main { margin-left: 0; }
  .sidebar-collapsed .s-label, .sidebar-collapsed .s-brand-text, .sidebar-collapsed .s-foot { display: initial; }
  .sidebar-collapsed .s-link { justify-content: flex-start; padding-inline: .9rem; }
  .sidebar-collapsed .s-brand { justify-content: flex-start; padding: 0 1.25rem; }
  .sidebar-collapsed .s-group { visibility: visible; height: auto; padding: .9rem .9rem .4rem; }
  .app-header { padding: .65rem 1rem; }
  .app-content { padding: .25rem 1rem 5.5rem; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-form-side { min-height: 100vh; padding: 1.5rem 1.25rem; align-items: flex-start; padding-top: 12vh; }
  .auth-logo { height: 90px; }
  .welcome-banner { padding: 1.2rem 1.25rem; }
}
@media (max-width: 575px) {
  .topbar-title { font-size: 1.05rem; }
  .panel-body { padding: 1.1rem; }
  .panel-head { padding: .9rem 1.1rem; }
  .stat-value { font-size: 1.35rem; }
  .page-head .btn { width: 100%; }
  .page-head > .flex { width: 100%; } .page-head > .flex .btn { flex: 1; }
}
/* Tombol simpan melayang di ponsel (Gadai Baru) */
@media (max-width: 991px) {
  .mobile-sticky-save { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1020; padding: .75rem 1rem; background: rgba(255, 255, 255, .96); border-top: 1px solid var(--border); backdrop-filter: blur(8px); }
}
.doc-title { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; color: var(--tertiary); }
@media (max-width: 767px) { .tbl-wrap table.table td[data-label="Aksi"]::before, .tbl-wrap table.table td[data-label="Cetak"]::before { display: none; } }
.field .select, .field .input, .field .textarea { width: 100%; }

/* Date picker & grafik */
.daterange { position: relative; min-width: 17rem; }
.daterange .input { padding-left: 2.5rem; padding-right: 2.2rem; cursor: pointer; width: 100%; }
.daterange-icon { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); pointer-events: none; z-index: 2; }
.daterange-clear { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted-foreground); width: 2rem; height: 2rem; border-radius: 8px; z-index: 2; cursor: pointer; }
.daterange-clear:hover { background: var(--bg); color: var(--primary); }
.flatpickr-calendar { font-family: var(--font-sans); border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 53, 127, .22); border: 1px solid var(--border); }
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.flatpickr-day.inRange { background: var(--accent); border-color: var(--accent); box-shadow: -5px 0 0 var(--accent), 5px 0 0 var(--accent); color: var(--primary); }
.flatpickr-day.today { border-color: var(--secondary); }
.flatpickr-day.today:hover { background: var(--secondary-soft); border-color: var(--secondary); color: var(--tertiary); }
.flatpickr-months .flatpickr-month, .flatpickr-current-month .flatpickr-monthDropdown-months, span.flatpickr-weekday { color: var(--tertiary); fill: var(--tertiary); font-weight: 600; }
.chart-box { position: relative; height: 270px; }
.chart-box.sm { height: 250px; }
.chart-empty { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; color: var(--muted-foreground); text-align: center; }
@media (max-width: 767px) { .daterange { min-width: 0; } .chart-box { height: 230px; } }
