/* ============================================================
   ben.berkaydeniz.com.tr — CRM tema katmanı
   Renk/ölçü değerleri sadece tokens.css'ten gelir; burada hex yok.
   ============================================================ */

/* ------------------------------------------------------------
   Bootstrap / Skote köprüsü: --bs-* değişkenlerini marka tokenlarına bağlar.
   [data-bs-theme] seçicileri, Bootstrap'in kendi tema bloklarını ezmek için.
   ------------------------------------------------------------ */
:root,
[data-bs-theme="light"],
[data-bs-theme="dark"] {
    --bs-font-sans-serif: var(--font-sans);
    --bs-font-monospace: var(--font-mono);
    --bs-body-font-family: var(--font-sans);
    --bs-body-font-size: 15px;
    --bs-body-line-height: 1.4667;

    --bs-body-bg: var(--bg);
    --bs-body-color: var(--text);
    --bs-emphasis-color: var(--text);
    --bs-heading-color: var(--text);
    --bs-secondary-color: var(--text-muted);
    --bs-tertiary-color: var(--text-subtle);
    --bs-secondary-bg: var(--surface-2);
    --bs-tertiary-bg: var(--surface-2);
    --bs-border-color: var(--border);
    --bs-border-color-translucent: var(--border);
    --bs-link-color: var(--accent-text);
    --bs-link-hover-color: var(--accent-text);
    --bs-highlight-bg: var(--accent-subtle);

    --bs-primary: var(--accent);
    --bs-primary-text-emphasis: var(--accent-text);
    --bs-primary-bg-subtle: var(--accent-subtle);
    --bs-primary-border-subtle: var(--accent-subtle-hover);
    --bs-success: var(--success);
    --bs-success-text-emphasis: var(--success-text);
    --bs-success-bg-subtle: var(--success-bg);
    --bs-warning: var(--warning);
    --bs-warning-text-emphasis: var(--warning-text);
    --bs-warning-bg-subtle: var(--warning-bg);
    --bs-danger: var(--danger);
    --bs-danger-text-emphasis: var(--danger-text);
    --bs-danger-bg-subtle: var(--danger-bg);
    --bs-info: var(--info);
    --bs-info-text-emphasis: var(--info-text);
    --bs-info-bg-subtle: var(--info-bg);
    --bs-secondary-bg-subtle: var(--surface-2);
    --bs-secondary-text-emphasis: var(--text-muted);
    --bs-light: var(--surface-2);
    --bs-dark: var(--text);

    --bs-border-radius: var(--radius-sm);
    --bs-border-radius-sm: var(--radius-xs);
    --bs-border-radius-lg: var(--radius-md);
    --bs-border-radius-xl: var(--radius-lg);
    --bs-border-radius-pill: var(--radius-full);
    --bs-focus-ring-color: transparent;
}

/* ------------------------------------------------------------
   Temel
   ------------------------------------------------------------ */
html,
body {
    background-color: var(--bg);
}

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 22px;
    color: var(--text);
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background-color: var(--accent-subtle);
    color: var(--text);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--surface-3) transparent;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: var(--radius-full); }
::-webkit-scrollbar-track { background: transparent; }

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-sans);
    font-weight: 700;
    color: var(--text);
}

h1, .h1 { letter-spacing: -0.02em; }
h2, h3, h4, .h2, .h3, .h4 { letter-spacing: -0.01em; }

.page-title-box h4 {
    font-size: 28px !important;
    line-height: 34px;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
    text-transform: none !important;
    color: var(--text);
}

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

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

.text-muted,
.text-secondary { color: var(--text-muted) !important; }
.text-body,
.text-dark,
.text-reset { color: var(--text) !important; }

code, kbd, samp, pre,
.font-monospace,
.mono {
    font-family: var(--font-mono);
}

.mono,
.tabular,
.pos-cell,
td.text-end,
.panel-stat-value {
    font-variant-numeric: tabular-nums;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 16px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

#layout-wrapper,
.main-content,
body[data-layout="horizontal"] .page-content {
    background-color: var(--bg);
}

/* ============================================================
   App shell (bölüm 6): koyu kenar menüsü + üst bar + içerik
   --shell-offset: içeriğin ve sabit footer'ın soldan boşluğu
   ============================================================ */
:root { --shell-offset: var(--sidebar-w); }
:root[data-sidebar="collapsed"] { --shell-offset: var(--sidebar-w-collapsed); }

@media (max-width: 1023.98px) {
    :root,
    :root[data-sidebar="collapsed"] { --shell-offset: 0px; }
}

body[data-layout="bd-shell"] #layout-wrapper { min-height: 100vh; }

body[data-layout="bd-shell"] .main-content {
    margin-left: var(--shell-offset) !important;
    overflow: visible !important;
    min-height: 100vh;
    transition: margin-left var(--duration-slow) var(--ease-out);
}

body[data-layout="bd-shell"] .main-content .page-content {
    margin-top: 0 !important;
    padding: 8px 32px 104px !important;
}

body[data-layout="bd-shell"] .page-content > .container-fluid {
    max-width: 1440px;
    margin: 0;
    padding: 0;
}

@media (max-width: 1023.98px) {
    body[data-layout="bd-shell"] .main-content .page-content { padding: 8px 24px 104px !important; }
}

@media (max-width: 639.98px) {
    body[data-layout="bd-shell"] .main-content .page-content { padding: 8px 16px 112px !important; }
}

/* -------- Kenar menüsü -------- */
.app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1004;
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    transition: width var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}

.app-sidebar-brand {
    display: flex;
    align-items: center;
    height: var(--topbar-h);
    padding: 0 20px;
    flex-shrink: 0;
}

.app-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    border-radius: var(--radius-sm);
    text-decoration: none;
}

.app-sidebar-logo:hover { text-decoration: none; }
.app-sidebar-logo img { width: 32px; height: 32px; flex-shrink: 0; }

.app-sidebar-logo-text {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.03em;
    color: var(--sidebar-text-active);
    white-space: nowrap;
}

.app-sidebar-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 12px 16px;
    scrollbar-color: var(--sidebar-item-hover) transparent;
}

.app-sidebar-section + .app-sidebar-section { margin-top: 16px; }

.app-sidebar-section-title {
    height: 28px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sidebar-text-muted);
    white-space: nowrap;
}

.app-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 40px;
    padding: 0 12px;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--sidebar-text);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.app-sidebar-link i {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    color: var(--sidebar-text-muted);
    transition: color var(--duration-fast) var(--ease-out);
}

.app-sidebar-link:hover {
    background-color: var(--sidebar-item-hover);
    color: var(--sidebar-text-active);
    text-decoration: none;
}

