/* ============================================================
   Amazon Paket - Modern UI Framework
   ============================================================ */

:root {
    --primary: #ff9900;
    --primary-dark: #e88800;
    --primary-light: #ffb34d;
    --secondary: #232f3e;
    --secondary-light: #37475a;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-muted: #475569;
    --text-light: #64748b;
    --shadow: 0 1px 3px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,.10);
    --radius: 8px;
    --radius-lg: 12px;
    --sidebar-w: 260px;
    --header-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 15px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
                 "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    background: var(--bg);
    color: var(--text);
    font-weight: 500;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* Büyük ekranlarda okunabilirlik + ölçek */
@media (min-width: 1280px) {
    html { font-size: 16px; }
}
@media (min-width: 1600px) {
    html { font-size: 16.5px; }
}
@media (min-width: 1920px) {
    html { font-size: 17px; }
}
@media (min-width: 2560px) {
    html { font-size: 18px; }
}
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============== LAYOUT ============== */
.app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    grid-template-rows: var(--header-h) 1fr;
    grid-template-areas: "sidebar header" "sidebar main";
}
.sidebar {
    grid-area: sidebar;
    background: var(--secondary);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: sticky;
    top: 0;
    height: 100vh;
}
.header {
    grid-area: header;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 10;
}
.main {
    grid-area: main;
    padding: 1.5rem;
    min-width: 0;
    width: 100%;
    max-width: none;
}
/* Geniş ekran: sidebar dışı alanı doldur, boşlukları dengeli kullan */
@media (min-width: 1400px) {
    :root { --sidebar-w: 272px; }
    .main { padding: 1.75rem 2rem 2.25rem; }
    .header { padding: 0 2rem; }
    .page-header { margin-bottom: 1.75rem; }
    .page-header h1 { font-size: 1.75rem; }
    .stats {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1rem;
    }
    .quick-stats { gap: 1rem; margin-bottom: 2rem; }
    .quick-stat { flex: 1 1 140px; min-width: 130px; padding: 1rem 1.15rem; }
    .quick-stat-value { font-size: 1.5rem; }
    .quick-actions {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
    .quick-action-card { padding: 1.1rem 1.25rem; }
    .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
    .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
    .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
    .form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .map { height: 560px; }
    .card-body { padding: 1.25rem 1.35rem; }
    .table th, .table td { padding: .7rem .85rem; }
}
@media (min-width: 1800px) {
    :root { --sidebar-w: 280px; }
    .main { padding: 2rem 2.5rem 2.75rem; }
    .header { padding: 0 2.5rem; }
    .stats {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1.15rem;
    }
    .quick-actions {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.1rem;
    }
    .quick-action-card { padding: 1.2rem 1.35rem; gap: 1rem; }
    .quick-action-label { font-size: 1rem; }
    .quick-action-hint { font-size: .82rem; }
    .map { height: 640px; }
    .table-wrap { border-radius: var(--radius-lg); }
}
@media (min-width: 2200px) {
    .main { padding: 2.25rem 3rem 3rem; }
    .quick-actions {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    .grid-2 { gap: 1.5rem; }
    .grid-3 { gap: 1.5rem; }
    .map { height: 720px; }
    .stat-value { font-size: 1.65rem; }
}
@media (max-width: 900px) {
    .app {
        grid-template-columns: 1fr;
        grid-template-areas: "header" "main";
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        z-index: 100;
        transition: left .25s ease;
        height: 100vh;
    }
    .sidebar.open { left: 0; }
    .sidebar-overlay { display: none; }
    .sidebar.open + .sidebar-overlay {
        display: block; position: fixed; inset: 0;
        background: rgba(0,0,0,.4); z-index: 99;
    }
}

/* ============== SIDEBAR ============== */
.brand {
    flex-shrink: 0;
    padding: 1rem .875rem 1.125rem;
    display: block;
    min-height: 128px;
    border-bottom: 1px solid rgba(0,0,0,.2);
    background:
        linear-gradient(180deg, rgba(255,255,255,.08) 0%, transparent 42%),
        linear-gradient(180deg, transparent 60%, rgba(0,0,0,.18) 100%),
        var(--secondary);
    text-decoration: none;
    color: inherit;
    transition: background .25s ease;
}
.brand:hover {
    background:
        linear-gradient(180deg, rgba(255,255,255,.1) 0%, transparent 42%),
        linear-gradient(180deg, transparent 60%, rgba(0,0,0,.22) 100%),
        var(--secondary);
    text-decoration: none;
}
.brand-logo-wrap {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: .5rem .625rem;
    border: 1px solid rgba(255,255,255,.75);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.95),
        inset 0 -1px 0 rgba(0,0,0,.04),
        0 2px 4px rgba(0,0,0,.08),
        0 8px 18px rgba(0,0,0,.18),
        0 16px 32px rgba(0,0,0,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .25s ease, box-shadow .25s ease;
}
.brand-logo-wrap::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(145deg, rgba(255,153,0,.22), transparent 55%);
    opacity: .55;
    pointer-events: none;
}
.brand-logo-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 2px rgba(255,255,255,.6);
    pointer-events: none;
}
.brand:hover .brand-logo-wrap {
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.95),
        inset 0 -1px 0 rgba(0,0,0,.04),
        0 4px 8px rgba(0,0,0,.1),
        0 12px 24px rgba(0,0,0,.22),
        0 20px 40px rgba(0,0,0,.16),
        0 0 0 1px rgba(255,153,0,.12);
}
.brand-logo-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    max-height: 82px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.08));
}

.nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.nav::-webkit-scrollbar {
    display: none;
}
.nav-section {
    padding: .5rem 1.5rem;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #94a3b8;
    margin-top: .5rem;
}
.nav-group {
    margin: .5rem .75rem 0;
}
.nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .625rem;
    width: 100%;
    padding: .8rem 1rem;
    background: linear-gradient(135deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,.02) 100%);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .09em;
    cursor: pointer;
    text-align: left;
    transition: color .25s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
    position: relative;
    overflow: hidden;
}
.nav-group-toggle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background .25s ease, box-shadow .25s ease;
}
.nav-group-toggle span {
    display: flex;
    align-items: center;
    gap: .55rem;
    position: relative;
    z-index: 1;
}
.nav-group-toggle span::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,153,0,.45);
    flex-shrink: 0;
    transition: background .25s ease, box-shadow .25s ease, transform .25s ease;
}
.nav-group-toggle:hover {
    color: #fff;
    background: linear-gradient(135deg, rgba(255,255,255,.11) 0%, rgba(255,255,255,.05) 100%);
    border-color: rgba(255,255,255,.16);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,.22);
}
.nav-group-toggle:hover span::before {
    background: rgba(255,153,0,.7);
    transform: scale(1.15);
}
.nav-group.open .nav-group-toggle {
    color: #fff;
    background: linear-gradient(135deg, rgba(255,153,0,.22) 0%, rgba(255,153,0,.08) 100%);
    border-color: rgba(255,153,0,.4);
    box-shadow: 0 2px 10px rgba(255,153,0,.18), inset 0 1px 0 rgba(255,255,255,.08);
}
.nav-group.open .nav-group-toggle::before {
    background: var(--primary);
    box-shadow: 0 0 10px rgba(255,153,0,.5);
}
.nav-group.open .nav-group-toggle span::before {
    background: var(--primary);
    box-shadow: 0 0 8px rgba(255,153,0,.65);
}
.nav-group-chevron {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    padding: 4px;
    border-radius: 6px;
    background: rgba(255,255,255,.08);
    color: #cbd5e1;
    opacity: 1;
    position: relative;
    z-index: 1;
    transition: transform .25s ease, background .25s ease, color .25s ease;
}
.nav-group.open .nav-group-chevron {
    transform: rotate(180deg);
    background: rgba(255,153,0,.28);
    color: var(--primary-light);
}
.nav-group-items {
    display: none;
    overflow: hidden;
    margin-top: .35rem;
    padding-left: .35rem;
    border-left: 1px solid rgba(255,255,255,.06);
    margin-left: 1.1rem;
}
.nav-group.open .nav-group-items {
    display: block;
}
.nav-group-items a {
    padding-left: 1.25rem;
    font-size: .95rem;
    font-weight: 500;
}
.nav a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1.5rem;
    color: #e2e8f0;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-left: 3px solid transparent;
}
.nav a:hover { background: var(--secondary-light); color: #fff; text-decoration: none; }
.nav a.active {
    background: rgba(255,153,0,.1);
    color: var(--primary);
    border-left-color: var(--primary);
}
.nav a svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav .badge { margin-left: auto; }
.nav-badge { margin-left: auto; background: #ef4444; color: #fff; font-size: .72rem; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; }

/* ============== HEADER ============== */
.header-left { display: flex; align-items: center; gap: 1rem; }
.menu-toggle {
    display: none; background: none; border: none; cursor: pointer;
    padding: .5rem; border-radius: 6px;
}
.menu-toggle:hover { background: var(--bg); }
@media (max-width: 900px) { .menu-toggle { display: block; } }
.search-box {
    display: flex; align-items: center; gap: .5rem;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius); padding: .5rem .75rem;
    width: 320px; max-width: 100%;
}
.search-box input { border: 0; background: transparent; outline: none; flex: 1; font-size: .9rem; }
@media (max-width: 600px) { .search-box { display: none; } }
.header-right { display: flex; align-items: center; gap: 1rem; }

.icon-btn {
    position: relative;
    background: none; border: none; cursor: pointer;
    padding: .5rem; border-radius: 8px;
    display: grid; place-items: center;
    color: var(--text-muted);
}
.icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn .dot {
    position: absolute; top: 6px; right: 6px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--danger);
}

