:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --primary: #4f46e5;
    --primary-2: #7c3aed;
    --primary-soft: #eef2ff;
    --success: #10b981;
    --danger: #ef4444;
    --radius: 16px;
    --sidebar-w: 264px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: "Segoe UI", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background:
        radial-gradient(1100px 520px at 100% -10%, #eef2ff 0, transparent 58%),
        radial-gradient(900px 480px at -10% 100%, #f5f3ff 0, transparent 55%),
        var(--bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

h1 {
    font-size: 26px;
    line-height: 1.2;
    margin: 0 0 6px;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 16px;
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}

p {
    margin: 0;
}

small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.icon {
    flex: 0 0 auto;
}

/* Shell */
.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-w);
    padding: 22px 16px 18px;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
    border-right: 1px solid var(--border);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 6px;
    margin-bottom: 26px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--text);
    font-weight: 700;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.32);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 16px;
}

.brand-text small {
    font-size: 10.5px;
    color: var(--muted);
    font-weight: 500;
}

.brand-mark-lg {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    border-radius: 13px;
    font-size: 14px;
}

.side-nav {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
    padding-bottom: 8px;
}

.nav-label {
    margin: 16px 10px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #94a3b8;
}

.nav-label:first-child {
    margin-top: 0;
}

.side-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 11px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.side-link .icon {
    color: #94a3b8;
    transition: color 0.16s ease;
}

.side-link:hover {
    background: var(--surface-2);
    color: var(--text);
    transform: translateX(2px);
}

.side-link:hover .icon {
    color: var(--primary);
}

.side-link.active {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(124, 58, 237, 0.07));
    color: var(--primary);
}

.side-link.active .icon {
    color: var(--primary);
}

.side-link.active::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--primary), var(--primary-2));
}

.side-link-accent {
    margin-top: 14px;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.26);
}

.side-link-accent .icon {
    color: #fff;
}

.side-link-accent:hover {
    background: linear-gradient(135deg, #4338ca, #6d28d9);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(79, 70, 229, 0.32);
}

.sidebar-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.sidebar-foot > .lang-switch {
    align-self: center;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-2);
}

.user-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: linear-gradient(135deg, #e0e7ff, #ede9fe);
    color: var(--primary);
    font-weight: 800;
}

.user-meta {
    min-width: 0;
    flex: 1;
    line-height: 1.3;
}

