@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --bg-main: #090d16;
    --bg-surface: #111827;
    --bg-card: #182234;
    --bg-card-hover: #1f2d45;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-gold: rgba(245, 158, 11, 0.35);
    
    --gold-300: #fcd34d;
    --gold-400: #fbbf24;
    --gold-500: #f59e0b;
    --gold-600: #d97706;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --font-heading: 'Outfit', -apple-system, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

/* Glassmorphism Cards */
.card-luxury {
    background: linear-gradient(145deg, rgba(24, 34, 52, 0.85) 0%, rgba(17, 24, 39, 0.95) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-luxury:hover {
    border-color: rgba(245, 158, 11, 0.3);
}

.card-luxury-gold {
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 60%),
                linear-gradient(145deg, rgba(24, 34, 52, 0.9) 0%, rgba(17, 24, 39, 0.95) 100%);
    border: 1px solid var(--border-gold);
}

/* Stat Cards */
.stat-box {
    padding: 1.5rem;
    border-radius: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-500), #ef4444);
    opacity: 0.8;
}

.stat-box.stat-gold::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-box.stat-blue::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stat-box.stat-emerald::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-box.stat-purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

/* Buttons */
.btn-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #0b0f19;
    font-weight: 700;
    border: none;
    padding: 0.65rem 1.4rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
    transition: all 0.2s ease;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-gold-outline {
    background: transparent;
    color: var(--gold-400);
    border: 1px solid var(--border-gold);
    font-weight: 600;
    border-radius: 10px;
    padding: 0.6rem 1.2rem;
    transition: all 0.2s ease;
}

.btn-gold-outline:hover {
    background: rgba(245, 158, 11, 0.15);
    color: #fff;
    border-color: var(--gold-400);
}

/* Luxury Navbar */
.navbar-luxury {
    background: rgba(11, 15, 25, 0.9) !important;
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(15px);
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 0.9rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--gold-400) !important;
    background: rgba(245, 158, 11, 0.08);
}

/* Status Badges */
.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-extra {
    display: inline-flex;
    align-items: center;
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.45) !important;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Bootstrap Opacity Helpers Fallback */
.bg-opacity-10 { --bs-bg-opacity: 0.10 !important; }
.bg-opacity-15 { --bs-bg-opacity: 0.15 !important; }
.bg-opacity-20 { --bs-bg-opacity: 0.20 !important; }
.bg-opacity-25 { --bs-bg-opacity: 0.25 !important; }

/* ========================================================
   YÜKSEK KONTRASTLI ROZET & ETİKET DÜZELTMELERİ
   Hiçbir zaman aynı renk üstüne aynı renk yazı binmesin (yeşil üstüne yeşil vb.)
   ======================================================== */

/* 1. YEŞİL ROZETLER (SUCCESS) */
.badge.bg-success.text-success,
.badge.bg-success.bg-opacity-10,
.badge.bg-success.bg-opacity-15,
.badge.bg-success.bg-opacity-20,
.badge.bg-success.bg-opacity-25,
.badge.bg-success-subtle,
span.bg-success.text-success {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.45) !important;
    font-weight: 600 !important;
}

.badge.bg-success:not(.text-success):not(.bg-opacity-10):not(.bg-opacity-15):not(.bg-opacity-20):not(.bg-opacity-25) {
    background-color: #059669 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* 2. SARI / ALTIN ROZETLER (WARNING) */
.badge.bg-warning.text-dark {
    background-color: #f59e0b !important;
    color: #000000 !important;
    font-weight: 700 !important;
}

.badge.bg-warning:not(.text-dark) {
    color: #000000 !important;
    font-weight: 700 !important;
}

.badge.bg-warning.text-warning,
.badge.bg-warning.bg-opacity-15,
.badge.bg-warning.bg-opacity-10,
.badge.bg-warning.bg-opacity-20,
.badge.bg-warning.bg-opacity-25 {
    background: rgba(245, 158, 11, 0.18) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.45) !important;
    font-weight: 600 !important;
}