.app-sidebar-link:hover i { color: var(--sidebar-text-active); }

.app-sidebar-link.is-active {
    background-color: var(--sidebar-item-active);
    color: var(--sidebar-text-active);
}

.app-sidebar-link.is-active i { color: var(--sidebar-icon-active); }

.app-sidebar a:focus-visible,
.app-sidebar button:focus-visible {
    box-shadow: 0 0 0 2px var(--sidebar-bg), 0 0 0 4px var(--bd-dalga);
}

.app-sidebar-link-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-sidebar-footer {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px;
    border-top: 1px solid var(--sidebar-item-hover);
    flex-shrink: 0;
}

.app-sidebar-user { flex: 1 1 auto; min-width: 0; }

.app-sidebar-user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 6px 8px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    text-align: left;
    color: var(--sidebar-text);
    transition: background-color var(--duration-fast) var(--ease-out);
}

.app-sidebar-user-trigger:hover,
.app-sidebar-user-trigger[aria-expanded="true"] { background-color: var(--sidebar-item-hover); }

.app-sidebar-user-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.app-sidebar-user-name {
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: var(--sidebar-text-active);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-sidebar-user-role {
    font-size: 12px;
    line-height: 16px;
    color: var(--sidebar-text-muted);
}

.app-sidebar-user-caret {
    font-size: 16px;
    color: var(--sidebar-text-muted);
}

.app-sidebar-user .dropdown-menu { min-width: 220px; }

.app-sidebar-collapse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--sidebar-text-muted);
    font-size: 20px;
    transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.app-sidebar-collapse:hover {
    background-color: var(--sidebar-item-hover);
    color: var(--sidebar-text-active);
}

.app-sidebar-collapse i { transition: transform var(--duration-slow) var(--ease-out); }

/* -------- Daraltılmış (72px) -------- */
:root[data-sidebar="collapsed"] .app-sidebar { width: var(--sidebar-w-collapsed); }
:root[data-sidebar="collapsed"] .app-sidebar-brand { padding: 0 20px; }
:root[data-sidebar="collapsed"] .app-sidebar-nav { padding: 4px 16px 16px; }
:root[data-sidebar="collapsed"] .app-sidebar-logo-text,
:root[data-sidebar="collapsed"] .app-sidebar-link-text,
:root[data-sidebar="collapsed"] .app-sidebar-user-text,
:root[data-sidebar="collapsed"] .app-sidebar-user-caret { display: none; }

:root[data-sidebar="collapsed"] .app-sidebar-section-title {
    height: 1px;
    margin: 0 4px 12px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    background-color: var(--sidebar-item-hover);
}

:root[data-sidebar="collapsed"] .app-sidebar-section:first-child .app-sidebar-section-title { display: none; }
:root[data-sidebar="collapsed"] .app-sidebar-link { justify-content: center; padding: 0; }

:root[data-sidebar="collapsed"] .app-sidebar-footer {
    flex-direction: column;
    padding: 12px 16px;
}

:root[data-sidebar="collapsed"] .app-sidebar-user-trigger { justify-content: center; padding: 6px 0; }
:root[data-sidebar="collapsed"] .app-sidebar-collapse i { transform: rotate(180deg); }

.app-tooltip {
    position: fixed;
    z-index: 1090;
    max-width: 240px;
    padding: 6px 8px;
    border-radius: 6px;
    background-color: var(--inverse);
    color: var(--on-inverse);
    font-size: 12px;
    line-height: 16px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity var(--duration-fast) var(--ease-out);
}

.app-tooltip.is-visible { opacity: 1; }

/* -------- Mobil / tablet: çekmece -------- */
.app-sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 1003;
    background-color: var(--scrim);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-slow) var(--ease-out);
}

@media (max-width: 1023.98px) {
    .app-sidebar,
    :root[data-sidebar="collapsed"] .app-sidebar {
        width: var(--sidebar-w);
        transform: translateX(-100%);
        box-shadow: none;
    }

    /* Mobilde daraltma durumu yok sayılır, menü her zaman tam genişlikte açılır */
    :root[data-sidebar="collapsed"] .app-sidebar-logo-text,
    :root[data-sidebar="collapsed"] .app-sidebar-link-text { display: inline; }
    :root[data-sidebar="collapsed"] .app-sidebar-user-text { display: flex; }
    :root[data-sidebar="collapsed"] .app-sidebar-user-caret { display: inline; }
    :root[data-sidebar="collapsed"] .app-sidebar-nav { padding: 4px 12px 16px; }
    :root[data-sidebar="collapsed"] .app-sidebar-link { justify-content: flex-start; padding: 0 12px; }
    :root[data-sidebar="collapsed"] .app-sidebar-section-title {
        height: 28px; margin: 0; padding: 0 12px; color: var(--sidebar-text-muted); background: none;
    }
    :root[data-sidebar="collapsed"] .app-sidebar-section:first-child .app-sidebar-section-title { display: flex; }
    :root[data-sidebar="collapsed"] .app-sidebar-footer { flex-direction: row; padding: 12px; }
    :root[data-sidebar="collapsed"] .app-sidebar-user-trigger { justify-content: flex-start; padding: 6px 8px; }

    .app-sidebar-collapse { display: none; }

    :root.sidebar-open .app-sidebar {
        transform: translateX(0);
        box-shadow: var(--shadow-modal);
    }

    :root.sidebar-open .app-sidebar-scrim {
        opacity: 1;
        pointer-events: auto;
    }

    :root.sidebar-open body { overflow: hidden; }

    .app-sidebar-link { height: 44px; }
}

/* -------- Üst bar -------- */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1002;
    display: flex;
    align-items: center;
    gap: 16px;
    height: var(--topbar-h);
    padding: 0 32px;
    background-color: var(--bg);
    border-bottom: 1px solid transparent;
    transition: border-color var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);
}

.app-topbar.is-scrolled {
    border-bottom-color: var(--border);
    background-color: color-mix(in srgb, var(--bg) 85%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

@media (max-width: 1023.98px) { .app-topbar { padding: 0 24px; gap: 8px; } }
@media (max-width: 639.98px) { .app-topbar { padding: 0 12px 0 8px; } }

.app-icon-btn.app-sidebar-open { margin-left: -8px; }

.app-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 13px;
    line-height: 18px;
    color: var(--text-muted);
    white-space: nowrap;
}

.app-breadcrumb i {
    font-size: 14px;
    color: var(--text-subtle);
}

.app-breadcrumb .is-current {
    color: var(--text);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.app-search { position: relative; }

.app-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-subtle);
    font-size: 16px;
    pointer-events: none;
}

