/* =========================================================
   MeMuTa Console · Kurumsal tasarım sistemi
   ========================================================= */

:root {
    color-scheme: dark;

    --bg: #0a101c;
    --bg-sub: #0c1524;
    --surface: #101a2b;
    --surface-2: #152136;
    --surface-3: #1a2942;

    --border: #1e2c44;
    --border-strong: #2a3b58;

    --text: #e8eef8;
    --text-2: #a6b5cc;
    --text-3: #77899f;

    --accent: #3b82f6;
    --accent-hover: #2f74e6;
    --accent-soft: rgba(59, 130, 246, 0.14);
    --accent-text: #ffffff;

    --ok: #22c55e;
    --ok-soft: rgba(34, 197, 94, 0.14);
    --warn: #f59e0b;
    --warn-soft: rgba(245, 158, 11, 0.14);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.14);
    --neutral-soft: rgba(148, 163, 184, 0.14);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 12px 30px -18px rgba(0, 0, 0, 0.65);

    --radius-sm: 8px;
    --radius: 10px;
    --radius-lg: 14px;

    --sidebar-w: 264px;
    --topbar-h: 64px;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="light"] {
    color-scheme: light;

    --bg: #f4f6fa;
    --bg-sub: #eef2f8;
    --surface: #ffffff;
    --surface-2: #f7f9fc;
    --surface-3: #eef3f9;

    --border: #e1e8f0;
    --border-strong: #cfd9e6;

    --text: #0e1a2c;
    --text-2: #4f6076;
    --text-3: #7b8ba0;

    --accent: #1d4ed8;
    --accent-hover: #1a45bd;
    --accent-soft: rgba(29, 78, 216, 0.08);
    --accent-text: #ffffff;

    --ok: #15803d;
    --ok-soft: rgba(21, 128, 61, 0.1);
    --warn: #b45309;
    --warn-soft: rgba(180, 83, 9, 0.1);
    --danger: #b91c1c;
    --danger-soft: rgba(185, 28, 28, 0.1);
    --neutral-soft: rgba(100, 116, 139, 0.12);

    --shadow-sm: 0 1px 2px rgba(15, 26, 44, 0.06);
    --shadow-md: 0 16px 36px -24px rgba(15, 26, 44, 0.35);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color 0.2s ease, color 0.2s ease;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-weight: 650;
    letter-spacing: -0.01em;
}

p {
    margin: 0;
}

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

a:hover {
    text-decoration: underline;
}