.user-menu { position: relative; }
.user-trigger {
    display: flex; align-items: center; gap: .5rem;
    padding: .25rem .5rem; border-radius: 8px; cursor: pointer;
    background: none; border: none;
}
.user-trigger:hover { background: var(--bg); }
.avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #000; font-weight: 700;
    display: grid; place-items: center;
    overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-info { text-align: left; line-height: 1.2; }
.user-name { font-weight: 700; font-size: .95rem; }
.user-role { font-size: .8rem; font-weight: 500; color: var(--text-muted); }
@media (max-width: 600px) { .user-info { display: none; } }

.dropdown {
    position: absolute; top: 100%; right: 0; margin-top: .5rem;
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-md);
    min-width: 200px; z-index: 50;
    display: none;
}
.dropdown.open { display: block; }
.dropdown a, .dropdown button {
    display: flex; align-items: center; gap: .5rem;
    padding: .65rem 1rem; color: var(--text);
    width: 100%; text-align: left;
    background: none; border: none; cursor: pointer; font-size: .9rem;
}
.dropdown a:hover, .dropdown button:hover { background: var(--bg); text-decoration: none; }
.dropdown hr { border: 0; border-top: 1px solid var(--border); margin: .25rem 0; }

/* ============== CARDS ============== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: .75rem;
}
.card-header h3 { font-size: 1.05rem; font-weight: 700; }
.card-body { padding: 1.25rem; }
.card-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--border); background: #fafbfc; }

/* ============== STAT CARDS ============== */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stats.stats-row {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .55rem;
    align-items: stretch;
}
.stats.stats-row .stat {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: .65rem .6rem;
    gap: .4rem;
    min-width: 0;
    overflow: hidden;
}
.stats.stats-row .stat > div:not(.stat-icon) {
    min-width: 0;
    width: 100%;
}
.stats.stats-row .stat-icon {
    width: 30px; height: 30px; border-radius: 7px;
}
.stats.stats-row .stat-icon svg { width: 16px; height: 16px; }
.stats.stats-row .stat-value {
    font-size: clamp(.78rem, 1.05vw, .95rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.stats.stats-row .stat-label {
    font-size: clamp(.62rem, .85vw, .72rem);
    line-height: 1.25;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    overflow-wrap: anywhere;
    word-break: break-word;
}
@media (max-width: 1100px) {
    .stats.stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .stats.stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.stat {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex; align-items: center; gap: 1rem;
    box-shadow: var(--shadow);
}
.stat-icon {
    width: 48px; height: 48px; border-radius: 10px;
    display: grid; place-items: center;
    background: rgba(59,130,246,.1); color: var(--info);
    flex-shrink: 0;
}
.stat-icon.success { background: rgba(16,185,129,.1); color: var(--success); }
.stat-icon.warning { background: rgba(245,158,11,.1); color: var(--warning); }
.stat-icon.danger  { background: rgba(239,68,68,.1);  color: var(--danger); }
.stat-icon.primary { background: rgba(255,153,0,.1);  color: var(--primary); }
.stat-icon svg { width: 24px; height: 24px; }
.stat-icon.info { background: rgba(59,130,246,.1); color: var(--info); }

/* Inline SVG icons (emoji yerine) */
.ico { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; flex-shrink: 0; line-height: 0; }
.ico svg { display: block; }
.ico-sm svg { width: 16px; height: 16px; }
.ico-md svg { width: 20px; height: 20px; }
.ico-lg svg { width: 28px; height: 28px; }
.ico-xl svg { width: 40px; height: 40px; }
.ico-dot svg { width: 18px; height: 18px; }
.ico-title { margin-right: .35rem; }
.page-header h1, .page-header h1 .ico-title { display: inline-flex; align-items: center; gap: .45rem; }
.card-header h3 { display: flex; align-items: center; gap: .4rem; }
.btn .ico { margin-right: .35em; }
.btn .ico:last-child { margin-right: 0; margin-left: .35em; }
.label-ico { display: inline-flex; align-items: center; gap: .35rem; }
.meta-ico { display: inline-flex; align-items: flex-start; gap: .4rem; }
.meta-ico .ico { margin-top: .1rem; }
.report-card-icon .ico svg { width: 40px; height: 40px; opacity: .85; }
.empty-icon .ico svg { width: 64px; height: 64px; opacity: .35; }
.pub-lang { display: flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 600; letter-spacing: .04em; }
.pub-lang a { font-size: .8rem !important; }
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: .8rem; color: var(--text-muted); }
.stat-change { font-size: .75rem; margin-top: .25rem; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ============== QUICK ACTIONS (Dashboard) ============== */
.quick-stats {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.75rem;
}
.quick-stat {
    flex: 1 1 120px;
    min-width: 110px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: .85rem 1rem;
    box-shadow: var(--shadow);
    border-left: 3px solid var(--primary);
}
.quick-stat--success { border-left-color: var(--success); }
.quick-stat--warning { border-left-color: var(--warning); }
.quick-stat--info    { border-left-color: var(--info); }
.quick-stat--danger  { border-left-color: var(--danger); }
.quick-stat-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text);
}
.quick-stat-label {
    display: block;
    margin-top: .2rem;
    font-size: .75rem;
    color: var(--text-muted);
}

.quick-section { margin-bottom: 1.75rem; }
.quick-section-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    margin-bottom: .85rem;
    padding-left: .15rem;
}
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .85rem;
}
.quick-action-card {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    position: relative;
    overflow: hidden;
}
.quick-action-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--primary);
    opacity: .85;
    transition: width .2s ease;
}
.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255,153,0,.25);
    text-decoration: none;
    color: inherit;
}
.quick-action-card:hover::before { width: 4px; }
.quick-action-card--primary::before { background: var(--primary); }
.quick-action-card--success::before { background: var(--success); }
.quick-action-card--warning::before { background: var(--warning); }
.quick-action-card--danger::before  { background: var(--danger); }
.quick-action-card--info::before    { background: var(--info); }

