/* ==========================================================
   NAIL ART ERP — Tasarım Sistemi
   Konsept: "Vanity table" — oje şişesi kapaklarının rengi
   bütün arayüzde tekrar eden bir işaret dili olarak kullanılır.
   ========================================================== */


@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
    --wine-900: #2B1014;
    --wine-800: #3D171D;
    --wine-700: #4E1F27;
    --gold: #C9A15A;
    --gold-soft: #E4CE9C;
    --rose: #D88B93;
    --rose-deep: #B85D67;
    --cream: #FBF6F2;
    --cream-card: #FFFFFF;
    --ink: #241014;
    --ink-soft: #6B5257;
    --line: #EDE0DA;
    --success: #6E8F6C;
    --warn: #C97A3C;
    --font-display: 'Fraunces', serif;
    --font-body: 'Manrope', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 8px 24px -8px rgba(43,16,20,0.15);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ---------- Uygulama İskeleti ---------- */
.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* ---------- Kenar Çubuğu ---------- */
.sidebar {
    background: linear-gradient(180deg, var(--wine-900) 0%, var(--wine-800) 100%);
    color: var(--cream);
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: conic-gradient(from 200deg, var(--rose), var(--gold), var(--rose-deep), var(--rose));
    flex-shrink: 0;
    box-shadow: inset 0 0 0 3px rgba(251,246,242,0.15);
}

.brand-text {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 19px;
    line-height: 1.15;
    letter-spacing: 0.01em;
}

    .brand-text span {
        display: block;
        font-family: var(--font-mono);
        font-size: 10px;
        letter-spacing: 0.14em;
        color: var(--gold-soft);
        font-weight: 400;
        margin-top: 3px;
        text-transform: uppercase;
    }

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(251,246,242,0.4);
    margin: 18px 10px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 14.5px;
    font-weight: 500;
    color: rgba(251,246,242,0.75);
    transition: background 0.15s ease, color 0.15s ease;
    position: relative;
}

    .nav-item:hover {
        background: rgba(251,246,242,0.06);
        color: var(--cream);
    }

    .nav-item.active {
        background: rgba(251,246,242,0.1);
        color: var(--cream);
    }

        .nav-item.active::before {
            content: "";
            position: absolute;
            left: -20px;
            top: 50%;
            transform: translateY(-50%);
            width: 4px;
            height: 60%;
            border-radius: 4px;
            background: var(--rose);
        }

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--gold-soft);
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: rgba(251,246,242,0.06);
}

.avatar-ring {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--rose));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--wine-900);
}

.sidebar-footer small {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(251,246,242,0.45);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ---------- Ana İçerik ---------- */
.main {
    padding: 36px 44px 60px;
    max-width: 1180px;
}

.topbar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 32px;
}

    .topbar h1 {
        font-family: var(--font-display);
        font-size: 30px;
        font-weight: 600;
        margin: 0 0 4px;
        color: var(--wine-900);
    }

    .topbar p {
        margin: 0;
        color: var(--ink-soft);
        font-size: 14.5px;
    }

.topbar-date {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--ink-soft);
    background: var(--cream-card);
    border: 1px solid var(--line);
    padding: 8px 14px;
    border-radius: 999px;
}

/* ---------- İstatistik Kartları ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--cream-card);
    border-radius: var(--radius);
    padding: 20px 20px 18px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

    .stat-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 5px;
        background: var(--swatch, var(--rose));
    }

    .stat-card .swatch-cap {
        width: 30px;
        height: 30px;
        border-radius: 50% 50% 46% 46% / 55% 55% 45% 45%;
        background: var(--swatch, var(--rose));
        margin-bottom: 14px;
        box-shadow: 0 4px 10px -3px rgba(0,0,0,0.25);
    }

    .stat-card .value {
        font-family: var(--font-mono);
        font-size: 26px;
        font-weight: 500;
        color: var(--ink);
        line-height: 1;
    }

    .stat-card .label {
        margin-top: 6px;
        font-size: 13px;
        color: var(--ink-soft);
        font-weight: 600;
    }

    .stat-card .delta {
        margin-top: 10px;
        font-size: 11.5px;
        font-family: var(--font-mono);
        color: var(--success);
    }

        .stat-card .delta.warn {
            color: var(--warn);
        }

/* ---------- Panel ---------- */
.panel {
    background: var(--cream-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 24px 16px;
    border-bottom: 1px solid var(--line);
}

    .panel-head h2 {
        font-family: var(--font-display);
        font-size: 19px;
        font-weight: 600;
        margin: 0;
        color: var(--wine-900);
    }

.btn-ghost {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--rose-deep);
    border: 1px solid var(--line);
    padding: 8px 14px;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
}

    .btn-ghost:hover {
        background: #FBF0EF;
    }