/* 3. KIRMIZI ROZETLER (DANGER) */
.badge.bg-danger.text-danger,
.badge.bg-danger.bg-opacity-10,
.badge.bg-danger.bg-opacity-15,
.badge.bg-danger.bg-opacity-20,
.badge.bg-danger.bg-opacity-25 {
    background: rgba(239, 68, 68, 0.18) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.45) !important;
    font-weight: 600 !important;
}

/* 4. MAVİ ROZETLER (INFO) */
.badge.bg-info.text-info,
.badge.bg-info.bg-opacity-10,
.badge.bg-info.bg-opacity-15,
.badge.bg-info.bg-opacity-20,
.badge.bg-info.bg-opacity-25 {
    background: rgba(14, 165, 233, 0.18) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(14, 165, 233, 0.45) !important;
    font-weight: 600 !important;
}

/* Tables */
.table-luxury {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
    border-color: var(--border-subtle);
}

.table-luxury th {
    background: rgba(24, 34, 52, 0.6);
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.table-luxury td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-subtle);
}

.table-luxury tbody tr:hover {
    background: rgba(245, 158, 11, 0.04);
}

/* Form Controls */
.form-control, .form-select {
    background-color: #0d131f !important;
    border: 1px solid var(--border-subtle) !important;
    color: #f8fafc !important;
    border-radius: 10px;
    padding: 0.7rem 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--gold-500) !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2) !important;
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Simulated WhatsApp Phone Frame */
.phone-mockup {
    width: 100%;
    max-width: 380px;
    background: #0f1624;
    border-radius: 36px;
    padding: 14px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
    margin: 0 auto;
}