svg {
    display: block;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

::selection {
    background: var(--accent-soft);
}

/* ---------- App shell ---------- */

.app {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
    height: 100vh;
    padding: 22px 14px 18px;
    background: var(--bg-sub);
    border-right: 1px solid var(--border);
    z-index: 40;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 10px;
    color: var(--text);
    text-decoration: none;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(140deg, #2563eb, #0e7490);
    box-shadow: 0 6px 16px -8px rgba(37, 99, 235, 0.8);
}

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

.brand-text strong {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.brand-text small {
    font-size: 10.5px;
    color: var(--text-3);
    letter-spacing: 0.04em;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.nav-label {
    padding: 0 12px;
    margin-bottom: 8px;
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 550;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-link svg {
    width: 17px;
    height: 17px;
    flex: none;
    stroke-width: 1.7;
    opacity: 0.85;
}

.nav-link:hover {
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
}

.nav-link.is-active {
    background: var(--accent-soft);
    color: var(--accent);
}

.nav-link.is-active svg {
    opacity: 1;
}

.sidebar-foot {
    margin-top: auto;
}

.sidebar-foot-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.sidebar-foot-card strong {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
}

.sidebar-foot-card small {
    display: block;
    font-size: 11px;
    color: var(--text-3);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 3px var(--ok-soft);
    flex: none;
}

.main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: var(--topbar-h);
    padding: 10px 28px;
    background: color-mix(in srgb, var(--bg-sub) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.topbar-titles h1 {
    font-size: 16px;
    font-weight: 650;
}

.topbar-titles p {
    font-size: 12px;
    color: var(--text-3);
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--text);
}

.menu-btn {
    display: none;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 12px 4px 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
}

.avatar {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
}

.user-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-2);
}

.logout-form {
    margin: 0;
}

.content {
    width: 100%;
    max-width: 1440px;
    padding: 26px 28px 48px;
}

.sidebar-backdrop {
    display: none;
}

/* ---------- Page sections ---------- */

.page-section {
    margin-top: 24px;
}

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

.section-head h2 {
    font-size: 14.5px;
    font-weight: 650;
}

.section-head .link {
    font-size: 12.5px;
    font-weight: 600;
}

/* ---------- Cards ---------- */

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

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 13.5px;
    font-weight: 650;
}

.card-sub {
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-3);
}

.card-body {
    padding: 20px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.stat {
    padding: 18px 20px;
}

.stat-label {
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.stat-value {
    margin-top: 8px;
    font-size: 30px;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.stat-value.is-text {
    font-size: 19px;
    letter-spacing: 0;
}

.stat-foot {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-3);
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.action-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.action-card:hover {
    text-decoration: none;
    border-color: var(--border-strong);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.action-card strong {
    font-size: 13.5px;
    font-weight: 650;
}

.action-card span {
    font-size: 12.5px;
    color: var(--text-3);
}

.action-card .arrow {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-text);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
}

.btn-outline {
    border-color: var(--border-strong);
    background: var(--surface);
    color: var(--text-2);
}

.btn-outline:hover:not(:disabled) {
    background: var(--surface-2);
    color: var(--text);
}

.btn-ghost {
    color: var(--text-2);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--surface-2);
    color: var(--text);
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.btn-danger:hover:not(:disabled) {
    filter: brightness(0.94);
}

.btn-sm {
    height: 32px;
    padding: 0 12px;
    font-size: 12.5px;
}

.btn-block {
    width: 100%;
}

.file-btn {
    position: relative;
    overflow: hidden;
}

.file-btn input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* ---------- Forms ---------- */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
}

.hint {
    font-size: 11.5px;
    color: var(--text-3);
}

.input,
.select,
.textarea {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.select {
    appearance: none;
    padding-right: 34px;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%),
        linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
    background-position: calc(100% - 18px) 16px, calc(100% - 13px) 16px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.textarea {
    height: auto;
    min-height: 78px;
    padding: 10px 12px;
    resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
    color: var(--text-3);
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.input:read-only {
    background: var(--surface-2);
    color: var(--text-2);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
}

.form-section + .form-section {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.form-section-title {
    margin-bottom: 14px;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.filter-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    align-items: end;
}

/* ---------- Tables ---------- */

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th,
.table td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.table th {
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-3);
    background: var(--surface-2);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr.is-clickable {
    cursor: pointer;
}

.table tbody tr.is-clickable:hover {
    background: var(--surface-2);
}

.table .cell-note {
    min-width: 260px;
    max-width: 420px;
    white-space: normal;
}

.table .cell-mono {
    font-family: var(--mono);
    font-size: 12.5px;
}

.badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: 0.01em;
}

.badge-ok {
    color: var(--ok);
    background: var(--ok-soft);
}

.badge-warn {
    color: var(--warn);
    background: var(--warn-soft);
}

.badge-danger {
    color: var(--danger);
    background: var(--danger-soft);
}

.badge-accent {
    color: var(--accent);
    background: var(--accent-soft);
}

.badge-neutral {
    color: var(--text-2);
    background: var(--neutral-soft);
}

/* ---------- Empty / loading / pager ---------- */

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 42px 20px;
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
}

.empty-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text-3);
    font-size: 18px;
}

.empty strong {
    color: var(--text-2);
    font-weight: 600;
}

.spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border-strong);
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
}

.spinner-lg {
    width: 26px;
    height: 26px;
    border-width: 3px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px;
    color: var(--text-3);
    font-size: 12.5px;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--text-2);
}

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

.pager-select {
    height: 32px;
    padding: 0 28px 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background-color: var(--surface);
    color: var(--text);
    font-size: 12.5px;
    appearance: none;
}

/* ---------- Alerts ---------- */

.alert {
    padding: 11px 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.alert-error {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: color-mix(in srgb, var(--danger) 32%, transparent);
}

.alert-ok {
    color: var(--ok);
    background: var(--ok-soft);
    border-color: color-mix(in srgb, var(--ok) 32%, transparent);
}

/* ---------- Toast ---------- */

.toast-host {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 120;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: calc(100vw - 40px);
}

.toast {
    min-width: 260px;
    max-width: 400px;
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-left-width: 3px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    box-shadow: var(--shadow-md);
    animation: toast-in 0.18s ease both;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast-ok {
    border-left-color: var(--ok);
}

.toast-error {
    border-left-color: var(--danger);
}

.toast-info {
    border-left-color: var(--accent);
}

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

/* ---------- Modal ---------- */

.modal {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: none;
    place-items: center;
    padding: 24px;
    background: rgba(3, 8, 17, 0.62);
    backdrop-filter: blur(2px);
}

.modal.is-open {
    display: grid;
}

.modal-card {
    display: flex;
    flex-direction: column;
    width: min(1040px, 100%);
    max-height: 86vh;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    animation: toast-in 0.16s ease both;
}

.modal-card.is-sm {
    width: min(480px, 100%);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-head h3 {
    font-size: 14px;
    font-weight: 650;
}

.modal-body {
    padding: 20px;
    overflow: auto;
}

.modal-body .form-grid {
    margin-bottom: 4px;
}

.modal-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
}

/* ---------- Utilities ---------- */

.mt-sm {
    margin-top: 10px;
}

.mt-md {
    margin-top: 18px;
}

.text-muted {
    color: var(--text-3);
}

.text-sm {
    font-size: 12.5px;
}

.mono {
    font-family: var(--mono);
}

.row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.row-end {
    justify-content: flex-end;
}

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

/* ---------- Theme toggle ---------- */

.theme-toggle {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-2);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--text);
}

