/* ==========================================================================
   Görünüm: Material (Material Design 3)
   Tonal yüzeyler, hap şeklinde düğmeler ve menü göstergesi, yükselti gölgeleri,
   çerçevesiz kartlar, ters renkli "snackbar" bildirimler.
   <html data-ui="material" data-bs-theme="light|dark">
   ========================================================================== */

html[data-ui="material"] {
    --font-sans: 'Roboto', 'Segoe UI', system-ui, sans-serif;

    --surface-0: #fef7ff;
    --surface-1: #f7f2fa;
    --surface-2: #f0eaf5;
    --surface-3: #e8e0ee;
    --surface-0-rgb: 254, 247, 255;
    --surface-1-rgb: 247, 242, 250;
    --surface-2-rgb: 240, 234, 245;
    --input-bg: #fffbfe;
    --sidebar-bg: #f7f2fa;

    --text: #1d1b20;
    --text-rgb: 29, 27, 32;
    --text-2: #49454f;
    --text-3: #79747e;

    --border: #e7e0ec;
    --border-strong: #cac4d0;

    --accent: #6750a4;
    --accent-rgb: 103, 80, 164;
    --accent-strong: #523d8e;
    --accent-soft: #eaddff;
    --accent-text: #4f378b;
    --accent-gradient: linear-gradient(135deg, #6750a4 0%, #8c6fd1 100%);

    --success: #386a20; --success-soft: #c2efab;
    --warning: #8a5100; --warning-soft: #ffdcbd;
    --danger: #b3261e;  --danger-soft: #f9dedc;
    --info: #00639b;    --info-soft: #cde5ff;

    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 3px 1px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 8px 3px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 4px rgba(0, 0, 0, 0.1), 0 8px 12px 6px rgba(0, 0, 0, 0.08);
    --ring: 0 0 0 3px rgba(103, 80, 164, 0.28);
    --snackbar-bg: #322f35;
    --snackbar-text: #f5eff7;
}

html[data-ui="material"][data-bs-theme="dark"] {
    --surface-0: #141218;
    --surface-1: #1d1b20;
    --surface-2: #232129;
    --surface-3: #2b2930;
    --surface-0-rgb: 20, 18, 24;
    --surface-1-rgb: 29, 27, 32;
    --surface-2-rgb: 35, 33, 41;
    --input-bg: #1d1b20;
    --sidebar-bg: #1d1b20;

    --text: #e6e0e9;
    --text-rgb: 230, 224, 233;
    --text-2: #cac4d0;
    --text-3: #938f99;

    --border: #36343b;
    --border-strong: #49454f;

    --accent: #7f67be;
    --accent-rgb: 127, 103, 190;
    --accent-strong: #6a52a8;
    --accent-soft: #4a4458;
    --accent-text: #d0bcff;

    --success: #a7d394; --success-soft: rgba(167, 211, 148, 0.16);
    --warning: #ffb870; --warning-soft: rgba(255, 184, 112, 0.16);
    --danger: #f2b8b5;  --danger-soft: rgba(242, 184, 181, 0.16);
    --info: #94ccff;    --info-soft: rgba(148, 204, 255, 0.16);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 8px 3px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 4px 4px rgba(0, 0, 0, 0.3), 0 8px 12px 6px rgba(0, 0, 0, 0.15);
    --snackbar-bg: #e6e0e9;
    --snackbar-text: #322f35;
}

/* --- Tipografi --- */
html[data-ui="material"] body { letter-spacing: 0.01em; }
html[data-ui="material"] .page-header-title { font-weight: 500; letter-spacing: 0; font-size: clamp(1.4rem, 1.15rem + 0.9vw, 1.9rem); }
html[data-ui="material"] h1, html[data-ui="material"] h2, html[data-ui="material"] h3,
html[data-ui="material"] h4, html[data-ui="material"] h5, html[data-ui="material"] h6 { font-weight: 500; letter-spacing: 0; }

/* --- İskelet: çerçevesiz, tonal --- */
html[data-ui="material"] .app-sidebar { border-right: 0; }
html[data-ui="material"] .app-brand { border-bottom: 0; }
html[data-ui="material"] .app-topbar {
    background: var(--surface-0);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 0;
}
html[data-ui="material"] .app-nav-link {
    min-height: 48px;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    color: var(--text-2);
    font-weight: 500;
}
html[data-ui="material"] .app-nav-link.active {
    background: var(--accent-soft);
    color: var(--text);
    font-weight: 700;
}
html[data-ui="material"] .app-nav-link.active i { color: var(--accent-text); }
html[data-ui="material"] .app-nav-section { letter-spacing: 0.02em; text-transform: none; font-size: 0.8rem; font-weight: 500; color: var(--text-2); }

/* --- Kartlar: çerçevesiz, yükseltili --- */
html[data-ui="material"] .card,
html[data-ui="material"] .modern-card,
html[data-ui="material"] .glass-card,
html[data-ui="material"] .glass-section,
html[data-ui="material"] .surface,
html[data-ui="material"] .stat-card,
html[data-ui="material"] .toolbar,
html[data-ui="material"] .quick-link,
html[data-ui="material"] .feature-card,
html[data-ui="material"] .auth-card {
    border-color: transparent !important;
    background: var(--surface-1) !important;
    box-shadow: var(--shadow-sm) !important;
}
html[data-ui="material"] .page-header-icon,
html[data-ui="material"] .entity-icon,
html[data-ui="material"] .stat-card-icon { border-radius: 999px; }

/* --- Düğmeler: hap şekli, gölgesiz dolgu, tonal ikincil --- */
html[data-ui="material"] .btn {
    border-radius: 999px;
    padding-left: 1.4rem;
    padding-right: 1.4rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}
html[data-ui="material"] .btn-sm { padding-left: 0.9rem; padding-right: 0.9rem; }
html[data-ui="material"] .btn-primary,
html[data-ui="material"] .btn-accent { box-shadow: none; }
html[data-ui="material"] .btn-primary:hover,
html[data-ui="material"] .btn-accent:hover { box-shadow: var(--shadow-sm); }
html[data-ui="material"] .btn-light,
html[data-ui="material"] .btn-outline-secondary {
    --bs-btn-bg: var(--accent-soft);
    --bs-btn-color: var(--text);
    --bs-btn-border-color: transparent;
    --bs-btn-hover-bg: var(--surface-3);
    --bs-btn-hover-border-color: transparent;
}
html[data-ui="material"] .icon-btn,
html[data-ui="material"] .view-btn,
html[data-ui="material"] .btn-action-mini,
html[data-ui="material"] .action-icon-btn {
    border-color: transparent;
    border-radius: 999px;
    background: transparent;
}
html[data-ui="material"] .icon-btn:hover,
html[data-ui="material"] .view-btn:hover,
html[data-ui="material"] .btn-action-mini:hover { background: var(--surface-3); }
html[data-ui="material"] .view-btn.active { background: var(--accent-soft); color: var(--accent-text); }
html[data-ui="material"] .season-chip,
html[data-ui="material"] .user-menu-btn { border-color: var(--border-strong); background: transparent; }

/* --- Form alanları: dış çizgili alan --- */
html[data-ui="material"] .form-control,
html[data-ui="material"] .form-select {
    border-radius: 6px !important;
    border-color: var(--text-3) !important;
    min-height: 44px;
}
html[data-ui="material"] .form-control:focus,
html[data-ui="material"] .form-select:focus {
    border-color: var(--accent) !important;
    box-shadow: inset 0 0 0 1px var(--accent) !important;
}
html[data-ui="material"] .search-box .input-group-text { border-color: var(--text-3); }

/* --- Tablo: yumuşak başlık --- */
html[data-ui="material"] .table thead th {
    background: transparent !important;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-2) !important;
    border-bottom: 1px solid var(--border-strong);
}

/* --- Modal, menü, bildirim --- */
html[data-ui="material"] .modal-content { border: 0 !important; background: var(--surface-2) !important; }
html[data-ui="material"] .dropdown-menu { border: 0; background: var(--surface-2); }
html[data-ui="material"] .custom-toast {
    background: var(--snackbar-bg) !important;
    color: var(--snackbar-text) !important;
    border: 0 !important;
    border-radius: 6px !important;
    font-weight: 500;
}
html[data-ui="material"] .badge,
html[data-ui="material"] .status-pill { border-radius: 8px; }