.quick-action-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: rgba(255,153,0,.1);
    color: var(--primary);
}
.quick-action-card--success .quick-action-icon { background: rgba(16,185,129,.1); color: var(--success); }
.quick-action-card--warning .quick-action-icon { background: rgba(245,158,11,.1); color: var(--warning); }
.quick-action-card--danger  .quick-action-icon { background: rgba(239,68,68,.1);  color: var(--danger); }
.quick-action-card--info    .quick-action-icon { background: rgba(59,130,246,.1);  color: var(--info); }
.quick-action-icon .ico svg { width: 26px; height: 26px; }

.quick-action-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.quick-action-label {
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}
.quick-action-hint {
    font-size: .75rem;
    color: var(--text-muted);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.quick-action-badge {
    position: absolute;
    top: .65rem;
    right: 2rem;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--danger);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.quick-action-arrow {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--text-light);
    opacity: .5;
    transition: transform .2s ease, opacity .2s ease, color .2s ease;
}
.quick-action-arrow svg { width: 18px; height: 18px; display: block; }
.quick-action-card:hover .quick-action-arrow {
    transform: translateX(3px);
    opacity: 1;
    color: var(--primary);
}
@media (max-width: 600px) {
    .quick-actions { grid-template-columns: 1fr; }
    .quick-action-hint { white-space: normal; }
}