.app-search-input {
    width: 320px;
    height: var(--control-h-md);
    border: 1px solid var(--border-strong);
    background-color: var(--surface);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 15px;
    padding: 0 12px 0 36px;
    color: var(--text);
    transition: border-color var(--duration-fast) var(--ease-out);
}

.app-search-input::placeholder { color: var(--text-subtle); }
.app-search-input:hover { border-color: var(--text-muted); }

.app-search-input:focus {
    outline: none;
    border-color: var(--accent-text);
    box-shadow: var(--shadow-focus);
}

.app-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 20px;
    transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

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

.app-icon-btn:active {
    background-color: var(--surface-3);
    transform: scale(0.98);
}

.js-theme-toggle .theme-icon-dark { display: none; }
[data-bs-theme="dark"] .js-theme-toggle .theme-icon-light { display: none; }
[data-bs-theme="dark"] .js-theme-toggle .theme-icon-dark { display: inline; }

.app-notif-menu {
    min-width: 280px;
    padding: 4px;
}

.app-notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 16px;
    text-align: center;
    color: var(--text-muted);
}

.app-notif-empty i { font-size: 24px; color: var(--text-subtle); }

.app-notif-empty p {
    margin: 0;
    font-size: 13px;
}

.app-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.app-user-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bd-dalga-100);
    color: var(--bd-derin);
    font-weight: 700;
    font-size: 13px;
}

/* Logo tema'ya göre (giriş ekranı vb.): açık zeminde lacivert, koyuda açık sürüm */
:root .brand-on-dark { display: none; }
:root[data-bs-theme="dark"] .brand-on-light { display: none; }
:root[data-bs-theme="dark"] .brand-on-dark { display: block; }

/* -------- Sabit footer (sayfa eylem butonları) -------- */
.footer-with-actions {
    position: fixed !important;
    left: var(--shell-offset) !important;
    right: 0;
    bottom: 0;
    z-index: 1000;
    height: auto !important;
    padding: 12px 32px !important;
    transition: left var(--duration-slow) var(--ease-out);
}

.footer-with-actions > .container-fluid {
    max-width: 1440px;
    margin: 0;
    padding: 0;
}

.app-footer-note {
    font-size: 13px;
    color: var(--text-muted);
}

@media (max-width: 1023.98px) {
    .footer-with-actions { padding: 12px 24px !important; }
}

@media (max-width: 639.98px) {
    .footer-with-actions { padding: 12px 16px !important; }
    .footer-with-actions .btn { flex: 1 1 auto; }
}

/* ============================================================
   Kart
   ============================================================ */
.card {
    --bs-card-bg: var(--surface);
    --bs-card-border-color: var(--border);
    --bs-card-color: var(--text);
    --bs-card-cap-bg: var(--surface);
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: none;
    margin-bottom: 24px;
}

.card-header,
.card-footer {
    background-color: transparent;
    border-color: var(--border);
}

.card-body { padding: 24px; }

.card-title {
    font-size: 20px;
    line-height: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}

.card-title-desc { color: var(--text-muted); }

/* ============================================================
   Butonlar (bölüm 8.1)
   ============================================================ */
.btn {
    --bs-btn-font-family: var(--font-sans);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--control-h-md);
    padding: 0 16px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0;
    white-space: nowrap;
    border-radius: var(--radius-md);
    border-width: 1px;
    box-shadow: none !important;
    transition: background-color var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                transform var(--duration-instant) var(--ease-out);
}

.btn:active { transform: scale(0.98); }
.btn:focus-visible { box-shadow: var(--shadow-focus) !important; }

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: auto;
}

.btn i { font-size: 16px; line-height: 1; }
.btn i.me-1, .btn i.me-2, .btn i.ms-1 { margin: 0 !important; }

.btn-sm {
    min-height: var(--control-h-sm);
    padding: 0 12px;
    font-size: 13px;
    gap: 6px;
}

.btn-lg {
    min-height: var(--control-h-lg);
    padding: 0 20px;
    font-size: 15px;
    font-weight: 700;
}

.btn-lg i { font-size: 18px; }

/* primary — ekrandaki tek ana eylem */
.btn-primary,
.btn-primary:focus {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--on-accent);
}

.btn-primary:active,
.btn-primary.active,
.btn-check:checked + .btn-primary {
    background-color: var(--accent-active) !important;
    border-color: var(--accent-active) !important;
    color: var(--on-accent) !important;
}

.btn-primary:disabled,
.btn-primary.disabled {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

/* secondary */
.btn-secondary,
.btn-light,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-light,
.btn-soft-primary,
.btn-soft-secondary {
    background-color: var(--surface);
    border-color: var(--border-strong);
    color: var(--text);
}

.btn-secondary:hover,
.btn-light:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-light:hover,
.btn-soft-primary:hover,
.btn-soft-secondary:hover {
    background-color: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--text);
}

.btn-secondary:active,
.btn-light:active,
.btn-outline-primary:active,
.btn-outline-secondary:active,
.btn-outline-light:active,
.btn-soft-primary:active,
.btn-soft-secondary:active,
.btn-check:checked + .btn-outline-primary,
.btn-check:checked + .btn-outline-secondary {
    background-color: var(--surface-3) !important;
    border-color: var(--border-strong) !important;
    color: var(--text) !important;
}

/* ghost */
.btn-ghost,
.btn-link {
    background-color: transparent;
    border-color: transparent;
    color: var(--text-muted);
}

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

.btn-link {
    color: var(--accent-text);
    padding-left: 0;
    padding-right: 0;
}

.btn-link:hover {
    color: var(--accent-text);
    text-decoration: underline;
    background: transparent;
}

/* danger (dolu) — sadece onay içindeki "Sil" */
.btn-danger {
    background-color: var(--danger-solid);
    border-color: var(--danger-solid);
    color: #FFFFFF;
}

.btn-danger:hover,
.btn-danger:active {
    background-color: var(--danger-solid-hover) !important;
    border-color: var(--danger-solid-hover) !important;
    color: #FFFFFF !important;
}

/* danger-ghost — sayfadaki "Sil" */
.btn-outline-danger,
.btn-soft-danger {
    background-color: transparent;
    border-color: var(--danger);
    color: var(--danger-text);
}

.btn-outline-danger:hover,
.btn-soft-danger:hover,
.btn-outline-danger:active,
.btn-soft-danger:active {
    background-color: var(--danger-bg) !important;
    border-color: var(--danger) !important;
    color: var(--danger-text) !important;
}

.btn-outline-danger:focus-visible,
.btn-soft-danger:focus-visible {
    box-shadow: var(--shadow-focus-danger) !important;
}