.theme-toggle .tt-sun,
.theme-toggle .tt-moon {
    grid-area: 1 / 1;
    transition: opacity 0.2s ease, transform 0.3s ease;
}

[data-theme="dark"] .theme-toggle .tt-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0.4);
}

[data-theme="light"] .theme-toggle .tt-sun {
    opacity: 0;
    transform: rotate(-90deg) scale(0.4);
}

/* ---------- Auth ---------- */

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    background: var(--bg);
}

.auth-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: 52px;
    overflow: hidden;
    color: #e8f0ff;
    background:
        radial-gradient(900px 600px at 12% 0%, rgba(37, 99, 235, 0.5), transparent 60%),
        radial-gradient(800px 600px at 90% 100%, rgba(14, 116, 144, 0.35), transparent 62%),
        linear-gradient(160deg, #0b1a33 0%, #070e1b 100%);
}

.auth-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 180, 226, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 180, 226, 0.06) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(circle at 30% 20%, #000 0%, transparent 78%);
    pointer-events: none;
}

.auth-visual > * {
    position: relative;
    z-index: 1;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-brand .brand-mark {
    width: 42px;
    height: 42px;
    font-size: 19px;
}

.auth-brand strong {
    display: block;
    font-size: 17px;
    letter-spacing: 0.08em;
}

.auth-brand small {
    display: block;
    font-size: 11px;
    color: rgba(210, 226, 250, 0.65);
    letter-spacing: 0.06em;
}

.auth-visual h2 {
    max-width: 460px;
    font-size: 30px;
    font-weight: 650;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.auth-visual p {
    max-width: 440px;
    margin-top: 14px;
    font-size: 14px;
    color: rgba(210, 226, 250, 0.72);
}

.auth-points {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: rgba(210, 226, 250, 0.8);
}

.auth-points li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-points li::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8;
    flex: none;
}

.auth-foot {
    font-size: 11.5px;
    color: rgba(210, 226, 250, 0.45);
    letter-spacing: 0.04em;
}

.auth-form-panel {
    position: relative;
    display: grid;
    place-items: center;
    padding: 32px;
    background: var(--bg);
}

.auth-form-panel .theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
}

.auth-card h1 {
    font-size: 22px;
    font-weight: 650;
}

.auth-lede {
    margin: 8px 0 24px;
    font-size: 13.5px;
    color: var(--text-3);
}

.auth-form .field + .field {
    margin-top: 16px;
}

.auth-form .btn {
    margin-top: 22px;
}

.auth-hint {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-3);
    text-align: center;
}

.auth-hint code {
    padding: 2px 6px;
    border-radius: 5px;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--text-2);
    background: var(--surface-2);
}

.auth-form-panel .alert {
    margin-bottom: 16px;
}

/* ---------- Action lists (Excel / yedekleme) ---------- */

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0 28px;
}

.action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--border);
}

.action-row:last-child {
    border-bottom: none;
}

.action-row > span {
    font-size: 12.5px;
    color: var(--text-2);
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
    .auth-visual {
        padding: 38px;
    }

    .auth-visual h2 {
        font-size: 24px;
    }
}

@media (max-width: 980px) {
    .app {
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: var(--sidebar-w);
        transform: translateX(-102%);
        transition: transform 0.22s ease;
        box-shadow: var(--shadow-md);
    }

    .sidebar.is-open {
        transform: none;
    }

    .sidebar-backdrop.is-open {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 35;
        background: rgba(3, 8, 17, 0.55);
    }

    .menu-btn {
        display: inline-grid;
    }

    .content {
        padding: 20px 18px 40px;
    }

    .topbar {
        padding: 10px 18px;
    }

    .topbar-titles p {
        display: none;
    }

    .auth-page {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-visual {
        display: none;
    }
}

@media (max-width: 560px) {
    .user-name {
        display: none;
    }

    .user-chip {
        padding: 4px;
        border-radius: 50%;
    }

    .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .form-actions .btn {
        width: 100%;
    }

    .stat-value {
        font-size: 26px;
    }
}