.appt-row {
    display: grid;
    grid-template-columns: 70px 1fr 1fr 120px;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

    .appt-row:last-child {
        border-bottom: none;
    }

.appt-time {
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--ink);
}

.appt-service {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 600;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--swatch, var(--rose));
}

.appt-customer {
    color: var(--ink-soft);
}

.status-pill {
    justify-self: start;
    font-family: var(--font-mono);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 500;
}

.status-confirmed {
    background: #E9F1E8;
    color: var(--success);
}

.status-pending {
    background: #FBF0DF;
    color: var(--warn);
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(43,16,20,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-box {
    background: var(--cream-card);
    border-radius: var(--radius);
    padding: 28px;
    width: 420px;
    max-width: 90vw;
    box-shadow: var(--shadow);
}

    .modal-box h2 {
        font-family: var(--font-display);
        color: var(--wine-900);
        margin: 0 0 18px;
        font-size: 20px;
    }

    .modal-box label {
        display: block;
        font-size: 12.5px;
        font-weight: 700;
        color: var(--ink-soft);
        margin: 14px 0 5px;
    }

    .modal-box input, .modal-box select, .modal-box textarea {
        width: 100%;
        padding: 9px 12px;
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
        font-family: var(--font-body);
        font-size: 14px;
        background: var(--cream);
    }

.customer-result {
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13.5px;
}

    .customer-result:hover {
        background: #FBF0EF;
    }

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.btn-primary {
    background: var(--rose-deep);
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

    .btn-primary:hover {
        background: var(--wine-700);
    }

/* Randevu Aksiyon Modalı */
.action-modal-box {
    background: var(--cream-card);
    border-radius: var(--radius);
    padding: 26px;
    width: 340px;
    max-width: 90vw;
    box-shadow: var(--shadow);
}

    .action-modal-box h3 {
        font-family: var(--font-display);
        color: var(--wine-900);
        margin: 0 0 4px;
        font-size: 18px;
    }

    .action-modal-box .meta {
        color: var(--ink-soft);
        font-size: 13px;
        margin-bottom: 18px;
    }

    .action-modal-box .status-tag {
        display: inline-block;
        font-family: var(--font-mono);
        font-size: 10.5px;
        text-transform: uppercase;
        padding: 3px 9px;
        border-radius: 999px;
        margin-bottom: 14px;
    }

.btn-approve {
    background: var(--success);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    width: 100%;
    margin-bottom: 8px;
}

.btn-reject {
    background: transparent;
    color: var(--warn);
    border: 1px solid var(--warn);
    padding: 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    width: 100%;
    margin-bottom: 8px;
}

.btn-close-action {
    background: transparent;
    color: var(--ink-soft);
    border: none;
    padding: 8px;
    font-size: 13px;
    cursor: pointer;
    width: 100%;
}

/* ==========================================================
   AJANDA GÖRÜNÜMÜ (Ay Takvimi + Gün Listesi)
   ========================================================== */

.agenda-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    align-items: start;
}

.cal-nav-btn {
    padding: 6px 12px !important;
    border-radius: 999px !important;
}

.mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.mini-cal-headers {
    margin-bottom: 6px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--ink-soft);
    text-transform: uppercase;
}

.mini-cal-cell {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 12.5px;
    cursor: pointer;
    border: 1px solid transparent;
}

    .mini-cal-cell:hover {
        background: #FBF0EF;
    }

    .mini-cal-cell.selected {
        background: var(--rose);
        color: #fff;
        font-weight: 700;
    }

.dot-legend {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.legend-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 11.5px;
    color: var(--ink-soft);
}

    .legend-row .dot-legend {
        width: 8px;
        height: 8px;
        margin-right: 5px;
        vertical-align: middle;
    }

.agenda-row {
    display: grid;
    grid-template-columns: 55px 1fr;
    gap: 12px;
    padding: 10px 24px;
    border-bottom: 1px solid var(--line);
    align-items: start;
}

    .agenda-row:last-child {
        border-bottom: none;
    }

.agenda-time {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink-soft);
    padding-top: 10px;
}