.btn-success,
.btn-soft-success,
.btn-outline-success {
    background-color: var(--success-bg);
    border-color: var(--success);
    color: var(--success-text);
}

.btn-success:hover,
.btn-soft-success:hover,
.btn-outline-success:hover {
    background-color: var(--success-bg);
    border-color: var(--success-text);
    color: var(--success-text);
}

.btn-warning,
.btn-soft-warning,
.btn-outline-warning {
    background-color: var(--warning-bg);
    border-color: var(--warning);
    color: var(--warning-text);
}

.btn-warning:hover,
.btn-soft-warning:hover,
.btn-outline-warning:hover {
    background-color: var(--warning-bg);
    border-color: var(--warning-text);
    color: var(--warning-text);
}

.btn-info,
.btn-soft-info,
.btn-outline-info {
    background-color: var(--info-bg);
    border-color: var(--info);
    color: var(--info-text);
}

.input-group > .btn,
.input-group-sm > .btn {
    min-height: 0;
}

.btn-close {
    --bs-btn-close-focus-shadow: var(--shadow-focus);
    border-radius: var(--radius-sm);
}

[data-bs-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ============================================================
   Form alanları (bölüm 8.2–8.7)
   ============================================================ */
.form-label {
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: var(--text);
    margin-bottom: 6px;
}

.form-text {
    font-size: 13px;
    line-height: 18px;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-control,
.form-select {
    min-height: var(--control-h-md);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 22px;
    padding: 8px 12px;
    color: var(--text);
    background-color: var(--surface);
    box-shadow: none;
    transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.form-select {
    padding-right: 36px;
    background-position: right 12px center;
    background-size: 16px 12px;
}

[data-bs-theme="dark"] .form-select {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239FB3C8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

textarea.form-control {
    min-height: 88px;
    padding: 10px 12px;
    line-height: 22px;
}

@media (max-width: 767.98px) {
    .form-control,
    .form-select { font-size: 16px; }
}

.form-control::placeholder { color: var(--text-subtle); opacity: 1; }

.form-control:hover,
.form-select:hover { border-color: var(--text-muted); }

.form-control:focus,
.form-select:focus {
    background-color: var(--surface);
    color: var(--text);
    border-color: var(--accent-text);
    box-shadow: var(--shadow-focus);
    outline: none;
}

.form-control:disabled,
.form-select:disabled {
    background-color: var(--surface-2);
    color: var(--text-disabled);
    border-color: var(--border);
    cursor: not-allowed;
}

.form-control[readonly] {
    background-color: var(--surface-2);
    border-color: transparent;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger);
    background-image: none;
    padding-right: 12px;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus { box-shadow: var(--shadow-focus-danger); }

.invalid-feedback {
    font-size: 13px;
    color: var(--danger-text);
    margin-top: 6px;
}

.form-control-sm,
.form-select-sm {
    min-height: var(--control-h-sm);
    font-size: 14px;
    padding: 4px 10px;
}

textarea.form-control-sm { min-height: 88px; padding: 8px 10px; }

.form-control-lg,
.form-select-lg { min-height: var(--control-h-lg); }

.input-group-text {
    background-color: var(--surface-2);
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 14px;
}

.input-group > .form-control:focus { z-index: 5; }

/* Checkbox / radio (bölüm 8.5–8.6) */
.form-check { min-height: 32px; display: flex; align-items: center; gap: 10px; padding-left: 0; }
.form-check .form-check-input { float: none; margin: 0; flex-shrink: 0; }
.form-check-label { font-size: 14px; color: var(--text); cursor: pointer; }
.form-check-label.small { font-size: 13px; }

.form-check-input {
    width: 18px;
    height: 18px;
    background-color: var(--surface);
    border: 1.5px solid var(--border-strong);
    cursor: pointer;
    transition: background-color var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}

.form-check-input[type="checkbox"] { border-radius: 5px; }

.form-check-input:hover { border-color: var(--text-muted); }

.form-check-input:focus { box-shadow: none; border-color: var(--border-strong); }
.form-check-input:focus-visible { box-shadow: var(--shadow-focus); }

.form-check-input:checked,
.form-check-input:indeterminate {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-check-input:checked:hover { background-color: var(--accent-hover); border-color: var(--accent-hover); }

.form-check-input:checked[type="checkbox"] {
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%230A2540' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.form-check-input:checked[type="radio"] {
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='1.6' fill='%230A2540'/%3e%3c/svg%3e");
}

.form-check-input[type="checkbox"]:indeterminate {
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%230A2540' stroke-linecap='round' stroke-width='2' d='M5 10h10'/%3e%3c/svg%3e");
}

.form-check-input:disabled { opacity: 0.5; cursor: not-allowed; }

/* Switch (bölüm 8.7) */
.form-switch { padding-left: 0; }

.form-switch .form-check-input {
    width: 36px;
    height: 20px;
    border-radius: var(--radius-full);
    border: none;
    background-color: var(--surface-3);
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3.2' fill='%23FFFFFF'/%3e%3c/svg%3e");
    background-position: left 2px center;
    transition: background-position var(--duration-base) var(--ease-out), background-color var(--duration-base) var(--ease-out);
}

.form-switch .form-check-input:hover { background-color: var(--border-strong); }
.form-switch .form-check-input:focus { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3.2' fill='%23FFFFFF'/%3e%3c/svg%3e"); }

.form-switch .form-check-input:checked {
    background-color: var(--accent);
    background-position: right 2px center;
}

.form-switch .form-check-input:checked:hover { background-color: var(--accent-hover); }

/* ============================================================
   Tablo (bölüm 8.14)
   ============================================================ */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--border);
    --bs-table-hover-bg: var(--surface-2);
    --bs-table-hover-color: var(--text);
    --bs-table-striped-bg: var(--surface-2);
    font-size: 15px;
    color: var(--text);
    margin-bottom: 0;
}

.table thead.table-light,
.table .table-light {
    --bs-table-bg: var(--surface-2);
    --bs-table-color: var(--text-muted);
    --bs-table-border-color: var(--border);
}

.table > thead > tr > th,
.table > :not(caption) > * > th {
    height: 40px;
    background-color: var(--surface-2);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 11px;
    line-height: 16px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    vertical-align: middle;
    white-space: nowrap;
}

.table > tbody > tr > th {
    background-color: transparent;
}

.table > :not(caption) > * > td {
    height: 52px;
    padding: 8px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    background-color: transparent;
    color: var(--text);
}

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

.table-hover > tbody > tr:hover > * {
    background-color: var(--surface-2);
    --bs-table-bg-state: var(--surface-2);
}

.table td.text-end {
    font-family: var(--font-mono);
    font-size: 14px;
}

.table-responsive { border-radius: var(--radius-md); }

/* ============================================================
   Badge ve chip (bölüm 8.11)
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 8px;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0;
    border-radius: var(--radius-full);
    background-color: var(--surface-2);
    color: var(--text-muted);
}

.badge.rounded-pill { border-radius: var(--radius-full); }

.bg-primary-subtle,
.badge.bg-primary-subtle,
.badge-soft-primary { background-color: var(--accent-subtle) !important; color: var(--accent-text); }

.bg-success-subtle,
.badge-soft-success { background-color: var(--success-bg) !important; }
.bg-warning-subtle,
.badge-soft-warning { background-color: var(--warning-bg) !important; }
.bg-danger-subtle,
.badge-soft-danger { background-color: var(--danger-bg) !important; }
.bg-info-subtle,
.badge-soft-info { background-color: var(--info-bg) !important; }
.bg-secondary-subtle,
.bg-light-subtle,
.badge-soft-secondary,
.badge-soft-dark { background-color: var(--surface-2) !important; }

.text-primary,
.text-primary-emphasis { color: var(--accent-text) !important; }
.text-success,
.text-success-emphasis { color: var(--success-text) !important; }
.text-warning,
.text-warning-emphasis { color: var(--warning-text) !important; }
.text-danger,
.text-danger-emphasis { color: var(--danger-text) !important; }
.text-info,
.text-info-emphasis { color: var(--info-text) !important; }
.text-secondary-emphasis { color: var(--text-muted) !important; }

.badge-soft-primary { color: var(--accent-text) !important; }
.badge-soft-success { color: var(--success-text) !important; }
.badge-soft-warning { color: var(--warning-text) !important; }
.badge-soft-danger { color: var(--danger-text) !important; }
.badge-soft-info { color: var(--info-text) !important; }
.badge-soft-secondary,
.badge-soft-dark { color: var(--text-muted) !important; }

.bg-primary { background-color: var(--accent) !important; color: var(--on-accent); }
.bg-success { background-color: var(--success) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-danger { background-color: var(--danger) !important; }
.bg-info { background-color: var(--info) !important; }
.bg-secondary { background-color: var(--text-subtle) !important; }
.bg-light { background-color: var(--surface-2) !important; }
.bg-white,
.bg-body { background-color: var(--surface) !important; }
.bg-body-tertiary,
.bg-body-secondary { background-color: var(--surface-2) !important; }

.badge.bg-primary { color: var(--on-accent) !important; }
.badge.bg-success,
.badge.bg-danger,
.badge.bg-info,
.badge.bg-secondary { color: #FFFFFF !important; }
.badge.bg-warning { color: var(--bd-derin) !important; }

.border,
.border-top,
.border-bottom,
.border-start,
.border-end { border-color: var(--border) !important; }

/* ============================================================
   Footer
   ============================================================ */
.footer,
.footer-with-actions {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
}

/* ============================================================
   Modal (bölüm 8.17)
   ============================================================ */
.modal-backdrop {
    --bs-backdrop-bg: var(--scrim);
    --bs-backdrop-opacity: 1;
    background-color: var(--scrim);
}

.modal-backdrop.show { opacity: 1; }

.modal-content {
    --bs-modal-bg: var(--surface);
    --bs-modal-color: var(--text);
    background-color: var(--surface);
    color: var(--text);
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-modal);
}

.modal.fade .modal-dialog {
    transform: translateY(8px) scale(0.97);
    transition: transform var(--duration-slow) var(--ease-out), opacity var(--duration-slow) var(--ease-out);
}

.modal.show .modal-dialog { transform: none; }

.modal-header {
    border-bottom: none;
    padding: 24px 24px 0;
    align-items: flex-start;
}

.modal-title {
    font-size: 20px;
    line-height: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}

.modal-body { padding: 16px 24px; }

.modal-footer {
    border-top: 1px solid var(--border);
    padding: 16px 24px;
    gap: 8px;
}

.modal-footer > * { margin: 0; }

/* ============================================================
   Dropdown menü (bölüm 8.16)
   ============================================================ */
.dropdown-menu {
    --bs-dropdown-bg: var(--surface);
    --bs-dropdown-color: var(--text);
    --bs-dropdown-link-color: var(--text);
    --bs-dropdown-link-hover-bg: var(--surface-2);
    --bs-dropdown-link-hover-color: var(--text);
    --bs-dropdown-link-active-bg: var(--accent-subtle);
    --bs-dropdown-link-active-color: var(--text);
    --bs-dropdown-divider-bg: var(--border);
    background-color: var(--surface);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-pop);
    padding: 4px;
    min-width: 200px;
}

.dropdown-menu.show {
    animation: bd-pop-in var(--duration-base) var(--ease-out);
}

/* Skote'un Bootstrap derlemesindeki `.dropdown-menu.show{top:100%!important}`,
   Popper'ın zaten verdiği konuma bir tetik yüksekliği daha ekliyor. */
.dropdown-menu.show[data-popper-placement^="bottom"] {
    top: 0 !important;
}

.dropdown-menu.show[data-popper-placement^="top"] {
    top: auto !important;
}

.dropdown-menu[data-popper-placement^="bottom"] { margin-top: 2px !important; }
.dropdown-menu[data-popper-placement^="top"] { margin-bottom: 2px !important; }

/* Popper menüyü inline `transform` ile konumluyor; animasyon onu ezmesin diye
   ayrı `translate`/`scale` özellikleri kullanılıyor (transform ile birleşirler). */
@keyframes bd-pop-in {
    from { opacity: 0; translate: 0 -4px; scale: 0.98; }
    to { opacity: 1; translate: 0 0; scale: 1; }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 400;
    color: var(--text);
    padding: 0 10px;
    transition: background-color var(--duration-fast) var(--ease-out);
}

.dropdown-item i {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0 !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--surface-2);
    color: var(--text);
    text-decoration: none;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--accent-subtle);
    color: var(--text);
}

