:root {
    /* Accent palette */
    --accent-purple: #7367f0;
    --accent-orange: #ff9f43;
    --accent-cyan: #00cfe8;
    --accent-green: #28c76f;
    --accent-red: #ea5455;

    /* Surfaces */
    --bg: #ffffff;
    --sidebar: #f8f7fc;
    --panel: #ffffff;
    --panel-2: #fcfbff;
    --text: #283046;
    --text-muted: #6e6b7b;
    --muted: #b9b9c3;
    --line: #ebe9f1;
    --line-soft: #f4f3f8;
    --surface-hover: var(--line-soft);
    --surface-hover-strong: #ebe9f1;
    --field-bg: var(--panel-2);
    --field-bg-hover: var(--bg);
    --btn-surface: var(--panel);
    --btn-surface-hover: var(--panel-2);

    /* Brand (primary = purple) */
    --brand: var(--accent-purple);
    --brand-hover: #6258cc;
    --brand-rgb: 115, 103, 240;
    --brand-soft: color-mix(in srgb, var(--accent-purple) 14%, transparent);
    --brand-softer: color-mix(in srgb, var(--accent-purple) 7%, transparent);

    --accent: var(--accent-purple);

    /* Status */
    --error-bg: color-mix(in srgb, var(--accent-red) 10%, #ffffff);
    --error-text: #d04550;
    --error-line: color-mix(in srgb, var(--accent-red) 18%, #ffffff);
    --success-bg: color-mix(in srgb, var(--accent-green) 12%, #ffffff);
    --success-text: #1e9e5a;
    --success-line: color-mix(in srgb, var(--accent-green) 22%, #ffffff);
    --info-bg: color-mix(in srgb, var(--accent-cyan) 12%, #ffffff);
    --info-text: #009fb5;
    --info-line: color-mix(in srgb, var(--accent-cyan) 22%, #ffffff);
    --warning-bg: color-mix(in srgb, var(--accent-orange) 12%, #ffffff);
    --warning-text: #c87820;
    --warning-line: color-mix(in srgb, var(--accent-orange) 22%, #ffffff);

    /* Design Tokens */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Minimal Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--accent-purple) 28%, var(--line));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--accent-purple) 45%, var(--line));
}

[data-theme="dark"] {
    --bg: #0a0a0f;
    --sidebar: #0e0d14;
    --panel: #14131c;
    --panel-2: #1a1924;
    --text: #f0eff5;
    --text-muted: #9a97a8;
    --line: #2a2838;
    --line-soft: #252434;
    --surface-hover: color-mix(in srgb, var(--text) 10%, var(--sidebar));
    --surface-hover-strong: color-mix(in srgb, var(--text) 14%, var(--panel-2));
    --field-bg: #1e1d28;
    --field-bg-hover: #2a2838;
    --btn-surface: var(--field-bg);
    --btn-surface-hover: var(--field-bg-hover);
    --muted: #5e5c6e;
    --brand: var(--accent-purple);
    --brand-hover: #8f85f3;
    --brand-soft: color-mix(in srgb, var(--accent-purple) 22%, transparent);
    --brand-softer: color-mix(in srgb, var(--accent-purple) 10%, transparent);
    --error-bg: color-mix(in srgb, var(--accent-red) 16%, #14131c);
    --success-bg: color-mix(in srgb, var(--accent-green) 14%, #14131c);
    --info-bg: color-mix(in srgb, var(--accent-cyan) 14%, #14131c);
    --warning-bg: color-mix(in srgb, var(--accent-orange) 14%, #14131c);
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
}

/* Toggle Switch Global */
.adm-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.adm-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.adm-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--line);
    transition: .4s;
    border-radius: 24px;
}

.adm-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: .4s;
    border-radius: 50%;
}

*, *::before, *::after {
    box-shadow: none !important;
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

input:checked + .adm-slider {
    background-color: var(--brand);
}

input:checked + .adm-slider:before {
    transform: translateX(20px);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--adm-font-family, 'Poppins', system-ui, -apple-system, sans-serif);
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

button {
    font: inherit;
    cursor: pointer;
    transition: var(--transition);
}

/* Modules & Sections */
.adm-module {
    /* Transitions are now handled by .adm-module-container in Dashboard.css for better performance */
}

.adm-module-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.adm-module-toolbar--split {
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.adm-module-toolbar--split .adm-functions-desc {
    margin: 0;
    flex: 1;
    min-width: 0;
}

.adm-kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-purple);
    font-weight: 700;
    margin-bottom: 8px;
}

.adm-module-foot-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    
}

/* Cards & Containers */
.adm-section {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

/* Forms & Inputs */
.adm-panel-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.adm-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}

label:focus-within {
    color: var(--brand);
}

input,
textarea,
select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--field-bg, var(--panel-2));
    color: var(--text);
    font-size: 14px;
    transition: var(--transition);
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--brand-softer);
    outline-offset: 0;
    border-color: var(--brand);
    background: var(--field-bg-hover, var(--bg));
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: var(--field-bg);
    border-color: color-mix(in srgb, var(--line) 88%, var(--text) 12%);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
    background: var(--field-bg-hover);
    border-color: var(--brand);
    outline: 2px solid var(--brand-softer);
    outline-offset: 0;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--muted);
    opacity: 1;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
    opacity: 0.6;
}

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

/* Buttons — dolgu icin line-soft kullanmayin; --btn-surface / --field-bg */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: var(--btn-surface);
    color: var(--text);
    white-space: nowrap;
    gap: 10px;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.button:hover:not(:disabled) {
    background: var(--btn-surface-hover);
    border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
    color: var(--text);
}

.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.button.primary {
    background: var(--accent-purple);
    border-color: transparent;
    color: #fff;
}

.button.primary:hover {
    background: var(--brand-hover);
}

.button.full {
    width: 100%;
}

/* Tables */
.adm-table-wrap {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--panel);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 16px 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--sidebar);
    border-bottom: 1px solid var(--line);
}

td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 14px;
    vertical-align: middle;
}

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

/* Toast: konum ve renkler assets/css/pages/Dashboard.css içinde */

.alert {
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid transparent;
}

.alert.error {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: var(--error-line);
}

.alert.success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: var(--success-line);
}

/* Modals */
.adm-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.adm-modal {
    background: var(--panel);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    padding: 32px;
    animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

.adm-modal-head h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

/* Misc Utilities */
.span-2 {
    grid-column: span 2;
}

.adm-modal-foot {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

@media (max-width: 768px) {
    .adm-form-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }
}

.adm-module-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 280px;
    padding: 32px 24px;
    text-align: center;
    color: var(--muted, #64748b);
}

.adm-module-denied i {
    font-size: 2rem;
    color: var(--danger, #dc2626);
}

.adm-module-denied strong {
    font-size: 1.125rem;
    color: var(--text, #0f172a);
}

.adm-module-denied p {
    max-width: 420px;
    margin: 0;
    line-height: 1.5;
}