/* ============== PHONE / WHATSAPP ACTIONS ============== */
.phone-actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
}
.phone-actions--compact .phone-action span {
    display: none;
}
.phone-actions-number {
    font-size: .82rem;
    color: var(--text-muted);
    margin-right: .15rem;
}
.phone-action {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .28rem .55rem;
    border-radius: 6px;
    font-size: .72rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease;
}
.phone-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
    text-decoration: none;
    color: #fff;
}
.phone-action svg { flex-shrink: 0; }
.phone-action--wa-msg {
    background: #25D366;
    color: #fff;
}
.phone-action--wa-call {
    background: #128C7E;
    color: #fff;
}
.phone-action--notify {
    background: #c2410c;
    color: #fff;
    border: 0;
    cursor: pointer;
    font: inherit;
}
.phone-action--notify:hover {
    color: #fff;
}

/* ============== BUTTONS ============== */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .55rem 1rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: var(--bg);
    color: var(--text);
    font-size: .95rem; font-weight: 600;
    cursor: pointer; text-decoration: none;
    transition: all .15s ease;
    line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: #000; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: var(--secondary-light); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-info    { background: var(--info);    color: #fff; }
.btn-outline { background: transparent; border-color: var(--border); }
.btn-sm { padding: .35rem .65rem; font-size: .8rem; }
.btn-lg { padding: .75rem 1.5rem; font-size: 1rem; }
.btn-block { display: flex; width: 100%; justify-content: center; }
.btn-icon { padding: .45rem; }