.user-meta strong {
    display: block;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-meta span {
    display: block;
    font-size: 11px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-meta .user-nik {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.icon-btn:hover {
    background: #fff;
    border-color: var(--border);
    color: var(--text);
}

.sidebar-close {
    display: none;
}

.sidebar-overlay {
    display: none;
}

.main-area {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
}

.mobile-bar {
    display: none;
}

/* Language switch */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
}

.lang-switch .lang-icon {
    margin: 0 4px 0 6px;
    color: var(--muted);
}

.lang-switch a {
    padding: 5px 11px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.lang-switch a:hover {
    color: var(--text);
}

.lang-switch a.active {
    background: #fff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.lang-switch.is-compact .lang-icon {
    display: none;
}

/* Page */
.page {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 38px 40px 64px;
}

.page > * {
    animation: rise 0.38s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.page > *:nth-child(2) { animation-delay: 0.04s; }
.page > *:nth-child(3) { animation-delay: 0.08s; }
.page > *:nth-child(4) { animation-delay: 0.12s; }
.page > *:nth-child(5) { animation-delay: 0.16s; }

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.page-head p {
    color: var(--muted);
    font-size: 14px;
}

.identity-nik {
    color: var(--text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.identity-separator {
    margin: 0 4px;
    color: #cbd5e1;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.breadcrumb {
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
}

.breadcrumb a {
    color: var(--muted);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.badge-row {
    display: flex;
    gap: 8px;
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px;
}

.card + .card {
    margin-top: 20px;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.card-head h2 {
    margin: 0;
}

.card-head a {
    font-size: 13px;
    font-weight: 600;
}

/* Stats */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat {
    position: relative;
    padding: 18px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-top {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.stat strong {
    display: block;
    margin-top: 12px;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

.stat-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
}

.stat-icon-total { background: #eef2ff; color: #4f46e5; }
.stat-icon-blue { background: #e0edff; color: #1d4ed8; }
.stat-icon-amber { background: #fef3c7; color: #b45309; }
.stat-icon-green { background: #dcfce7; color: #15803d; }
.stat-icon-gray { background: #f1f5f9; color: #475569; }

/* Tables */
.table-wrap {
    overflow-x: auto;
    margin: 0 -22px;
    padding: 0 22px;
}

table {
    width: 100%;
    min-width: 560px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

th {
    padding: 10px 14px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}

th:first-child {
    border-radius: 10px 0 0 10px;
}

th:last-child {
    border-radius: 0 10px 10px 0;
}

td {
    padding: 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

tbody tr {
    transition: background 0.14s ease;
}

tbody tr:hover {
    background: #fafbff;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.ticket-link {
    font-weight: 700;
    color: var(--text);
}

.ticket-link:hover {
    color: var(--primary);
}

.empty-state {
    color: var(--muted);
    padding: 34px 10px;
    text-align: center;
    font-size: 14px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

.badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.65;
}

.badge-blue { background: #e0edff; color: #1d4ed8; }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-red { background: #fee2e2; color: #b91c1c; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.btn:active {
    transform: translateY(0) scale(0.99);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.24);
}

.btn-primary:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(79, 70, 229, 0.32);
}

.btn-ghost {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: #cbd5e1;
    background: var(--surface-2);
}

.btn-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.btn-danger:hover {
    background: #fecaca;
    color: #991b1b;
}

.btn-sm {
    padding: 7px 12px;
    font-size: 12.5px;
    border-radius: 9px;
}

.btn-block {
    width: 100%;
}

/* Forms */
.stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stack-lg {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 13.5px;
}

.field > span {
    font-weight: 600;
}

.field > span small {
    display: inline;
    font-weight: 400;
    color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #d7dce4;
    border-radius: 11px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input::placeholder,
textarea::placeholder {
    color: #a3acc0;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #c3cad6;
}

textarea {
    resize: vertical;
    min-height: 110px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13.5px;
    color: var(--muted);
}

.checkbox input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--primary);
    flex: 0 0 auto;
}

.form-card {
    max-width: 760px;
}

.form-card .field + .field {
    margin-top: 18px;
}

.form-card .checkbox {
    margin-top: 20px;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.row-actions form {
    margin: 0;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: end;
    margin-bottom: 20px;
}

.filter-bar .field {
    flex: 1 1 150px;
}

.filter-bar .field:first-child {
    flex: 2 1 240px;
}

.filter-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* Alerts */
.alert {
    display: flex;
    gap: 11px;
    border-radius: 12px;
    padding: 13px 16px;
    font-size: 13.5px;
    margin-bottom: 18px;
}

.alert-icon {
    margin-top: 2px;
}

.alert ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

/* Toast */
.toast {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(430px, calc(100vw - 44px));
    padding: 13px 15px;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    background: #fff;
    color: #065f46;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: toast-in 0.24s ease-out;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-leaving {
    opacity: 0;
    transform: translateY(-8px);
}

.toast-icon {
    display: grid;
    place-items: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--success);
    color: #fff;
}

.toast-text {
    flex: 1;
}

.toast-close {
    margin-left: 2px;
    border: 0;
    background: transparent;
    color: #047857;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    transform-origin: left;
    animation: toast-progress 5s linear forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* Detail */
.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}

.prose {
    white-space: pre-line;
    color: #334155;
}

.reply {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
}

.avatar {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e0e7ff, #ede9fe);
    color: var(--primary);
    font-weight: 800;
}

.reply-body {
    flex: 1;
    min-width: 0;
}

.reply-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.reply-head span {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 2px 8px;
    border-radius: 999px;
}

.reply-head time {
    margin-left: auto;
    font-size: 12px;
    color: var(--muted);
}

.reply-form {
    margin-top: 18px;
}

.reply-form .field {
    margin-bottom: 12px;
}

.meta-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 0;
}

.meta-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
}

.meta-list dt {
    color: var(--muted);
    white-space: nowrap;
}

.meta-list dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
}

/* Pagination */
.pagination-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.page-link {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 600;
    background: #fff;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.page-link:hover {
    background: var(--surface-2);
    border-color: #cbd5e1;
}

.page-link.active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.24);
}

.page-link.disabled {
    color: #9ca3af;
    background: var(--surface-2);
}

.page-ellipsis {
    padding: 0 4px;
    color: var(--muted);
}

.page-info {
    font-size: 12.5px;
    color: var(--muted);
}

/* Guest */
.guest-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
    overflow: hidden;
    background:
        radial-gradient(800px 500px at 100% 0%, #e0e7ff 0, transparent 55%),
        radial-gradient(700px 500px at 0% 100%, #ede9fe 0, transparent 55%),
        var(--bg);
}

.guest-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    pointer-events: none;
}

.guest-glow-one {
    width: 340px;
    height: 340px;
    top: -120px;
    left: -100px;
    background: #c7d2fe;
}

.guest-glow-two {
    width: 380px;
    height: 380px;
    right: -130px;
    bottom: -140px;
    background: #ddd6fe;
}

.guest-lang {
    position: fixed;
    top: 20px;
    right: 22px;
    z-index: 3;
}

.guest-lang .lang-switch {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
}

.guest-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
    padding: 34px;
    animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.guest-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 28px;
}

.guest-brand h1 {
    font-size: 20px;
    margin: 0;
}

.guest-brand p {
    font-size: 12.5px;
    color: var(--muted);
}

.guest-foot {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 18px;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    z-index: 2;
}

.auth-switch {
    margin-top: 18px;
    text-align: center;
    font-size: 13.5px;
    color: var(--muted);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.sso-intro h2 {
    font-size: 18px;
    margin-bottom: 6px;
}

.sso-intro p {
    color: var(--muted);
    font-size: 14px;
}

.auth-switch a {
    font-weight: 700;
}

.demo-accounts {
    margin-top: 20px;
    border-top: 1px dashed var(--border);
    padding-top: 14px;
    font-size: 12px;
    color: var(--muted);
}

.demo-accounts ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

code {
    background: var(--primary-soft);
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 12px;
    color: #4338ca;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 1180px) {
    .stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
        background: rgba(255, 255, 255, 0.98);
    }

    .sidebar-close {
        display: inline-grid;
    }

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 35;
        background: rgba(15, 23, 42, 0.45);
        backdrop-filter: blur(2px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.24s ease;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .main-area {
        margin-left: 0;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .mobile-bar {
        position: sticky;
        top: 0;
        z-index: 30;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        height: 64px;
        padding: 0 20px;
        background: rgba(255, 255, 255, 0.86);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border);
    }

    .brand-compact {
        font-size: 15px;
    }

    .brand-compact .brand-mark {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
        border-radius: 9px;
        font-size: 11px;
    }

    .page {
        padding: 28px 24px 56px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .page {
        padding: 22px 16px 48px;
    }

    .page-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat {
        padding: 15px;
    }

    .stat strong {
        font-size: 27px;
    }

    .filter-actions {
        width: 100%;
        margin-left: 0;
    }

    .filter-actions .btn {
        flex: 1;
    }

    .form-actions .btn {
        flex: 1;
    }

    .card {
        padding: 18px;
    }

    .table-wrap {
        margin: 0 -18px;
        padding: 0 18px;
    }

    .guest-card {
        padding: 26px 22px;
    }

    .guest-lang {
        top: 14px;
        right: 14px;
    }

    .toast {
        top: 74px;
        right: 14px;
        left: 14px;
        max-width: none;
    }

    .meta-list div {
        flex-direction: column;
        gap: 2px;
    }

    .meta-list dd {
        text-align: left;
    }
}

@media (max-width: 420px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .brand-text small {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
