:root {
    color-scheme: light;
    --ink: #111827;
    --muted: #6b7280;
    --line: #eaecef;
    --surface: #ffffff;
    --canvas: #f7f8fa;
    --navy: #0f294a;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-soft: #eff6ff;
    --yellow: #f6cb55;
    --font-helvetica: "Helvetica", "Helvetica Neue", Arial, sans-serif;
    font: 400 15px/1.5 var(--font-helvetica);
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font-helvetica); overflow-x: clip; }
a { color: var(--blue); font-weight: 500; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; letter-spacing: -.025em; line-height: 1.22; color: var(--ink); font-family: var(--font-helvetica); }
h1 { font-size: clamp(1.45rem, 2.5vw, 1.85rem); overflow-wrap: anywhere; font-weight: 600; }
h2 { font-size: 1.08rem; font-weight: 600; }
h3 { margin-top: 1.4rem; font-size: .95rem; font-weight: 600; }
p { margin: .45rem 0; }
.muted { color: var(--muted); font-size: .9rem; }
.mono, pre { font-family: ui-monospace, monospace; font-size: .84rem; overflow-wrap: anywhere; }
pre { white-space: pre-wrap; max-height: 20rem; overflow: auto; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: .75rem; }
.skip { position: absolute; z-index: 20; inset: .5rem auto auto .5rem; background: white; padding: .75rem; transform: translateY(-150%); border-radius: 8px; }
.skip:focus { transform: none; }