/* ============== FORMS ============== */
.form-group { margin-bottom: 1rem; }
.form-grid { display: grid; gap: 1rem; }
.form-grid-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/*
  Kompakt form — çok alanlı düzenleme kartları için (araç detayı gibi).
  Normal formda satır arası iki kez boşluk alıyor (.form-group alt boşluğu +
  grid gap); burada boşluk yalnız grid'den gelir. Alan genişliği minimumu da
  düşürüldüğü için dar kartlarda tek sütuna düşmek yerine iki sütun kalır.
*/
.form-compact .card-body { padding: 1rem; }
.form-compact .form-grid {
    gap: .6rem .7rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.form-compact .form-group { margin-bottom: 0; }
/* Alan altı açıklamaları küçült — bazı formlarda <small> yerine <p> kullanılıyor */
.form-compact .form-group p.text-sm { font-size: .72rem; line-height: 1.3; margin: .15rem 0 0; }
.form-compact .form-grid-2 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.form-compact .form-grid-3 { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.form-compact label {
    font-size: .78rem; font-weight: 600; margin-bottom: .2rem; color: var(--text-muted);
}
.form-compact input[type=text], .form-compact input[type=email], .form-compact input[type=tel],
.form-compact input[type=number], .form-compact input[type=date], .form-compact input[type=time],
.form-compact input[type=datetime-local], .form-compact input[type=url], .form-compact input[type=search],
.form-compact select, .form-compact textarea, .form-compact .form-control {
    padding: .38rem .55rem; font-size: .875rem;
}
.form-compact small { display: block; font-size: .72rem; line-height: 1.3; margin-top: .15rem; }
.form-compact .form-section {
    grid-column: 1 / -1;
    display: flex; align-items: center; gap: .4rem;
    margin: .5rem 0 0; padding-top: .6rem;
    border-top: 1px solid var(--border);
    font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    color: var(--text-muted);
}
.form-compact .form-note { grid-column: 1 / -1; margin: 0; font-size: .75rem; line-height: 1.4; }
/* Salt okunur künye (plaka/tip gibi) — alan yerine tek satır */
.form-compact .form-readonly {
    grid-column: 1 / -1;
    display: flex; flex-wrap: wrap; gap: .35rem .5rem; align-items: center;
    margin: 0; font-size: .8rem; color: var(--text-muted);
}
.form-compact .form-readonly strong { color: var(--text); font-size: .95rem; letter-spacing: .02em; }
@media (min-width: 1200px) {
    .form-compact .form-grid,
    .form-compact .form-grid-2 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
}

/*
  Kompakt bilgi tablosu — kurye/araç detayındaki "alan: değer" kartları için.
  Seçiciler .table.table-compact: temel .table kuralları bu bloktan sonra geldiği
  için tek sınıfla yazılırsa eziliyor.
*/
.table.table-compact { font-size: .85rem; }
.table.table-compact th, .table.table-compact td { padding: .3rem .5rem; }
.table.table-compact th {
    font-size: .72rem; letter-spacing: .02em;
    background: transparent; color: var(--text-muted);
    text-transform: none; font-weight: 600; width: 40%;
}
.table.table-compact tr:last-child th, .table.table-compact tr:last-child td { border-bottom: 0; }
.table.table-compact tbody tr:hover { background: transparent; }
.filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .75rem 1rem;
}
.filter-form .form-group {
  margin-bottom: 0;
  flex: 0 0 auto;
  min-width: 150px;
}
.filter-form .form-group-grow {
  flex: 1 1 200px;
  min-width: 200px;
}
.filter-form .form-group-actions {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-shrink: 0;
}
label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .35rem; color: var(--text); }
.required::after { content: " *"; color: var(--danger); }
.form-control, input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
input[type=date], input[type=time], input[type=datetime-local], input[type=search], input[type=url],
select, textarea {
    width: 100%;
    padding: .55rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    font-size: .95rem;
    font-family: inherit;
    font-weight: 500;
    transition: border-color .15s ease, box-shadow .15s ease;
    color: var(--text);
}
.form-control:focus, input:focus, select:focus, textarea:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,153,0,.15);
}
textarea { resize: vertical; min-height: 80px; }
.form-help { font-size: .75rem; color: var(--text-muted); margin-top: .25rem; }
.form-error { font-size: .75rem; color: var(--danger); margin-top: .25rem; }
.form-control.error { border-color: var(--danger); }
.form-check { display: flex; align-items: center; gap: .5rem; }
.form-check input { width: auto; }

.input-password { position: relative; }
.input-password input { padding-right: 2.75rem; }
.input-password-toggle {
    position: absolute;
    right: .5rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    padding: .25rem;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    line-height: 0;
    border-radius: 4px;
}
.input-password-toggle:hover { color: var(--text); }
.input-password-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.input-password-toggle svg { width: 18px; height: 18px; }
.input-password-toggle .hidden { display: none; }

