/* Ana stil dosyasi - base.html'den tasindi.
   Turkce karakter uyumlulugu icin --font-family kullanilir; Noto Sans Latin Extended destekler (g, u, s, i, o, c). */
:root {
    --font-family: 'Noto Sans', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    --bg: #0f0f12;
    --bg-card: #18181c;
    --bg-card-hover: #1e1e24;
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    --accent: #d4a853;
    --accent-hover: #e5b96a;
    --danger: #dc2626;
    --danger-soft: rgba(220,38,38,0.15);
    --success: #16a34a;
    --success-soft: rgba(22,163,74,0.15);
    --border: #27272a;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --chart-ticks-color: #e4e4e7;
}
/* Acik tema */
[data-theme="light"] {
    --bg: #f4f4f5;
    --bg-card: #ffffff;
    --bg-card-hover: #f4f4f5;
    --text: #18181b;
    --text-muted: #52525b;
    --accent: #b45309;
    --accent-hover: #92400e;
    --danger: #dc2626;
    --danger-soft: rgba(220,38,38,0.12);
    --success: #16a34a;
    --success-soft: rgba(22,163,74,0.12);
    --border: #e4e4e7;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --chart-ticks-color: #374151;
}
[data-theme="light"] tr:hover { background: rgba(0,0,0,0.03); }
[data-theme="light"] .flash.success { color: #166534; border-color: rgba(22,163,74,0.4); }
[data-theme="light"] .flash.danger { color: #b91c1c; border-color: rgba(220,38,38,0.4); }
[data-theme="light"] .flash.warning { color: #a16207; border-color: rgba(234,179,8,0.4); }
[data-theme="light"] .flash.info { color: #1d4ed8; border-color: rgba(59,130,246,0.4); }
[data-theme="light"] .saat-dolu-ornek { background: #374151; color: #fff; }
[data-theme="light"] .takvim-saat-kapali { background: rgba(113,113,122,0.2); border-left-color: #71717a; }
[data-theme="light"] .text-danger { color: #b91c1c; }
[data-theme="light"] .text-success { color: #15803d; }
[data-theme="light"] .tip-gelir { color: #15803d; }
[data-theme="light"] .tip-gider { color: #b91c1c; }
[data-theme="light"] .badge-gelir { color: #15803d; }
[data-theme="light"] .badge-gider { color: #b91c1c; }
[data-theme="light"] .badge-durum-aktif { color: #15803d; }
[data-theme="light"] .badge-durum-kisitli { color: #a16207; }
[data-theme="light"] .badge-durum-kapali { color: #52525b; }
[data-theme="light"] .badge-durum-odeme_bekliyor { color: #c2410c; }
* { box-sizing: border-box; }
body {
    font-family: var(--font-family);
    background: var(--bg);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; font-weight: 500; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
.container { max-width: 920px; margin: 0 auto; padding: 1.25rem; }
.container--wide { max-width: 1280px; }
nav {
    background: var(--bg-card);
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}
nav a { color: var(--accent); }
nav span { color: var(--text-muted); font-size: 0.9rem; }
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo:hover { text-decoration: none; }
.nav-menu { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-family);
}
.theme-toggle-btn:hover { color: var(--text); border-color: var(--accent); }
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: var(--accent);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}
.hamburger-btn:hover { color: var(--accent-hover); }
.hamburger-icon {
    display: block;
    width: 24px;
    height: 20px;
    position: relative;
}
.hamburger-icon span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger-icon span:nth-child(1) { top: 0; }
.hamburger-icon span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-icon span:nth-child(3) { bottom: 0; }
.hamburger-btn.active .hamburger-icon span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}
.hamburger-btn.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.active .hamburger-icon span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}
.site-logo { height: 32px; width: auto; max-width: 120px; display: block; vertical-align: middle; object-fit: contain; }
.img-urun-kucuk { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; }
.img-urun-detay { max-width: 280px; max-height: 280px; object-fit: contain; border-radius: 8px; border: 1px solid var(--border); }
.img-profil { max-width: 120px; max-height: 120px; border-radius: 8px; object-fit: cover; }
.img-logo { max-width: 120px; max-height: 80px; border-radius: 4px; object-fit: contain; }
.flash { padding: 0.625rem 1rem; margin: 0.5rem 0; border-radius: var(--radius-sm); font-size: 0.9rem; }
.flash.success { background: var(--success-soft); color: #86efac; border: 1px solid rgba(22,163,74,0.3); }
.flash.danger { background: var(--danger-soft); color: #fca5a5; border: 1px solid rgba(220,38,38,0.3); }
.flash.warning { background: rgba(234,179,8,0.15); color: #fde047; border: 1px solid rgba(234,179,8,0.3); }
.flash.info { background: rgba(59,130,246,0.15); color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }
h1 { color: var(--text); font-weight: 700; font-size: 1.6rem; margin-top: 0; letter-spacing: -0.02em; }
h2 { font-size: 1.15rem; font-weight: 600; color: var(--text); margin: 0 0 0.75rem 0; }
h3 { font-size: 1rem; font-weight: 600; color: var(--text-muted); margin: 1rem 0 0.5rem 0; }
.card {
    background: var(--bg-card);
    padding: 1.25rem;
    border-radius: var(--radius);
    margin: 1rem 0;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow-x: auto;
}
.card-summary { border-left: 4px solid var(--accent); }
form label { display: block; margin-top: 0.75rem; font-weight: 500; color: var(--text-muted); font-size: 0.9rem; font-family: var(--font-family); }
form input, form select, form textarea {
    width: 100%;
    max-width: 340px;
    padding: 0.6rem 0.75rem;
    margin-top: 0.35rem;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font-family);
}
form textarea { min-height: 4rem; resize: vertical; }
form input:focus, form select:focus, form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(212,168,83,0.2); }
form button, .btn {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-family);
    transition: background 0.2s;
}
form button:hover, .btn:hover { background: var(--accent-hover); color: #fff; }
.btn-primary { background: var(--accent-hover); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
.text-danger { color: #f87171; }
.text-success { color: #4ade80; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 0.65rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
tr:hover { background: rgba(255,255,255,0.02); }
.durum-beklemede { background: rgba(234,179,8,0.12); }
.durum-onaylandi { background: rgba(34,197,94,0.12); }
.durum-iptal { background: rgba(113,113,122,0.2); color: var(--text-muted); }
.durum-bitti, .durum-tamamlandi { background: rgba(59,130,246,0.12); }
.tip-gelir { color: #4ade80; }
.tip-gider { color: #f87171; }
.badge { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }
.badge-danger { background: var(--danger); color: #fff; }
.badge-warning { background: #ca8a04; color: #fff; }
.badge-info { background: #2563eb; color: #fff; }
.badge-orange { background: #ea580c; color: #fff; }
.badge-gelir { background: var(--success-soft); color: #4ade80; }
.badge-gider { background: var(--danger-soft); color: #f87171; }
.badge-durum-aktif { background: rgba(34,197,94,0.2); color: #4ade80; }
.badge-durum-kisitli { background: rgba(234,179,8,0.2); color: #eab308; }
.badge-durum-kapali { background: rgba(113,113,122,0.3); color: #a1a1aa; }
.badge-durum-odeme_bekliyor { background: rgba(249,115,22,0.2); color: #fb923c; }
.hint { color: var(--text-muted); font-size: 0.875rem; }
.card .hint { color: var(--text); }
.takvim-gun.gecmis { opacity: 0.5; cursor: not-allowed; }
.takvim-saat-kapali { background: rgba(63,63,70,0.4); border-left: 3px solid #52525b; }
.takvim-saat-dolu { background: rgba(220,38,38,0.12); border-left: 3px solid var(--danger); }
.saat-dolu-ornek { background: #3f3f46; color: #fff; padding: 2px 6px; border-radius: 4px; font-size: 0.85rem; }
.navbar-kontrol-adi { max-width: 140px; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.td-form-wrap { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; min-width: 0; }

/* Masaustu kart grid – urun/salon listeleri */
.card-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(1, 1fr);
}
@media (min-width: 769px) {
    .card-grid { grid-template-columns: repeat(3, 1fr); }
    .card-grid.card-grid--4 { grid-template-columns: repeat(4, 1fr); }
}
.card-grid-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.card-grid-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}
.card-grid-item .card-grid-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    background: var(--border);
}
.card-grid-item .card-grid-title {
    font-weight: 600;
    margin: 0 0 0.35rem 0;
    line-height: 1.3;
}
.card-grid-item .card-grid-meta {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    flex: 1;
}
.card-grid-item .card-grid-actions {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}
.card-grid-item.card-grid-item--salon .card-grid-img {
    display: none;
}
.card-grid-item.card-grid-item--salon .card-grid-title {
    font-size: 1.05rem;
}

@media (max-width: 640px) {
    .td-form-wrap { display: block; }
    .td-form-wrap form, .td-form-wrap select { margin-bottom: 0.25rem; }
}
.nav-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.filter-form { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
@media (max-width: 768px) {
    .filter-form { flex-direction: column; align-items: stretch; }
    .filter-form > div { max-width: 100%; }
    .filter-form label { margin-top: 0.5rem; }
    .filter-form input, .filter-form select { max-width: 100%; }
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
    .table-responsive .takvim-tablo { min-width: 320px; }
    .nav-buttons { gap: 0.4rem; }
    .nav-buttons .btn { margin: 0; }
    .table-mobile-card { display: block; }
    .table-mobile-card thead { display: none; }
    .table-mobile-card tbody { display: block; }
    .table-mobile-card tr {
        display: block;
        margin-bottom: 1rem;
        padding: 1rem;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
    }
    .table-mobile-card td {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border: none;
        word-break: break-word;
    }
    .table-mobile-card td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        margin-right: 0.5rem;
        flex-shrink: 0;
    }
    .table-mobile-card td:last-child { border-bottom: none; }
    .table-mobile-card td[style*="flex-direction:column"] { flex-direction: column; align-items: flex-start; }
    .table-mobile-card td[style*="flex-direction:column"]:before { margin-bottom: 0.5rem; }
    .table-mobile-card .btn { margin-top: 0.5rem; width: 100%; max-width: 200px; }
    .table-mobile-card form { width: 100%; }
    .table-mobile-card select { width: 100%; max-width: 100%; margin-bottom: 0.5rem; }
    .table-mobile-card .checkbox-inline { display: flex; align-items: center; margin-bottom: 0.5rem; }
    .site-logo { height: 28px; max-width: 100px; }
    nav { flex-wrap: nowrap; }
    .nav-logo { flex: 1; }
    .hamburger-btn { display: block; }
    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border);
    }
    .nav-menu.active { display: flex; }
    nav a, nav span { font-size: 0.9rem; }
    .container { padding: 0.75rem; }
    h1 { font-size: 1.4rem; }
    .card { padding: 1rem; }
    form input, form select { max-width: 100%; }
    .btn { padding: 0.5rem 0.9rem; font-size: 0.85rem; }
    p { display: flex; flex-wrap: wrap; gap: 0.5rem; }
    p .btn { margin-bottom: 0.5rem; }
}

/* Landing: salon odakli tek blok */
.landing-container { max-width: 800px; margin: 0 auto; padding: 2rem 1.25rem; text-align: center; }
.landing-hero { padding: 2.5rem 0; }
.landing-logo-wrapper img { filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1)); }
.landing-title { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: -0.02em; color: var(--text); }
.landing-subtitle { font-size: 1.5rem; font-weight: 600; margin-bottom: 1rem; color: var(--text); }
.landing-lead { color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; margin: 0 0 1.5rem 0; }
.landing-features { box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.landing-contact { box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.landing-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-bottom: 2rem; }
.landing-cta .btn { min-width: 140px; font-size: 1rem; padding: 0.75rem 1.5rem; }
.landing-footer-text { color: var(--text-muted); font-size: 0.9rem; margin: 0; }
.btn-secondary { background: var(--bg-card); color: var(--accent); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); color: var(--accent-hover); text-decoration: none; }

/* Chart.js: mobilde min yukseklik ve okunakli grafik alani */
.chart-wrapper { position: relative; width: 100%; height: 220px; min-height: 220px; max-width: 620px; }
.chart-wrapper--wide { max-width: 760px; height: 240px; min-height: 240px; }
@media (max-width: 768px) {
    .chart-wrapper { height: 260px; min-height: 260px; max-width: 100%; }
    .chart-wrapper--wide { max-width: 100%; height: 260px; min-height: 260px; }
    .landing-container { padding: 1.5rem 1rem; }
    .landing-hero { padding: 1.5rem 0; }
    .landing-title { font-size: 1.5rem; }
    .landing-subtitle { font-size: 1.25rem; }
    .landing-logo-wrapper img { max-width: 150px; }
    .landing-features { padding: 1rem; }
    .landing-features ul { grid-template-columns: 1fr; }
    .landing-contact { padding: 1.5rem; }
}

/* Yazici (print) ciktilari: tek font + acik tema */
@media print {
    html, body {
        font-family: var(--font-family);
        background: #ffffff !important;
        color: #000000 !important;
    }
    * {
        box-shadow: none !important;
    }
    nav, .hamburger-btn, .theme-toggle-btn, .flash, .btn {
        display: none !important;
    }
    .card {
        background: #ffffff !important;
        border-color: #d4d4d8 !important;
    }
}
