/* =============================================
   PROPERTY TURKEY ISTANBUL - Luxury Real Estate Theme
   Gold × Dark — Premium Gayrimenkul Yönetim Paneli
   ============================================= */

:root {
    /* Brand Colors — Luxury Gold */
    --bg-primary: #0c0e14;
    --bg-secondary: #151821;
    --bg-gradient: radial-gradient(ellipse at top right, #1e1b14, #0c0e14);

    /* Gold Brand */
    --brand-primary: #D4AF37;
    --brand-secondary: #B8962E;
    --brand-glow: rgba(212, 175, 55, 0.35);

    /* Glassmorphism */
    --glass-bg: rgba(21, 24, 33, 0.85);
    --glass-border: rgba(212, 175, 55, 0.10);

    /* Legacy mappings */
    --cyan-neon: var(--brand-primary);
    --electric-blue: var(--brand-secondary);
    --bright-cyan: #e6c84d;
    --border-glow: var(--brand-glow);

    /* Lead Status Colors */
    --lead-sicak: #EF4444;
    --lead-ilik: #FBBF24;
    --lead-soguk: #3B82F6;

    /* Sidebar */
    --sidebar-width: 260px;
}

/* ============================
   SIDEBAR — Logo & Navigation
   ============================ */

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid rgba(212, 175, 55, 0.08);
    padding: 0;
}

.sidebar-header {
    padding: 2rem 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.08);
    margin-bottom: 0.5rem;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo img {
    height: 52px;
    width: auto;
    filter: brightness(1.15) drop-shadow(0 2px 12px rgba(212, 175, 55, 0.25));
    transition: transform 0.3s ease;
}

.sidebar-logo img:hover {
    transform: scale(1.05);
}

.sidebar-brand {
    display: none;
    /* Logo text hidden — logo is self-explanatory */
}

.sidebar-nav {
    padding: 0.5rem 0.75rem;
}

.nav-item {
    padding: 0.75rem 1rem;
    margin-bottom: 0.15rem;
    border-radius: 0.625rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #8b92a5;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.06);
}

.nav-item.active {
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.10);
    border-left: 3px solid #D4AF37;
    font-weight: 600;
}

.sidebar-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid rgba(212, 175, 55, 0.08);
}

/* ============================
   MAIN CONTENT — Layout
   ============================ */

.main-content {
    margin-left: var(--sidebar-width);
    padding: 0;
    min-height: 100vh;
}

/* ============================
   TOPBAR — Clean Header
   ============================ */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2.5rem;
    background: rgba(12, 14, 20, 0.65);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.06);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-toggle {
    display: none;
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: rgba(212, 175, 55, 0.08);
        border: 1px solid rgba(212, 175, 55, 0.15);
        color: #D4AF37;
        cursor: pointer;
    }
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.01em;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-refresh {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.15);
    color: #D4AF37;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-refresh:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.35);
    transform: rotate(45deg);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.15);
}

.btn-refresh i {
    width: 18px;
    height: 18px;
}

/* ============================
   CONTENT AREA — Breathing Room
   ============================ */

.content-area {
    padding: 2rem 2.5rem 3rem;
    max-width: 1400px;
}

/* ============================
   STAT CARDS — Dashboard
   ============================ */

.stats-grid {
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem 1.75rem;
    border-radius: 1rem;
    background: rgba(21, 24, 33, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.08);
}