.dropdown-item.active i { color: var(--accent-text); }

.dropdown-item.text-danger,
.dropdown-item.text-danger i { color: var(--danger-text) !important; }
.dropdown-item.text-danger:hover { background-color: var(--danger-bg); }

.dropdown-divider {
    border-top-color: var(--border);
    margin: 4px 0;
}

/* ============================================================
   Sekmeler (bölüm 8.15)
   ============================================================ */
.nav-tabs,
.nav-tabs-custom {
    border-bottom: 1px solid var(--border);
    gap: 24px;
}

.nav-tabs .nav-link,
.nav-tabs-custom .nav-link,
.nav-tabs-custom .nav-item .nav-link {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 2px;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    border-radius: 0;
    transition: color var(--duration-fast) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}

.nav-tabs .nav-link:hover,
.nav-tabs-custom .nav-link:hover {
    color: var(--text);
    border-color: transparent;
    text-decoration: none;
}

.nav-tabs .nav-link.active,
.nav-tabs-custom .nav-link.active,
.nav-tabs-custom .nav-item .nav-link.active {
    color: var(--text);
    background: transparent;
    border-bottom-color: var(--accent);
}

.nav-tabs-custom .nav-item .nav-link::after { display: none; }

.nav-pills .nav-link {
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.nav-pills .nav-link.active {
    background-color: var(--accent-subtle);
    color: var(--text);
}

/* ============================================================
   Sayfalama (bölüm 8.14)
   ============================================================ */
.pagination { gap: 4px; }

.page-link {
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border: none;
    border-radius: var(--radius-sm) !important;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 13px;
}

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

.page-item.active .page-link {
    background-color: var(--surface-2);
    color: var(--text);
    font-weight: 500;
}

.page-item.disabled .page-link {
    background: transparent;
    color: var(--text-disabled);
}

/* ============================================================
   Alert (bölüm 8.19)
   ============================================================ */
.alert {
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    padding: 12px 16px;
    font-size: 14px;
}

.alert-success { background-color: var(--success-bg); color: var(--success-text); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.alert-warning { background-color: var(--warning-bg); color: var(--warning-text); border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
.alert-danger { background-color: var(--danger-bg); color: var(--danger-text); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.alert-info,
.alert-primary { background-color: var(--info-bg); color: var(--info-text); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.alert-secondary,
.alert-light { background-color: var(--surface-2); color: var(--text-muted); border-color: var(--border); }

/* ============================================================
   Toast (toastr) — bölüm 8.19
   ============================================================ */
#toast-container > div {
    width: 360px;
    background-color: var(--inverse);
    color: var(--on-inverse);
    font-family: var(--font-sans);
    font-size: 14px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-pop);
    padding: 12px 16px 12px 48px;
    opacity: 1;
    background-position: 16px center;
}

#toast-container > div:hover { box-shadow: var(--shadow-pop); }

#toast-container > .toast-success { background-color: var(--inverse); }
#toast-container > .toast-error { background-color: var(--inverse); }
#toast-container > .toast-info { background-color: var(--inverse); }
#toast-container > .toast-warning { background-color: var(--inverse); }

#toast-container .toast-progress {
    background-color: var(--accent);
    opacity: 1;
    height: 3px;
}

#toast-container .toast-close-button {
    color: var(--on-inverse);
    text-shadow: none;
    opacity: 0.7;
}

/* ============================================================
   Diğer: progress, avatar, breadcrumb, accordion, list-group
   ============================================================ */
.progress {
    --bs-progress-bg: var(--surface-3);
    --bs-progress-bar-bg: var(--accent);
    background-color: var(--surface-3);
    border-radius: var(--radius-full);
    height: 6px;
}

.progress-bar { background-color: var(--accent); }

.avatar-title {
    font-family: var(--font-sans);
    font-weight: 700;
    background-color: var(--surface-2);
    color: var(--text);
}

.acc-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 400;
}