/* Shell & White KameraKita Sidebar */
.shell { display: grid; grid-template-columns: 16rem minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: #ffffff; border-right: 1px solid #eef2f7; color: var(--ink); padding: 1.15rem .95rem; display: flex; flex-direction: column; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; line-height: 1.15; padding: .25rem .45rem .95rem; border-bottom: 1px solid #f1f5f9; }
.brand-img { width: 1.95rem; height: 1.95rem; object-fit: contain; flex: 0 0 auto; }
.brand-name { font-weight: 600; font-size: 1.12rem; letter-spacing: -.025em; color: #0f172a; }
.brand-accent { color: var(--blue); }
.sidebar nav { display: grid; gap: .2rem; }
.nav-group { font-size: .68rem; font-weight: 600; letter-spacing: .08em; color: #94a3b8; padding: .6rem .75rem .35rem; }
.sidebar nav a { display: flex; align-items: center; gap: .75rem; color: #334155; border-radius: 12px; padding: .66rem .82rem; text-decoration: none; font-weight: 500; font-size: .92rem; transition: background .15s ease, color .15s ease; }
.sidebar nav a:hover { background: #f8fafc; color: #0f172a; }
.sidebar nav a[aria-current] { background: #eff6ff; color: #1d4ed8; font-weight: 600; }
.nav-icon { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; color: #94a3b8; }
.sidebar nav a:hover .nav-icon { color: #475569; }
.sidebar nav a[aria-current] .nav-icon { color: #2563eb; }

.nav-accordion { border-top: 1px solid #f1f5f9; margin-top: .55rem; padding-top: .35rem; }
.nav-group-toggle { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-size: .68rem; font-weight: 600; letter-spacing: .08em; color: #94a3b8; padding: .65rem .75rem; min-height: 36px; user-select: none; }
.nav-group-toggle::-webkit-details-marker { display: none; }
.nav-chevron { width: .9rem; height: .9rem; color: #94a3b8; transition: transform .18s ease; }
.nav-accordion[open] .nav-chevron { transform: rotate(180deg); }
.nav-sub { display: grid; gap: .2rem; padding-bottom: .25rem; }

.signout { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .95rem .35rem .2rem; border-top: 1px solid #f1f5f9; }
.user-foot { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.user-avatar { width: 2.35rem; height: 2.35rem; border-radius: 999px; background: #2563eb; color: #ffffff; display: grid; place-items: center; font-weight: 600; font-size: .92rem; flex: 0 0 auto; }
.user-meta { min-width: 0; display: grid; gap: .08rem; }
.admin-email { font-size: .88rem; font-weight: 600; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { font-size: .66rem; color: #94a3b8; font-weight: 600; letter-spacing: .05em; }
.logout-icon-btn { width: 2.2rem; height: 2.2rem; min-height: 36px; padding: 0; border: 0; background: transparent; border-radius: 8px; color: #94a3b8; flex: 0 0 auto; }
.logout-icon-btn:hover { background: #fef2f2; color: #dc2626; }
.logout-icon-btn .nav-icon { color: inherit; }

.workspace { display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: .85rem clamp(1rem, 2.8vw, 2.2rem); display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.topbar-title { font-size: 1.2rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.tz-pill { display: inline-flex; align-items: center; padding: .3rem .75rem; border-radius: 999px; background: white; border: 1px solid var(--line); color: var(--muted); font-size: .78rem; font-weight: 600; }
.main { padding: 1.35rem clamp(1rem, 2.8vw, 2.2rem) 3rem; width: 100%; }

/* Panels, Buttons, Inputs, Badges */
.page-heading, .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.page-heading { margin: 0 0 1.25rem; }
.page-heading p, .section-heading p { color: var(--muted); margin-bottom: 0; }
.section-heading { padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.panel { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 1px 2px rgba(15, 23, 42, .03); min-width: 0; transition: border-color .18s ease, box-shadow .18s ease; }
.panel:hover { box-shadow: 0 6px 20px rgba(15, 23, 42, .045); }
.panel + .panel { margin-top: 1rem; }
.padded { padding: 1.25rem; }

button, .button, input, select, textarea { font: inherit; min-height: 40px; border: 1px solid #e2e5ec; border-radius: 10px; background: white; color: var(--ink); padding: .48rem .85rem; transition: all .15s ease; }
button, .button { display: inline-flex; align-items: center; justify-content: center; font-weight: 500; cursor: pointer; text-decoration: none; font-size: .86rem; }
button:hover, .button:hover { background: #f8fafc; border-color: #cbd5e1; }
button:active, .button:active { transform: scale(.985); }
.primary { background: var(--blue); color: white; border-color: var(--blue); font-weight: 600; box-shadow: 0 2px 8px rgba(37, 99, 235, .18); }
.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
label { font-size: .85rem; font-weight: 650; color: #334155; }
input, select, textarea { width: 100%; min-width: 0; }
textarea { resize: vertical; }
.stack { display: grid; gap: .4rem; margin-top: .9rem; }
.stack label:not(:first-child), .stack button { margin-top: .5rem; }
.actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

.badge { display: inline-flex; align-items: center; gap: .28rem; border-radius: 999px; padding: .22rem .6rem; font-size: .76rem; font-weight: 700; line-height: 1.3; background: #f1f5f9; color: #334155; }
.pending { background: #fef3c7; color: #92400e; }
.approved, .valid { background: #dcfce7; color: #166534; }
.revision_requested, .empty.badge { background: #ffedd5; color: #9a3412; }
.rejected, .invalid { background: #fee2e2; color: #991b1b; }
.empty:not(.badge) { margin: 0; padding: 1.35rem; color: var(--muted); }

/* Dashboard KameraKita.ai Layout */
.kk-dashboard { display: grid; gap: 1.25rem; }
.kk-greeting { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.25rem; }
.kk-greeting-left { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.kk-avatar { width: 2.85rem; height: 2.85rem; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; flex: 0 0 auto; }
.kk-greeting-title { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.kk-greeting-title h1 { font-size: 1.18rem; }
.kk-role-badge { font-size: .68rem; font-weight: 800; padding: .18rem .55rem; border-radius: 999px; background: var(--blue-soft); color: var(--blue); letter-spacing: .04em; }

.kk-hero-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1.15rem; align-items: stretch; }
.kk-hero-card { border-radius: 20px; padding: 1.45rem; color: white; background: linear-gradient(135deg, #2563eb 0%, #1d8cf8 55%, #0ea5e9 100%); box-shadow: 0 18px 38px rgba(37, 99, 235, .24); display: flex; flex-direction: column; gap: .9rem; }
.kk-hero-top { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.kk-hero-kicker { font-size: .74rem; font-weight: 700; letter-spacing: .06em; color: rgba(255, 255, 255, .88); }
.kk-glass-pill { background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: .24rem .7rem; font-size: .76rem; font-weight: 600; }
.kk-hero-value-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.kk-hero-number { font-size: clamp(2rem, 3.6vw, 2.7rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.kk-hero-status-pill { background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; padding: .22rem .65rem; font-size: .74rem; font-weight: 700; }
.kk-hero-sub { margin: 0; color: rgba(255, 255, 255, .88); font-size: .9rem; }
.kk-hero-queues { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: .65rem; margin-top: .2rem; }
.kk-queue-box { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); border-radius: 12px; padding: .75rem .85rem; color: white; text-decoration: none; display: grid; gap: .25rem; transition: background .15s ease; }
.kk-queue-box:hover { background: rgba(255, 255, 255, .22); }
.kk-queue-label { font-size: .7rem; font-weight: 700; letter-spacing: .05em; color: rgba(255, 255, 255, .86); display: flex; align-items: center; gap: .35rem; }
.kk-queue-box strong { font-size: 1.15rem; font-weight: 800; }
.dot { width: 7px; height: 7px; border-radius: 999px; display: inline-block; }
.dot-amber { background: #fbbf24; }
.dot-sky { background: #7dd3fc; }
.dot-rose { background: #fda4af; }
.kk-hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-top: auto; padding-top: .25rem; }
.kk-btn-white { background: white; color: var(--blue); border-radius: 10px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 700; font-size: .9rem; }
.kk-btn-white:hover { background: #f8fafc; }
.kk-btn-glass { background: rgba(255, 255, 255, .16); color: white; border: 1px solid rgba(255, 255, 255, .28); border-radius: 10px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 700; font-size: .9rem; }
.kk-btn-glass:hover { background: rgba(255, 255, 255, .25); }

.kk-card-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.kk-section-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .08em; color: #64748b; }
.kk-section-label { font-size: .72rem; font-weight: 800; letter-spacing: .09em; color: #64748b; margin-top: .25rem; }
.kk-progress-list { display: grid; gap: .95rem; }
.kk-progress-row { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; font-size: .86rem; margin-bottom: .35rem; }
.kk-progress-row span { color: var(--muted); font-size: .8rem; }
.kk-bar { height: 7px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.kk-bar-fill { display: block; height: 100%; border-radius: 999px; }
.kk-bar-fill.is-green { background: #10b981; }
.kk-bar-fill.is-blue { background: #2563eb; }
.kk-bar-fill.is-indigo { background: #6366f1; }
.kk-bar-fill.is-amber { background: #f59e0b; }

.kk-analytics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.15rem; align-items: stretch; }
.kk-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .6rem; align-items: end; height: 12.5rem; padding-top: .5rem; }
.kk-chart-col { display: flex; flex-direction: column; align-items: center; gap: .35rem; height: 100%; }
.kk-chart-val { font-size: .74rem; font-weight: 700; color: var(--muted); }
.kk-chart-track { flex: 1; width: 100%; max-width: 2.4rem; background: #f1f5f9; border-radius: 8px; display: flex; align-items: flex-end; overflow: hidden; }
.kk-chart-bar { width: 100%; border-radius: 8px; background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%); transition: height .2s ease; }
.kk-chart-bar.is-empty { background: #cbd5e1; }
.kk-chart-lbl { font-size: .72rem; color: var(--muted); font-weight: 600; }

.kk-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1rem; }
.kk-stat-tile { padding: 1.1rem 1.2rem; display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.kk-stat-tile > div { display: grid; gap: .25rem; }
.kk-stat-kicker { font-size: .68rem; font-weight: 700; letter-spacing: .07em; color: var(--muted); }
.kk-stat-tile strong { font-size: 1.4rem; font-weight: 800; color: var(--ink); }
.kk-stat-icon { width: 2.5rem; height: 2.5rem; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; flex: 0 0 auto; }
.kk-stat-icon.is-blue { background: #eff6ff; color: #2563eb; }
.kk-stat-icon.is-indigo { background: #eef2ff; color: #4f46e5; }
.kk-stat-icon.is-purple { background: #f5f3ff; color: #7c3aed; }
.kk-stat-icon.is-green { background: #ecfdf5; color: #059669; }

/* Tables, Filters, Chips, Details, Support */
.btn-icon { width: 1rem; height: 1rem; margin-right: .4rem; flex: 0 0 auto; }
.btn-sm { min-height: 34px; padding: .3rem .7rem; font-size: .82rem; border-radius: 8px; }
.chip-bar { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .45rem; min-height: 36px; padding: .35rem .85rem; border-radius: 999px; background: white; border: 1px solid var(--line); color: var(--muted); font-size: .84rem; font-weight: 500; text-decoration: none; }
.chip:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.chip.is-active { background: var(--blue); border-color: var(--blue); color: white; font-weight: 600; }
.chip-count { font-size: .72rem; font-weight: 600; padding: .1rem .45rem; border-radius: 999px; background: #f1f5f9; color: #475569; }
.chip.is-active .chip-count { background: rgba(255, 255, 255, .22); color: white; }

.toolbar-row { display: grid; grid-template-columns: minmax(14rem, 1.8fr) repeat(2, minmax(9rem, 1fr)) auto; gap: .7rem; padding: 1rem 1.2rem; align-items: center; }
.search-wrap { position: relative; }
.search-wrap input { padding-left: 2.35rem; }
.search-icon { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: #94a3b8; pointer-events: none; }
.advanced-filters { border-top: 1px solid #f1f5f9; margin: 0; padding: 0 1.2rem; }
.advanced-filters summary { display: inline-flex; align-items: center; gap: .5rem; font-size: .84rem; color: var(--muted); font-weight: 600; min-height: 40px; }
.filters-advanced-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .8rem; padding: .25rem 0 1.1rem; }
.filters-advanced-grid label { display: grid; gap: .3rem; font-size: .8rem; color: var(--muted); }

.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.bulk-bar select { width: auto; min-width: 11rem; min-height: 38px; font-size: .84rem; }
.bulk-bar input { width: auto; min-width: 14rem; min-height: 38px; font-size: .84rem; }
.bulk-bar button { min-height: 38px; font-size: .84rem; }

.col-check { width: 2.5rem; text-align: center; }
.col-check input[type="checkbox"] { width: 1.05rem; height: 1.05rem; min-height: 0; padding: 0; cursor: pointer; }
.col-action { width: 6.5rem; text-align: right; }
.owner-cell { display: flex; align-items: center; gap: .6rem; }
.owner-dot { width: 2rem; height: 2rem; border-radius: 999px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-weight: 600; font-size: .8rem; flex: 0 0 auto; }
.owner-name { font-weight: 600; font-size: .88rem; }

.kk-empty-state { display: grid; place-items: center; text-align: center; padding: 3rem 1.5rem; gap: .55rem; }
.kk-empty-icon { width: 3.2rem; height: 3.2rem; border-radius: 16px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; margin-bottom: .35rem; }
.kk-empty-icon svg { width: 1.6rem; height: 1.6rem; }
.kk-empty-state h3 { margin: 0; font-size: 1.02rem; }
.kk-empty-state p { max-width: 28rem; margin: 0 0 .5rem; }

.data { width: 100%; border-collapse: collapse; text-align: left; }
.data th, .data td { border-bottom: 1px solid var(--line); padding: .8rem 1rem; overflow-wrap: anywhere; vertical-align: middle; }
.data thead th { background: #f8fafc; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.data tbody tr:last-child > * { border-bottom: 0; }
.data tbody tr:hover { background: #f8fbff; }
.row-meta, .mobile-label { font-weight: 400; color: var(--muted); font-size: .8rem; }
.mobile-label { display: none; }
.record-link { display: inline-flex; align-items: center; min-height: 36px; }

.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .75rem; padding: 1rem; border-top: 1px solid var(--line); }
.pagination a, .back { display: inline-flex; align-items: center; min-height: 40px; }
.pagination span { color: var(--muted); }
.review-grid, .account-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; gap: 1rem; }
.review-grid .panel, .account-grid .panel { margin: 0; }
.revision-picker { margin: .9rem 0; }
.revision-picker .actions { margin-top: .3rem; }
.video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #0c1628; border-radius: 12px; }
.downloads { display: flex; flex-wrap: wrap; gap: .75rem; padding: .6rem 0; }
.downloads a { min-height: 40px; display: inline-flex; align-items: center; }
.inline-link { margin-left: .8rem; }
.metadata { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: 1rem; }
.metadata dt { color: var(--muted); font-size: .82rem; }
.metadata dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.history, details { border-top: 1px solid var(--line); margin-top: .8rem; padding-top: .75rem; overflow-wrap: anywhere; }
summary { cursor: pointer; font-weight: 650; min-height: 38px; }
.notice { margin: .8rem 0; border-radius: 10px; padding: .75rem 1rem; }
.notice ul { margin: .35rem 0; padding-left: 1.3rem; }
.failure, .field-error { color: #991b1b; }
.failure { background: #fee2e2; }
.success { background: #dcfce7; color: #166534; }

.dashboard-events { list-style: none; margin: 0; padding: .5rem 1.25rem; }
.dashboard-events li { display: grid; gap: .3rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.dashboard-events li:last-child { border-bottom: 0; }
.dashboard-event-meta { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .8rem; color: var(--muted); }

/* Support Inbox */
.support-grid { display: grid; grid-template-columns: minmax(15rem, 20rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
.thread-list { list-style: none; margin: 0; padding: 0; }
.thread-list li + li { border-top: 1px solid var(--line); }
.thread-item { display: grid; gap: .15rem; padding: .9rem 1.15rem; text-decoration: none; color: var(--ink); }
.thread-item span { font-size: .8rem; color: var(--muted); font-weight: 400; }
.thread-item:hover { background: #f8fafc; }
.thread-item.is-active { background: var(--blue-soft); border-left: 3px solid var(--blue); }
.support-head { padding-bottom: .85rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.support-head p { margin: .2rem 0 0; }
.chat-stream { display: grid; gap: .75rem; max-height: 28rem; overflow-y: auto; padding: .25rem 0 1rem; }
.chat-bubble { max-width: 82%; padding: .75rem 1rem; border-radius: 14px; border: 1px solid var(--line); }
.chat-bubble.is-user { justify-self: start; background: #f8fafc; }
.chat-bubble.is-staff { justify-self: end; background: var(--blue-soft); border-color: #bfdbfe; }
.chat-bubble p { margin: .35rem 0 0; white-space: pre-wrap; }
.chat-meta { display: flex; justify-content: space-between; gap: 1rem; font-size: .76rem; color: var(--muted); font-weight: 600; }

/* Login Page */
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(circle at top right, #dbeafe, transparent 50%), var(--canvas); }
.login-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: min(100%, 56rem); background: white; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: 0 24px 60px rgba(15, 23, 42, .08); }
.login-hero { padding: 2.2rem; color: white; background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%); display: grid; align-content: space-between; gap: 1rem; }
.login-hero-title { font-size: 1.85rem; font-weight: 800; line-height: 1.15; margin: 0; }
.login-hero-title em { font-style: normal; color: #fde68a; display: block; }
.login-hero-copy { color: rgba(255, 255, 255, .9); margin: 0; }
.login-art { max-width: 14rem; margin: .5rem auto 0; }
.login-panel { padding: 2.2rem; display: grid; align-content: center; }
.login-mark { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.25rem; }
.login-mark img { width: 2.2rem; height: 2.2rem; border-radius: 8px; }
.login-form { display: grid; gap: .9rem; margin-top: 1.25rem; }
.login-field { display: grid; gap: .35rem; }
.login-password { position: relative; }
.login-password:has(button:not([hidden])) input { padding-right: 6.5rem; }
.login-password button { position: absolute; inset: 4px 4px 4px auto; min-height: 34px; border: 0; background: transparent; color: var(--blue); font-size: .8rem; }
.login-password button[hidden] { display: none; }

@media (max-width: 1120px) {
    .kk-hero-grid, .kk-analytics-grid { grid-template-columns: minmax(0, 1fr); }
    .kk-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .shell { display: block; }
    .sidebar { position: static; height: auto; overflow-y: visible; border-right: 0; border-bottom: 1px solid var(--line); padding: .75rem 1rem; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
    .brand { padding-bottom: .25rem; border-bottom: 0; }
    .nav-group, .nav-accordion .nav-group-toggle { display: none; }
    .nav-accordion { border-top: 0; margin-top: 0; padding-top: 0; }
    .nav-sub { display: flex; flex-wrap: wrap; padding-bottom: 0; }
    .sidebar nav { display: flex; flex-wrap: wrap; }
    .signout { display: flex; align-items: center; margin: 0; padding: 0; border: 0; }
    .user-meta { display: none; }
    .logout-label { display: none; }
    .toolbar-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .toolbar-row .search-wrap { grid-column: 1 / -1; }
    .filters-advanced-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .support-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
    .review-grid, .account-grid { grid-template-columns: minmax(0, 1fr); }
    .data thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
    .data, .data tbody { display: block; }
    .data tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: .6rem 1rem; gap: .4rem .75rem; }
    .data tr + tr { border-top: 1px solid var(--line); }
    .data th, .data td { padding: .18rem 0; border: 0; }
    .data th, .col-action { grid-column: 1 / -1; text-align: left; }
    .mobile-label { display: block; }
}
@media (max-width: 680px) {
    .login-card { grid-template-columns: minmax(0, 1fr); }
    .login-hero-copy, .login-art { display: none; }
    .kk-hero-queues { grid-template-columns: minmax(0, 1fr); }
    .kk-stats-grid, .toolbar-row, .filters-advanced-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Reusable KameraKita Modern Custom Select */
.kk-control-host { position: relative; display: inline-flex; align-items: center; width: 100%; min-width: 0; }
.kk-native-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; pointer-events: none !important; opacity: 0 !important; }
.kk-select-trigger { display: inline-flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%; min-width: 0; min-height: 42px; padding: .5rem .8rem; border-radius: 10px; border: 1px solid #cbd5e1; background: #fff; color: var(--ink); font-size: .9rem; font-weight: 500; text-align: left; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease; }
.kk-select-trigger.is-compact { min-height: 38px; padding: .38rem .75rem; font-size: .84rem; }
.kk-select-trigger:hover:not(:disabled) { border-color: #60a5fa; background: #f8fbff; }
.kk-select-trigger.is-open, .kk-select-trigger:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, .18); }
.kk-select-trigger.is-placeholder { color: #64748b; }
.kk-trigger-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kk-chevron { width: 1rem; height: 1rem; color: #64748b; flex-shrink: 0; transition: transform .2s ease, color .2s ease; }
.kk-select-trigger.is-open .kk-chevron { transform: rotate(180deg); color: var(--blue); }
.kk-popover { position: fixed; z-index: 9999; background: #fff; border: 1px solid #dbeafe; border-radius: 14px; box-shadow: 0 22px 48px -12px rgba(37, 99, 235, .18), 0 6px 18px rgba(15, 23, 42, .08); overflow: hidden; opacity: 0; transform: translateY(-4px) scale(.98); transition: opacity .16s ease, transform .16s ease; }
.kk-popover.is-open { opacity: 1; transform: translateY(0) scale(1); }
.kk-popover-search-wrap { padding: .5rem; border-bottom: 1px solid #f1f5f9; background: #f8fafc; }
.kk-popover-search { width: 100%; min-height: 34px; border: 1px solid #e2e8f0; border-radius: 8px; padding: .35rem .65rem; font-size: .82rem; color: var(--ink); background: #fff; }
.kk-popover-search:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, .18); }
.kk-select-list { max-height: 15.5rem; overflow-y: auto; padding: .375rem; display: flex; flex-direction: column; gap: .125rem; }
.kk-select-option { width: 100%; min-height: 36px; border: 0; background: transparent; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .48rem .72rem; border-radius: 9px; font-size: .85rem; font-weight: 500; color: #334155; text-align: left; cursor: pointer; transition: background-color .14s ease, color .14s ease; }
.kk-select-option:hover:not(:disabled) { background: #eff6ff; color: #1d4ed8; }
.kk-select-option.is-selected { background: linear-gradient(90deg, #eff6ff 0%, #e0f2fe 100%); color: #1d4ed8; font-weight: 600; }
.kk-option-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kk-option-check { width: 1rem; height: 1rem; color: var(--blue); flex-shrink: 0; }
.kk-popover-empty { padding: 1rem; text-align: center; font-size: .8rem; color: #94a3b8; }

/* Reusable Modern Modal & Soft Form Fields */
.kk-modal-backdrop { position: fixed; inset: 0; z-index: 9000; background: rgba(15, 23, 42, .45); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 1.25rem; opacity: 0; transition: opacity .16s ease; }
.kk-modal-backdrop[hidden] { display: none; }
.kk-modal-backdrop.is-open { opacity: 1; }
.kk-modal { width: min(100%, 34rem); max-height: 92vh; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 28px 64px -16px rgba(15, 23, 42, .25); }
.kk-modal-wide { width: min(100%, 48rem); }
.kk-stat-icon svg { width: 1.25rem; height: 1.25rem; }
.kk-table-wrap { width: 100%; overflow-x: auto; }
.nowrap { white-space: nowrap; }
.kk-field-row-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .85rem; }
.kk-checkbox-row { display: flex; align-items: center; gap: .55rem; font-weight: 500; font-size: .88rem; color: var(--ink); cursor: pointer; }
.kk-checkbox-row input[type="checkbox"] { width: 1.05rem; height: 1.05rem; min-height: 0; padding: 0; }
@media (max-width: 680px) { .kk-field-row-3 { grid-template-columns: minmax(0, 1fr); } }

/* Task Edit Preview & Danger Zone */
.kk-mobile-preview { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; }
.kk-preview-banner { padding: 1.05rem 1.1rem; color: #fff; background: linear-gradient(135deg, #0f3d66 0%, #0369a1 100%); display: grid; gap: .3rem; }
.kk-preview-banner strong { font-size: 1.05rem; font-weight: 600; }
.kk-preview-banner > span:last-child { font-size: .76rem; color: rgba(255, 255, 255, .82); }
.kk-preview-pill { display: inline-flex; width: fit-content; padding: .16rem .55rem; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: .7rem; font-weight: 600; }
.kk-preview-body { padding: .9rem 1.1rem; display: grid; gap: .65rem; }
.kk-preview-body p { margin: 0; font-size: .84rem; }
.kk-preview-meta { display: flex; flex-wrap: wrap; gap: .5rem .85rem; font-size: .78rem; color: var(--muted); font-weight: 600; }
.kk-danger-panel { border-color: #fecaca; background: #fffafa; }
.kk-btn-danger { color: #991b1b; border-color: #fca5a5; background: #fff; }
.kk-btn-danger:hover { background: #fee2e2; border-color: #f87171; }

/* Domain Selector Cards (Household & Industrial) */
.kk-domain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1.25rem; }
.kk-domain-card { padding: 1.65rem; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: .75rem; transition: transform .16s ease, box-shadow .18s ease, border-color .16s ease; }
.kk-domain-card:hover { transform: translateY(-3px); border-color: #93c5fd; box-shadow: 0 18px 36px -12px rgba(37, 99, 235, .18); }
.kk-domain-top { display: flex; justify-content: space-between; align-items: center; }
.kk-domain-icon { width: 3.1rem; height: 3.1rem; border-radius: 14px; display: grid; place-items: center; }
.kk-domain-icon svg { width: 1.55rem; height: 1.55rem; }
.kk-domain-icon.is-sky { background: #e0f2fe; color: #0284c7; }
.kk-domain-icon.is-blue { background: #eff6ff; color: #2563eb; }
.kk-domain-card h2 { font-size: 1.3rem; }
.kk-domain-card p { margin: 0; line-height: 1.55; }
.kk-domain-foot { margin-top: auto; padding-top: .85rem; border-top: 1px solid #f1f5f9; display: flex; justify-content: space-between; align-items: center; font-size: .86rem; color: var(--muted); font-weight: 600; }
.kk-domain-cta { color: var(--blue); font-weight: 600; }
@media (max-width: 760px) { .kk-domain-grid { grid-template-columns: minmax(0, 1fr); } }

/* Hostinger-inspired Bento Motion & Sparklines */
.kk-reveal { opacity: 0; transform: translateY(8px); transition: opacity 240ms cubic-bezier(0.22, 1, 0.36, 1), transform 240ms cubic-bezier(0.22, 1, 0.36, 1); }
.kk-reveal.is-visible { opacity: 1; transform: translateY(0); }
.kk-spark { width: 4.5rem; height: 1.65rem; flex: 0 0 auto; }
@media (prefers-reduced-motion: reduce) {
    .kk-reveal { opacity: 1; transform: none; transition: none; }
}
.kk-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.25rem 1.4rem; border-bottom: 1px solid #f1f5f9; }
.kk-modal-title-wrap { display: flex; align-items: center; gap: .85rem; }
.kk-modal-title-wrap h2 { font-size: 1.08rem; }
.kk-modal-title-wrap p { margin: .15rem 0 0; font-size: .84rem; }
.kk-modal-close { width: 2.1rem; height: 2.1rem; min-height: 0; padding: 0; border: 0; background: #f8fafc; color: var(--muted); border-radius: 10px; font-size: 1.25rem; line-height: 1; }
.kk-modal-close:hover { background: #f1f5f9; color: var(--ink); }
.kk-modal-form { padding: 1.35rem 1.4rem; display: grid; gap: .95rem; }
.kk-field { display: grid; gap: .35rem; }
.kk-field input, .kk-field textarea { background: #f8fafc; border-color: #e2e8f0; border-radius: 11px; padding: .58rem .85rem; }
.kk-field input:focus, .kk-field textarea:focus { outline: none; background: #fff; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }
.kk-field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .85rem; }
.kk-modal-foot { display: flex; justify-content: flex-end; gap: .6rem; padding-top: .5rem; margin-top: .25rem; border-top: 1px solid #f1f5f9; }
@media (max-width: 560px) { .kk-field-row { grid-template-columns: minmax(0, 1fr); } }