/* ============== TABLES ============== */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td {
    text-align: left; padding: .75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table th {
    background: #fafbfc; font-weight: 700;
    color: var(--text); font-size: .85rem;
    text-transform: uppercase; letter-spacing: .03em;
}
/*
 * Hizalama yardımcıları tablo içinde de geçerli olmalı. ".table th, .table td"
 * kuralı (sınıf + etiket) ".text-right"ten daha ÖZGÜL olduğu için dosyada sonra
 * gelmesine rağmen onu eziyordu: sağa yaslanması gereken sayı sütunları sola
 * yaslanıyor, uzun başlıkların altında değer komşu sütuna kaymış gibi görünüyordu.
 */
.table th.text-right,  .table td.text-right  { text-align: right; }
.table th.text-center, .table td.text-center { text-align: center; }
/* Para ve süre değerleri satır sonunda bölünmesin ("120,00" / "€" alt alta düşmesin) */
.table th.text-right, .table td.text-right { white-space: nowrap; }
.table tbody tr:hover { background: #fafbfc; }
.table-actions { display: flex; gap: .25rem; justify-content: flex-end; }

.table th.sortable { white-space: nowrap; }
.table th.sortable a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}
.table th.sortable a:hover { color: var(--primary); }
.table th.sortable .sort-ind {
    font-size: .65rem;
    opacity: .35;
    line-height: 1;
}
.table th.sortable.is-active .sort-ind {
    opacity: 1;
    color: var(--primary);
}

/* ============== BADGES ============== */
.badge {
    display: inline-flex; align-items: center;
    padding: .25rem .55rem;
    border-radius: 6px;
    font-size: .75rem; font-weight: 600;
    background: var(--bg); color: var(--text-muted);
    border: 1px solid var(--border);
}
.badge-success  { background: rgba(16,185,129,.1); color: var(--success); border-color: transparent; }
.badge-danger   { background: rgba(239,68,68,.1);  color: var(--danger);  border-color: transparent; }
.badge-warning  { background: rgba(245,158,11,.1); color: var(--warning); border-color: transparent; }
.badge-info     { background: rgba(59,130,246,.1); color: var(--info);    border-color: transparent; }
.badge-primary  { background: rgba(255,153,0,.1);  color: var(--primary-dark); border-color: transparent; }
.badge-secondary{ background: rgba(35,47,62,.1);   color: var(--secondary); border-color: transparent; }

/* ============== ALERTS ============== */
.alert {
    padding: .75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border-left: 4px solid;
    background: #fff;
    display: flex; gap: .5rem; align-items: flex-start;
}
.alert-success { border-color: var(--success); background: rgba(16,185,129,.05); color: #065f46; }
.alert-danger  { border-color: var(--danger);  background: rgba(239,68,68,.05);  color: #991b1b; }
.alert-warning { border-color: var(--warning); background: rgba(245,158,11,.05); color: #92400e; }
.alert-info    { border-color: var(--info);    background: rgba(59,130,246,.05); color: #1e40af; }

/* ============== UTILITIES ============== */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .25rem; } .gap-2 { gap: .5rem; } .gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; }
.mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; } .mt-3 { margin-top: .75rem; } .mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: .25rem; } .mb-2 { margin-bottom: .5rem; } .mb-3 { margin-bottom: .75rem; } .mb-4 { margin-bottom: 1rem; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: .8rem; }
.text-lg { font-size: 1.1rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.w-full { width: 100%; }
.hidden { display: none !important; }

.page-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem;
}
.page-header h1 { font-size: 1.65rem; font-weight: 800; }
.page-header p { color: var(--text-muted); margin-top: .25rem; font-size: .95rem; font-weight: 500; }

.empty {
    text-align: center; padding: 3rem 1rem; color: var(--text-muted);
}
.empty svg { width: 64px; height: 64px; opacity: .3; margin-bottom: 1rem; }

.pagination { display: flex; gap: .25rem; justify-content: center; padding: 1rem; }
.pagination .page {
    padding: .35rem .65rem; border: 1px solid var(--border); border-radius: 6px;
    background: #fff; color: var(--text); font-size: .85rem;
}
.pagination .page:hover { background: var(--bg); text-decoration: none; }
.pagination .page.active { background: var(--primary); color: #000; border-color: var(--primary); }
.pagination .page.disabled { opacity: .5; pointer-events: none; }

/* ============== TIMELINE ============== */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
    content: ''; position: absolute; left: .65rem; top: .25rem; bottom: 0;
    width: 2px; background: var(--border);
}
.timeline-item { position: relative; padding-bottom: 1.25rem; }
.timeline-item::before {
    content: ''; position: absolute; left: -1.5rem; top: .25rem;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--primary); border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--border);
}
.timeline-item .time { font-size: .75rem; color: var(--text-muted); }