.acc-breadcrumb a { color: var(--text-muted); }
.acc-breadcrumb a:hover { color: var(--accent-text); }
.acc-breadcrumb-sep { color: var(--text-subtle); }
.acc-breadcrumb-current { color: var(--text); font-weight: 500; }

.list-group {
    --bs-list-group-bg: var(--surface);
    --bs-list-group-color: var(--text);
    --bs-list-group-border-color: var(--border);
    --bs-list-group-action-hover-bg: var(--surface-2);
    --bs-list-group-active-bg: var(--accent-subtle);
    --bs-list-group-active-color: var(--text);
    --bs-list-group-active-border-color: var(--border);
}

.accordion {
    --bs-accordion-bg: var(--surface);
    --bs-accordion-border-color: var(--border);
    --bs-accordion-btn-focus-box-shadow: var(--shadow-focus);
    --bs-accordion-active-bg: var(--surface-2);
    --bs-accordion-active-color: var(--text);
}

hr { border-color: var(--border); opacity: 1; }

.kanban-minimal .kanban-task { border-radius: var(--radius-md); }
.kanban-minimal .kanban-add-btn { border-radius: var(--radius-md); font-weight: 500; }

/* ============================================================
   Auth sayfaları (giriş / kilit ekranı / 404)
   ============================================================ */
.app-auth-body {
    background-color: var(--bg);
    min-height: 100vh;
}

.app-auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 32px 16px;
}

.app-auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.app-auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.app-auth-logo {
    display: block;
    height: 48px;
    width: auto;
    margin-bottom: 28px;
}

.app-auth-title {
    font-size: 28px;
    line-height: 34px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.app-auth-title-sm {
    font-size: 20px;
    line-height: 28px;
    letter-spacing: -0.01em;
    text-align: center;
}

.app-auth-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.app-auth-card-lock { text-align: center; }
.app-auth-card-lock .app-auth-subtitle { margin-bottom: 20px; }

.app-auth-lock-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.app-auth-alt-link {
    display: block;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-text);
}

.app-auth-footnote {
    font-size: 13px;
    color: var(--text-subtle);
    margin: 0;
}

.app-404-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 16px;
    background-color: var(--bg);
}

.app-404-code {
    font-family: var(--font-mono);
    font-size: 96px;
    font-weight: 500;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.app-404-title {
    font-size: 20px;
    line-height: 28px;
    font-weight: 700;
    color: var(--text);
    margin: 12px 0 6px;
}

.app-404-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ============================================================
   Boş durum (bölüm 8.20) — dalga motifi
   ============================================================ */
.app-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 64px 24px;
    max-width: 360px;
    margin: 0 auto;
}

.app-empty-state-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--accent-subtle);
    color: var(--accent-text);
    font-size: 26px;
    margin-bottom: 16px;
    overflow: hidden;
}

/* Logodaki dalga eğrisi, ikonun altından sağa yükselir */
.app-empty-state-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: var(--accent);
    opacity: 0.35;
    -webkit-mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3e%3cpath d='M0 84 C20 82 30 72 50 66 S80 48 100 40 V100 H0 Z'/%3e%3c/svg%3e") center / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3e%3cpath d='M0 84 C20 82 30 72 50 66 S80 48 100 40 V100 H0 Z'/%3e%3c/svg%3e") center / 100% 100% no-repeat;
}

.app-empty-state-icon i { position: relative; z-index: 1; }

.app-empty-state-title {
    font-size: 16px;
    line-height: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.app-empty-state-text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 20px;
    margin: 0;
}