.phone-screen {
    background: #0b141a;
    border-radius: 26px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 580px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.phone-header {
    background: #1f2c34;
    color: #e9edef;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.phone-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 16px 16px;
}

.phone-footer {
    background: #1f2c34;
    padding: 8px 10px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-bubble {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
    position: relative;
}

.chat-bubble.bot {
    background: #202c33;
    color: #e9edef;
    align-self: flex-start;
    border-top-left-radius: 2px;
}

.chat-bubble.user {
    background: #005c4b;
    color: #e9edef;
    align-self: flex-end;
    border-top-right-radius: 2px;
}

.chat-bubble .time {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    text-align: right;
}

/* Impersonation Banner */
.impersonation-bar {
    background: linear-gradient(90deg, #d97706, #b45309);
    color: #fff;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
}

/* Slot Badges */
.slot-badge {
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.slot-badge:hover {
    border-color: var(--gold-400);
    background: rgba(245, 158, 11, 0.1);
    transform: translateY(-2px);
}

.slot-badge.selected {
    border-color: var(--gold-500);
    background: var(--gold-500);
    color: #000;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* ==========================================================================
   MODERN SAAS LUXURY SIDEBAR & APP WRAPPER
   ========================================================================== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #0d131f 0%, #070a12 100%);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-sidebar .sidebar-brand {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.app-sidebar .sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 0.75rem;
    list-style: none;
    margin: 0;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

.app-sidebar,
.sidebar-nav,
.app-sidebar * {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

.app-sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar,
.app-sidebar *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.app-sidebar::-webkit-scrollbar-button,
.sidebar-nav::-webkit-scrollbar-button,
.app-sidebar *::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.sidebar-nav .nav-section-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
    padding: 0.75rem 0.75rem 0.25rem 0.75rem;
}

.sidebar-nav .nav-item {
    margin-bottom: 3px;
}

.sidebar-nav .sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.62rem 0.85rem;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-nav .sidebar-link i {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.sidebar-nav .sidebar-link:hover {
    color: #fff;
    background: rgba(245, 158, 11, 0.08);
}

.sidebar-nav .sidebar-link:hover i {
    color: var(--gold-400);
}

.sidebar-nav .sidebar-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-left: 3px solid var(--gold-500);
    font-weight: 600;
}

.sidebar-nav .sidebar-link.active i {
    color: var(--gold-400);
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.2);
}

.app-main {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-main);
    transition: margin-left 0.3s ease;
}

.app-topbar {
    height: 70px;
    background: rgba(13, 19, 31, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.app-content {
    flex: 1;
    padding: 1.75rem 2rem 3rem 2rem;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1035;
}

/* ========================================================
   GELİŞMİŞ MOBİL VE TABLET DUYARLILIK (RESPONSIVE STYLES)
   ======================================================== */
@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    .app-sidebar.show {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0,0,0,0.9);
    }
    .app-sidebar.show ~ .sidebar-backdrop {
        display: block;
    }
    .app-main {
        margin-left: 0;
    }
    .app-content {
        padding: 1rem 0.75rem 2.5rem 0.75rem;
    }
    .app-topbar {
        height: 62px;
        padding: 0 1rem;
    }
}

@media (max-width: 767.98px) {
    /* Başlıklar ve font boyutları */
    h2, .h2 {
        font-size: 1.35rem !important;
    }
    h3, .h3 {
        font-size: 1.2rem !important;
    }
    h5, .h5 {
        font-size: 1.05rem !important;
    }
    .app-topbar .btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
    }

    /* Mobil İstatistik Kutuları */
    .stat-box {
        padding: 0.9rem 0.75rem !important;
        border-radius: 14px !important;
    }
    .stat-box .display-6 {
        font-size: 1.5rem !important;
        letter-spacing: -0.5px;
    }
    .stat-box .text-uppercase {
        font-size: 0.65rem !important;
    }
    .stat-box .text-muted.small, .stat-box .small {
        font-size: 0.7rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Mobil Kartlar */
    .card-luxury {
        border-radius: 14px !important;
    }
    .card-luxury .card-header {
        padding: 0.85rem 1rem !important;
    }

    /* Buton grupları ve filtre sekmeleri */
    .btn-group.flex-wrap {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    .btn-group.flex-wrap > .btn {
        border-radius: 8px !important;
        flex: 1 1 auto;
        text-align: center;
        padding: 0.4rem 0.65rem;
        font-size: 0.78rem;
    }

    /* Mobil Randevu Kartı (App Stili) */
    .mobile-appointment-card {
        background: rgba(18, 24, 38, 0.75);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 14px;
        padding: 1rem;
        margin-bottom: 0.85rem;
        transition: transform 0.15s ease, border-color 0.15s ease;
        position: relative;
    }
    .mobile-appointment-card:active {
        transform: scale(0.99);
    }
    .mobile-appointment-card.border-pending {
        border-left: 4px solid var(--gold-500) !important;
    }
    .mobile-appointment-card.border-confirmed {
        border-left: 4px solid #10b981 !important;
    }
    .mobile-appointment-card.border-completed {
        border-left: 4px solid #3b82f6 !important;
    }
    .mobile-appointment-card.border-cancelled {
        border-left: 4px solid #ef4444 !important;
    }
}

@media (max-width: 575.98px) {
    .app-content {
        padding: 0.75rem 0.5rem 2rem 0.5rem;
    }
    .stat-box {
        padding: 0.75rem 0.6rem !important;
    }
    .stat-box .display-6 {
        font-size: 1.3rem !important;
    }
    body, html {
        overflow-x: hidden !important;
    }
    .app-main {
        max-width: 100vw;
        overflow-x: hidden;
    }
    .card-luxury {
        max-width: 100%;
        overflow-wrap: break-word;
    }
}

/* ========================================================
   CUSTOM GOLD SELECT DROPDOWN & RANGE SLIDER
   ======================================================== */
.custom-gold-select {
    background-color: #05070c !important;
    color: #f8fafc !important;
    border: 1px solid rgba(245, 158, 11, 0.45) !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
    padding: 0.85rem 1.1rem !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45) !important;
    cursor: pointer;
    transition: all 0.25s ease;
}
.custom-gold-select:focus {
    border-color: #f59e0b !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.35) !important;
    outline: none !important;
}
.custom-gold-select option {
    background-color: #0c1018;
    color: #ffffff;
    padding: 10px;
}
.custom-gold-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    outline: none;
    border: 1px solid rgba(245, 158, 11, 0.25);
    margin: 10px 0;
}
.custom-gold-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 60%, #d97706 100%);
    cursor: pointer;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.7);
    border: 2px solid #ffffff;
    transition: transform 0.15s ease;
}
.custom-gold-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}
.custom-gold-slider::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 60%, #d97706 100%);
    cursor: pointer;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.7);
    border: 2px solid #ffffff;
}