.agenda-slot-available {
    padding: 10px 14px;
    border: 1.5px dashed var(--line);
    border-radius: var(--radius-sm);
    color: var(--ink-soft);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

    .agenda-slot-available:hover {
        background: #F1F8F0;
        border-color: var(--success);
        color: var(--success);
    }

.agenda-slot-booked {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border-left: 3px solid var(--rose-deep);
    background: #FBF6F5;
}

    .agenda-slot-booked.pending {
        border-left-color: var(--warn);
        background: #FDF6EC;
        cursor: default;
    }

.agenda-slot-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
}

.agenda-slot-sub {
    font-size: 12px;
    color: var(--ink-soft);
    margin-top: 3px;
}

.mini-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
}

.tag-pending {
    background: #FBF0DF;
    color: var(--warn);
}

.tag-confirmed {
    background: #E9F1E8;
    color: var(--success);
}

.agenda-slot-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.mini-approve, .mini-reject {
    flex: 1;
    padding: 7px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    border: none;
}

.mini-approve {
    background: var(--success);
    color: #fff;
}

.mini-reject {
    background: transparent;
    color: var(--warn);
    border: 1px solid var(--warn);
}

/* ---------- İki Sütunlu Grid (Raporlar vs.) ---------- */
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ---------- Responsive Tablo (Kart Görünümü) ---------- */
@media (max-width: 700px) {
    .responsive-table thead {
        display: none;
    }

    .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td {
        display: block;
        width: 100%;
    }

        .responsive-table tr {
            background: var(--cream-card);
            border-radius: var(--radius-sm);
            margin-bottom: 10px;
            padding: 10px 14px;
            border: 1px solid var(--line);
        }

        .responsive-table td {
            padding: 6px 0 !important;
            text-align: left !important;
            border: none !important;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

            .responsive-table td::before {
                content: attr(data-label);
                font-weight: 700;
                font-size: 11px;
                color: var(--ink-soft);
                text-transform: uppercase;
                margin-right: 10px;
            }
}

/* ==========================================================
   MOBİL / RESPONSIVE DÜZELTMELERİ
   ========================================================== */

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1100;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--wine-900);
    border: none;
    color: var(--cream);
    font-size: 18px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 900;
}

@media (max-width: 900px) {
    .mobile-menu-btn {
        display: flex;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 260px;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

        .sidebar.open {
            transform: translateX(0);
        }

    .sidebar-backdrop.open {
        display: block;
    }

    .main {
        padding: 70px 16px 40px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

        .topbar h1 {
            font-size: 22px;
        }

    .topbar-date {
        align-self: flex-start;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

        .stat-card .value {
            font-size: 21px;
        }

    .panel-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .appt-row {
        grid-template-columns: 55px 1fr;
        row-gap: 6px;
        padding: 12px 16px;
    }

    .appt-customer, .status-pill {
        grid-column: 2;
    }

    .modal-box, .action-modal-box {
        width: 100%;
        max-width: 100%;
        max-height: 88vh;
        overflow-y: auto;
        border-radius: var(--radius) var(--radius) 0 0;
        margin: 0;
    }

    .modal-overlay {
        align-items: flex-end;
    }

    table td, table th {
        padding: 10px 12px !important;
    }

    #barcodeInput {
        font-size: 13px !important;
    }

    .two-col-grid {
        grid-template-columns: 1fr;
    }

    .agenda-layout {
        grid-template-columns: 1fr;
    }

    .agenda-row {
        grid-template-columns: 45px 1fr;
        padding: 10px 16px;
    }

    .fc .fc-toolbar {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .fc .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        gap: 6px;
    }

        .fc .fc-toolbar-chunk:first-child {
            order: 2;
        }

        .fc .fc-toolbar-chunk:nth-child(2) {
            order: 1;
        }

    .fc .fc-toolbar-title {
        font-size: 16px !important;
        text-align: center;
    }

    .fc .fc-button {
        padding: 7px 12px !important;
        font-size: 12.5px !important;
    }
}

@media (max-width: 480px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .brand-text {
        font-size: 16px;
    }
}