/* ============================================================
   Site kartları (/siteler)
   ============================================================ */
.app-site-card-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    position: relative;
}

.app-site-card-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex: 1 1 auto;
    min-width: 0;
}

.app-site-card-link:hover { text-decoration: none; }

.app-site-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background-color: var(--surface-2);
    color: var(--text-muted);
    font-size: 20px;
    flex-shrink: 0;
}

.app-site-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.app-site-card-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 22px;
}

.app-site-card-domain {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 16px;
}

.app-site-card-stats {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    margin-top: 4px;
}

.app-site-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: auto;
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 12px;
    color: var(--text-muted);
    background: none !important;
    padding: 0;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.app-site-card-badge i {
    font-size: 14px;
    color: var(--text-subtle);
}

.app-site-card-menu { flex-shrink: 0; }

/* Tıklanabilir kart: hover'da kenarlık koyulaşır, yukarı kaymaz */
.card:has(.app-site-card-link),
.folder-card {
    transition: border-color var(--duration-fast) var(--ease-out);
}

.card:has(.app-site-card-link):hover { border-color: var(--border-strong); }

/* ============================================================
   İstatistik kutusu (panel-stat) — StatCard (bölüm 8.13)
   ============================================================ */
.panel-stat {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    transition: border-color var(--duration-fast) var(--ease-out);
}

a.panel-stat:hover,
.panel-stat:hover {
    border-color: var(--border-strong);
    text-decoration: none;
}

.panel-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    font-size: 20px;
    flex-shrink: 0;
}

.panel-stat-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.panel-stat-icon-violet { background: var(--accent-subtle); color: var(--accent-text); }
.panel-stat-icon-blue { background: var(--info-bg); color: var(--info-text); }
.panel-stat-icon-teal { background: var(--success-bg); color: var(--success-text); }
.panel-stat-icon-amber { background: var(--warning-bg); color: var(--warning-text); }
.panel-stat-icon-rose { background: var(--danger-bg); color: var(--danger-text); }

.panel-stat-value {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 34px;
}

.panel-stat-label {
    order: -1;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 16px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Dar ekranda hücreler kırılmasın, tablo kendi kabında yatay kaysın */
.table-responsive .table > :not(caption) > * > td {
    white-space: nowrap;
}

/* ============================================================
   Giriş ekranı (bölüm 9.1): solda form, sağda dalgalı marka paneli
   ============================================================ */
.app-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.app-login-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background-color: var(--bg);
}

.app-login-form {
    width: 100%;
    max-width: 400px;
}

.app-login-logo {
    height: 60px;
    width: auto;
    margin: -10px 0 22px -10px; /* SVG kendi içinde ¼ ikon boşluğu taşıyor */
}

.app-login .form-control-lg { font-size: 16px; }

.app-login-footnote { margin-top: 32px; }

.app-login-brand-side {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    padding: 96px 64px;
    background-color: var(--inverse);
    color: var(--on-inverse);
}

[data-bs-theme="dark"] .app-login-brand-side {
    background-color: var(--surface-2);
    color: var(--text);
}

.app-login-slogan {
    position: relative;
    z-index: 1;
    max-width: 440px;
    margin: 0;
    font-size: 40px;
    line-height: 44px;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.app-login-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 62%;
}

.app-login-wave-back { fill: var(--accent); opacity: 0.18; }
.app-login-wave-front { fill: var(--accent); }

@media (max-width: 1023.98px) {
    .app-login { grid-template-columns: 1fr; }
    .app-login-brand-side { display: none; }
    .app-login-form-side { padding: 48px 16px; }
}

/* ============================================================
   Mobilde tablo → kart listesi (bölüm 8.14). Etiketler footer.php'deki
   script tarafından th metinlerinden data-label'a yazılır.
   ============================================================ */
@media (max-width: 767.98px) {
    .table-responsive:has(> .table-cards) {
        overflow: visible;
        border-radius: 0;
    }

    .card:has(> .table-responsive > .table-cards),
    .card:has(> .card-body > .table-responsive:only-child > .table-cards) {
        background-color: transparent;
        border: none;
    }

    .card > .card-body:has(> .table-responsive:only-child > .table-cards) { padding: 0; }

    .table.table-cards,
    .table.table-cards > tbody {
        display: block;
    }

    .table.table-cards > thead { display: none; }

    .table.table-cards > tbody > tr {
        display: block;
        margin-bottom: 8px;
        padding: 12px 16px;
        background-color: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
    }

    .table.table-cards > tbody > tr[onclick]:active { background-color: var(--surface-2); }

    .table.table-cards > tbody > tr > td,
    .table-responsive .table.table-cards > tbody > tr > td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        height: auto;
        min-height: 32px;
        padding: 4px 0;
        border: none;
        white-space: normal;
        text-align: right;
        background: transparent;
    }

    .table.table-cards > tbody > tr > td::before {
        content: attr(data-label);
        flex-shrink: 0;
        text-align: left;
        font-family: var(--font-mono);
        font-size: 11px;
        line-height: 16px;
        font-weight: 500;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--text-muted);
    }

    .table.table-cards > tbody > tr > td[data-label=""]::before { content: none; }

    /* İlk sütun kartın başlığı olur */
    .table.table-cards > tbody > tr > td:first-child {
        justify-content: flex-start;
        padding-bottom: 8px;
        text-align: left;
        font-size: 15px;
        font-weight: 500;
    }

    .table.table-cards > tbody > tr > td:first-child::before { content: none; }

    .table.table-cards > tbody > tr > td.table-cards-actions {
        justify-content: flex-end;
        gap: 8px;
        margin-top: 8px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }

    .table.table-cards > tbody > tr > td.table-cards-actions::before { content: none; }

    .table.table-cards > tbody > tr > td.table-cards-actions .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .table.table-cards > tbody > tr.table-cards-full > td {
        justify-content: center;
        text-align: center;
    }

    .table-hover.table-cards > tbody > tr:hover > * { background-color: transparent; }
}

.app-login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.app-login-forgot {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-text);
}

.app-login-note {
    font-size: 14px;
    line-height: 20px;
    color: var(--text-muted);
    margin-bottom: 24px;
    max-width: 75ch;
}

.app-auth-alt-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ============================================================
   Üst bar: arama tetikleyicisi + Hızlı ekle
   ============================================================ */
button.app-search-trigger {
    align-items: center;
    gap: 10px;
    width: 320px;
    height: var(--control-h-md);
    padding: 0 8px 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background-color: var(--surface);
    color: var(--text-subtle);
    font-family: var(--font-sans);
    font-size: 15px;
    cursor: pointer;
    transition: border-color var(--duration-fast) var(--ease-out);
}

