/* ============================================
   GelirTakip - Admin Panel Stiller
   ============================================ */

/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Değişkenler */
:root {
    --sidebar-width: 260px;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-active: rgba(99, 102, 241, 0.15);
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #fff;
    --topbar-height: 60px;
    --topbar-bg: #ffffff;
    --body-bg: #f1f5f9;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #06b6d4;
    --info-light: #cffafe;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --transition: all 0.2s ease;
    --radius: 10px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.875rem;
    background-color: var(--body-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    z-index: 1040;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 8px;
}

.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-brand .brand-text {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sidebar-brand .brand-sub {
    color: var(--sidebar-text);
    font-size: 0.7rem;
    display: block;
    margin-top: -2px;
}

.sidebar-menu {
    list-style: none;
    padding: 0 12px;
}

.sidebar-menu .menu-header {
    color: var(--sidebar-text);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 12px 8px;
}

.sidebar-menu .menu-item {
    margin-bottom: 2px;
}

.sidebar-menu .menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--sidebar-text);
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.85rem;
    font-weight: 450;
}

.sidebar-menu .menu-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-menu .menu-link.active {
    background: var(--sidebar-active);
    color: var(--primary);
    font-weight: 500;
}

.sidebar-menu .menu-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    opacity: 0.85;
}

.sidebar-menu .menu-link.active i {
    opacity: 1;
}

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1030;
    transition: left 0.3s ease;
}

.topbar .page-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
}

.topbar .user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar .user-info {
    text-align: right;
}

.topbar .user-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
}

.topbar .user-role {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.topbar .user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}

.sidebar-toggle:hover {
    background: var(--body-bg);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 24px;
    min-height: calc(100vh - var(--topbar-height));
    transition: margin-left 0.3s ease;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    background: #fff;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
    font-weight: 600;
    font-size: 0.95rem;
}

.card-body {
    padding: 20px;
}

/* Stat Cards */
.stat-card {
    border: none;
    border-radius: var(--radius);
    padding: 20px 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.stat-card .stat-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    opacity: 0.2;
}

.stat-card .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
    margin-bottom: 4px;
}

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-sub {
    font-size: 0.72rem;
    opacity: 0.7;
    margin-top: 4px;
}

.stat-card.bg-gradient-primary { background: linear-gradient(135deg, #6366f1, #818cf8); }
.stat-card.bg-gradient-success { background: linear-gradient(135deg, #10b981, #34d399); }
.stat-card.bg-gradient-warning { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.stat-card.bg-gradient-danger { background: linear-gradient(135deg, #ef4444, #f87171); }
.stat-card.bg-gradient-info { background: linear-gradient(135deg, #06b6d4, #22d3ee); }
.stat-card.bg-gradient-secondary { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }

/* ============================================
   TABLES
   ============================================ */
.table {
    font-size: 0.835rem;
}

.table thead th {
    background: var(--body-bg);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    padding: 12px 16px;
    white-space: nowrap;
}

.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.03);
}

.table .actions {
    white-space: nowrap;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    font-size: 0.835rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.78rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* ============================================
   FORMS
   ============================================ */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-label {
    font-weight: 500;
    font-size: 0.835rem;
    margin-bottom: 6px;
    color: var(--text-dark);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    font-weight: 500;
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 6px;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    border: none;
    border-radius: var(--radius);
    padding: 14px 20px;
    font-size: 0.85rem;
}

.alert-success { background: var(--success-light); color: #065f46; }
.alert-danger { background: var(--danger-light); color: #991b1b; }
.alert-warning { background: var(--warning-light); color: #92400e; }
.alert-info { background: var(--info-light); color: #155e75; }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.login-card .brand {
    text-align: center;
    margin-bottom: 32px;
}

.login-card .brand .icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 12px;
}

.login-card .brand h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.login-card .brand p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.login-card .form-control {
    padding: 12px 16px;
    font-size: 0.9rem;
}

.login-card .btn-primary {
    padding: 12px;
    font-size: 0.95rem;
    width: 100%;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .topbar {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1035;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 16px;
    }

    .stat-card .stat-value {
        font-size: 1.3rem;
    }

    .card-body {
        padding: 16px;
    }

    .table-responsive {
        font-size: 0.8rem;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-muted) !important; }

.border-left-primary { border-left: 4px solid var(--primary) !important; }
.border-left-success { border-left: 4px solid var(--success) !important; }
.border-left-warning { border-left: 4px solid var(--warning) !important; }
.border-left-danger { border-left: 4px solid var(--danger) !important; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 12px;
}

/* Page header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

/* Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* FullCalendar override */
.fc .fc-toolbar-title {
    font-size: 1.1rem !important;
    font-weight: 600;
}

.fc .fc-button-primary {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

.fc .fc-button-primary:hover {
    background: var(--primary-hover) !important;
}

.fc .fc-daygrid-event {
    border-radius: 4px;
    font-size: 0.75rem;
}