.stat-card:hover {
    border-color: rgba(212, 175, 55, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.stat-card::before {
    background: #D4AF37;
}

.stat-icon {
    background: rgba(212, 175, 55, 0.10);
    color: #D4AF37;
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.stat-icon i {
    width: 22px;
    height: 22px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Lead-specific stat cards */
.stat-sicak .stat-icon {
    background: rgba(239, 68, 68, 0.10);
    color: #EF4444;
}

.stat-ilik .stat-icon {
    background: rgba(251, 191, 36, 0.10);
    color: #FBBF24;
}

.stat-soguk .stat-icon {
    background: rgba(59, 130, 246, 0.10);
    color: #3B82F6;
}

/* Clickable stat cards */
.stat-card.clickable {
    cursor: pointer;
}

.stat-card.clickable:hover {
    border-color: rgba(212, 175, 55, 0.30);
}

/* ============================
   GLASS CARDS — Panels
   ============================ */

.glass-card {
    background: rgba(21, 24, 33, 0.88);
    border: 1px solid rgba(212, 175, 55, 0.08);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.glass-card:hover {
    border-color: rgba(212, 175, 55, 0.15);
}

/* ============================
   GRID LAYOUTS — Spacing
   ============================ */

.grid-2 {
    gap: 1.25rem;
}

.section-header {
    margin-bottom: 1.25rem;
}

/* ============================
   BUTTONS
   ============================ */

.btn-primary {
    background: linear-gradient(135deg, #D4AF37, #B8962E);
    color: #000;
    font-weight: 600;
}

.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.35);
    transform: translateY(-1px);
}

.btn-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.btn-warning {
    background: rgba(251, 191, 36, 0.15);
    color: #FBBF24;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ============================
   TABLE
   ============================ */

th {
    color: #D4AF37;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    padding: 1rem;
    background: rgba(212, 175, 55, 0.04);
}

td {
    padding: 0.875rem 1rem;
    font-size: 0.85rem;
}

tr:hover td {
    background: rgba(212, 175, 55, 0.03);
}

/* ============================
   BADGES
   ============================ */

.badge-sicak {
    background: rgba(239, 68, 68, 0.12);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-ilik {
    background: rgba(251, 191, 36, 0.12);
    color: #FBBF24;
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.badge-soguk {
    background: rgba(59, 130, 246, 0.12);
    color: #3B82F6;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge-yeni {
    background: rgba(168, 85, 247, 0.12);
    color: #A855F7;
    border: 1px solid rgba(168, 85, 247, 0.25);
}

.badge-beklemede {
    background: rgba(251, 191, 36, 0.12);
    color: #FBBF24;
}

.badge-onaylandi,
.badge-tamamlandi {
    background: rgba(16, 185, 129, 0.12);
    color: #10B981;
}

.badge-iptal {
    background: rgba(239, 68, 68, 0.12);
    color: #EF4444;
}

.badge-aktif {
    background: rgba(212, 175, 55, 0.12);
    color: #D4AF37;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.badge-pasif {
    background: rgba(107, 114, 128, 0.12);
    color: #6B7280;
}

/* ============================
   FORM INPUTS
   ============================ */

input:focus,
select:focus,
textarea:focus {
    border-color: #D4AF37;
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.12);
}

/* ============================
   CAMPAIGN CARDS
   ============================ */

.campaign-card {
    transition: all 0.3s ease;
}

.campaign-card:hover {
    border-color: rgba(212, 175, 55, 0.25);
    transform: translateY(-2px);
}

.campaign-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.campaign-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.campaign-project,
.campaign-location,
.campaign-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.campaign-project i,
.campaign-location i,
.campaign-price i {
    width: 14px;
    height: 14px;
    color: #D4AF37;
}

.campaign-desc {
    color: #6B7280;
    font-size: 0.85rem;
    margin: 0.5rem 0;
    line-height: 1.4;
}

.campaign-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    color: #6B7280;
}

/* ============================
   CARDS GRID
   ============================ */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

/* ============================
   LEAD DETAIL MODAL
   ============================ */

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.detail-grid .full-width {
    grid-column: 1 / -1;
}

.detail-label {
    display: block;
    font-size: 0.7rem;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
}

.detail-value {
    display: block;
    font-size: 0.95rem;
    color: #e2e8f0;
}

/* ============================
   AI METRICS
   ============================ */

.ai-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ai-metric {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: rgba(255, 255, 255, 0.025);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-metric-label {
    color: #6B7280;
    font-size: 0.8rem;
}

.ai-metric-value {
    color: #e2e8f0;
    font-weight: 600;
}

.ai-recommendation {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 10px;
    color: #e6c84d;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ============================
   AVATAR
   ============================ */

.avatar-md {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(212, 175, 55, 0.04));
    border: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #D4AF37;
    flex-shrink: 0;
}

/* ============================
   SCROLLBAR
   ============================ */

::-webkit-scrollbar-thumb:hover {
    background: #D4AF37;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

/* ============================
   LOGIN
   ============================ */

.login-card h1 {
    background: linear-gradient(135deg, #D4AF37, #e6c84d, #D4AF37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(212, 175, 55, 0.04));
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* ============================
   LINKS
   ============================ */

a {
    color: #D4AF37;
}

a:hover {
    color: #e6c84d;
}

/* ============================
   FILTER GROUP — Gold accents
   ============================ */

.filter-group {
    border-color: rgba(212, 175, 55, 0.1);
}

.filter-group i {
    color: #D4AF37;
}

/* ============================
   LIST ITEMS — Consistent border
   ============================ */

.list-item {
    border-color: rgba(212, 175, 55, 0.06);
    padding: 0.875rem 0;
}

/* ============================
   RESPONSIVE
   ============================ */

@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
    }

    .topbar {
        padding: 1rem 1.25rem;
    }

    .content-area {
        padding: 1.25rem;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .ai-metrics {
        flex-direction: column;
    }

    .sidebar {
        width: 260px;
    }
}