button.app-search-trigger:hover { border-color: var(--text-muted); }
button.app-search-trigger > i { font-size: 16px; }
.app-search-placeholder { flex: 1 1 auto; text-align: left; }

.app-kbd,
.cmdk-hint kbd {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 16px;
    padding: 2px 6px;
    color: var(--text-muted);
    background-color: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    box-shadow: none;
}

.app-quick-add { gap: 8px; }
.app-quick-add i { font-size: 18px; }

@media (max-width: 639.98px) {
    .app-quick-add { width: 40px; padding: 0; }
    .app-quick-add-text { display: none; }
}

/* ============================================================
   Komut paleti (bölüm 8.23)
   ============================================================ */
.cmdk {
    position: fixed;
    inset: 0;
    z-index: 1060;
}

.cmdk[hidden] { display: none; }
html.cmdk-open body { overflow: hidden; }

.cmdk-scrim {
    position: absolute;
    inset: 0;
    background-color: var(--scrim);
    animation: cmdk-fade var(--duration-slow) var(--ease-out);
}

.cmdk-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(640px, calc(100% - 32px));
    max-height: 60vh;
    margin: 20vh auto 0;
    overflow: hidden;
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    animation: cmdk-in var(--duration-slow) var(--ease-out);
}

@keyframes cmdk-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cmdk-in {
    from { opacity: 0; transform: translateY(8px) scale(0.97); }
    to { opacity: 1; transform: none; }
}

.cmdk-search {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 56px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.cmdk-search > i {
    font-size: 20px;
    color: var(--text-subtle);
}

.cmdk-input {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    background: transparent;
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--text);
}

.cmdk-input::placeholder { color: var(--text-subtle); }
.cmdk-input:focus,
.cmdk-input:focus-visible { outline: none; box-shadow: none; }

.cmdk-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--text-muted) 25%, transparent);
    border-top-color: var(--text-muted);
    animation: cmdk-spin 700ms linear infinite;
    flex-shrink: 0;
}

.cmdk-spinner[hidden] { display: none; }
@keyframes cmdk-spin { to { transform: rotate(360deg); } }

.cmdk-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 4px 8px 8px;
}

.cmdk-group-title {
    display: flex;
    align-items: center;
    height: 28px;
    margin-top: 4px;
    padding: 0 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.cmdk-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
    cursor: pointer;
}

.cmdk-item > i {
    font-size: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.cmdk-item.is-active { background-color: var(--surface-2); }
.cmdk-item.is-active > i { color: var(--text); }

.cmdk-item-text {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.cmdk-item-label {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmdk-item-label mark {
    padding: 0;
    background: transparent;
    color: inherit;
    font-weight: 700;
}

.cmdk-item-meta {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmdk-item-enter {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-subtle);
    opacity: 0;
}

.cmdk-item.is-active .cmdk-item-enter { opacity: 1; }

.cmdk-empty {
    padding: 32px 16px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.cmdk-hint {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.cmdk-hint span { display: inline-flex; align-items: center; gap: 4px; }

@media (max-width: 639.98px) {
    .cmdk-panel {
        margin-top: 16px;
        max-height: calc(100vh - 32px);
    }

    .cmdk-hint { display: none; }
}

/* ============================================================
   Ortak düzeltmeler (2026-10-16 genel kontrol)
   ============================================================ */
/* Tablo satırı ikon eylemleri: çerçevesiz 32px; silme hover'da kırmızı. */
.table .app-icon-btn { width: 32px; height: 32px; font-size: 16px; vertical-align: middle; }
.app-icon-btn.is-danger:hover { background-color: var(--danger-bg); color: var(--danger-text); }
.table td.text-end form.d-inline { display: inline-flex !important; vertical-align: middle; margin: 0; }
/* İstatistik kutuları aynı satırda eşit boyda olsun. */
.panel-stat { height: 100%; }
.panel-stat-text { min-width: 0; }
@media (max-width: 575.98px) { .panel-stat { padding: 16px; } }

/* Silme doğrulama kodu (ortak onay penceresi, assets/js/confirm.js) */
.app-code-step { margin-top: var(--space-4); }
.app-code-input {
    font-family: var(--font-mono); font-size: 22px; letter-spacing: 0.4em;
    text-align: center; padding-left: calc(0.75rem + 0.4em);
}
.app-code-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); margin-top: var(--space-2); }
.app-code-foot .btn-link { font-size: 13px; text-decoration: none; }

/* Liste araç çubuğu (arama + kayıt sayısı) ve sıralanabilir tablo başlıkları — /alan-adlari */
.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-3); }
.list-search { position: relative; flex: 1 1 280px; max-width: 420px; }
.list-search > i {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--text-subtle); font-size: 16px; pointer-events: none;
}
.list-search .form-control { padding-left: 36px; }
.list-count { font-size: 13px; color: var(--text-muted); }
.th-sort { display: inline-flex; align-items: center; gap: 4px; color: inherit; white-space: nowrap; }
.th-sort i { font-size: 14px; color: var(--text-subtle); }
.th-sort:hover, .th-sort.is-active { color: var(--text); }
.th-sort.is-active i { color: var(--accent-text); }
.th-sort:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-sm); }
.table th.col-index, .table td.col-index { width: 1%; padding-right: 0; color: var(--text-subtle); font-family: var(--font-mono); font-size: 12px; }

@media (max-width: 767.98px) {
    /* Sıra numarası kartta gereksiz; kart başlığı bir sonraki sütun olur. */
    .table.table-cards > tbody > tr > td.col-index { display: none; }
    .table.table-cards > tbody > tr > td.col-index + td {
        justify-content: flex-start; padding-bottom: 8px; text-align: left; font-size: 15px; font-weight: 500;
    }
    .table.table-cards > tbody > tr > td.col-index + td::before { content: none; }
    .list-search { max-width: none; }
}

/* Fontlarda olmayan marka logoları (Hesaplarım/Sağlayıcılar simge seçicisi, AccountIcon bd-brand-…).
   SVG maske + currentColor: renk ve boyut diğer ikon fontları gibi metinden gelir. Yeni logo eklerken
   .bd-brand-<ad> { --bd-brand: url("data:image/svg+xml,…") } tanımla ve AccountIcon::PRESETS'e 'bd-brand-<ad>' ekle. */
.bd-brand {
    display: inline-block; width: 1em; height: 1em; flex-shrink: 0;
    background-color: currentColor; vertical-align: -0.125em;
    -webkit-mask: var(--bd-brand) center / 84% no-repeat;
    mask: var(--bd-brand) center / 84% no-repeat;
}
.bd-brand-x { --bd-brand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z'/%3E%3C/svg%3E"); }