/* ============== MAP ============== */
.map { width: 100%; height: 480px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }

/* ============== RESPONSIVE GRID ============== */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* ============== TABS ============== */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; flex-wrap: wrap; }
.tab {
    padding: .65rem 1rem; border: 0; background: none; cursor: pointer;
    font-size: .9rem; color: var(--text-muted);
    border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary-dark); border-color: var(--primary); }

/* ============== TOAST ============== */
.toast {
    position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1000;
    background: #fff; border: 1px solid var(--border);
    border-left: 4px solid var(--info);
    padding: .75rem 1rem; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); min-width: 280px; max-width: 400px;
    display: flex; gap: .5rem; align-items: flex-start;
    animation: slideIn .25s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.danger  { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============== IMAGE ZOOM ============== */
[data-img-zoom] { cursor: zoom-in; }
.img-zoom-overlay {
    position: fixed; inset: 0; z-index: 1100;
    display: flex; align-items: center; justify-content: center;
    background: rgba(15, 23, 42, .82);
    padding: 1.5rem; cursor: zoom-out;
}
.img-zoom-overlay img {
    max-width: min(96vw, 960px); max-height: 90vh;
    object-fit: contain; border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,.45);
    background: #fff; cursor: default;
}
.img-zoom-overlay .img-zoom-close {
    position: absolute; top: 1rem; right: 1rem;
    width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: rgba(255,255,255,.15); color: #fff;
    font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.img-zoom-overlay .img-zoom-close:hover { background: rgba(255,255,255,.28); }

/* ============== MODAL ============== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    display: none; align-items: center; justify-content: center;
    z-index: 1000; padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
    background: #fff; border-radius: var(--radius-lg);
    width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 1.25rem; }
.modal-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .5rem; }

/* ============== AUTH PAGES ============== */
.auth {
    min-height: 100vh;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    padding: 1rem;
}
.auth-card {
    background: #fff; border-radius: var(--radius-lg);
    padding: 2.5rem; width: 100%; max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.auth-brand {
    margin: 0 auto 1.5rem;
}
.auth-brand .brand-logo-wrap {
    padding: .875rem 1rem;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.95),
        inset 0 -1px 0 rgba(0,0,0,.04),
        0 2px 6px rgba(0,0,0,.06),
        0 10px 24px rgba(0,0,0,.12),
        0 0 0 1px rgba(0,0,0,.04);
}
.auth-brand .brand-logo-img {
    max-height: 96px;
}

.privacy-doc { line-height: 1.65; }
.privacy-doc .privacy-body p { margin: 0 0 .85rem; color: #334155; }
.privacy-doc .privacy-body h4 { margin: 1.1rem 0 .35rem; font-size: .95rem; color: #0f172a; }
.privacy-doc .privacy-body ul { margin: 0 0 1rem; padding-left: 1.2rem; color: #334155; }
.privacy-doc .privacy-body li { margin: .35rem 0; }
.privacy-doc .privacy-address {
    font-style: normal;
    background: #f8fafc;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    padding: .9rem 1rem;
    margin: .75rem 0 0;
    line-height: 1.7;
}
.privacy-toc-list { margin: 0; padding-left: 1.25rem; columns: 1; }
.privacy-toc-list a { color: #334155; text-decoration: none; }
.privacy-toc-list a:hover { color: var(--accent, #ff9900); text-decoration: underline; }
.privacy-doc section[id] { scroll-margin-top: 1rem; }
@media (min-width: 640px) {
    .privacy-toc-list { columns: 2; column-gap: 1.5rem; }
}

.lifecycle-card { border-left: 3px solid #dc2626; }
.lifecycle-card .card-header h3 { color: #b91c1c; }
