/* ==========================================================================
   Creart Cloud - Premium Admin Panel CSS (Responsive & Modern)
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    transition: background 0.4s ease, color 0.4s ease;
}

/* ==========================================================================
   Tema Değişkenleri (Light / Dark)
   ========================================================================== */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.25);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #334155;
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --text-tertiary: #94a3b8;
        --border: #334155;
        --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
        --shadow-md: 0 4px 20px rgba(0,0,0,0.6);
        --shadow-lg: 0 10px 40px rgba(0,0,0,0.7);
        --glass-bg: rgba(30, 41, 59, 0.70);
        --glass-border: rgba(255, 255, 255, 0.10);
    }
}

/* ==========================================================================
   Genel Tipografi
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
h3 { font-size: clamp(1.5rem, 4vw, 2rem); }

p, li, td, th {
    color: var(--text-secondary);
}

/* ==========================================================================
   Sidebar (Mobil + Desktop)
   ========================================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    z-index: 1000;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.logo-icon {
    font-size: 2.2rem;
    vertical-align: middle;
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 700;
    margin-left: 0.6rem;
}

.sidebar-nav {
    padding: 1.5rem 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    border-radius: 0.75rem;
    margin: 0.25rem 0;
    transition: all 0.25s ease;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255,255,255,0.18);
    transform: translateX(8px);
}

.nav-item i {
    width: 24px;
    text-align: center;
    margin-right: 1rem;
    font-size: 1.2rem;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.15);
    margin: 1.5rem 1rem;
}

.logout {
    color: #f87171 !important;
}

/* Mobil sidebar */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
}

/* ==========================================================================
   Ana İçerik
   ========================================================================== */
main.main-content {
    margin-left: 260px;
    padding: 2rem 1.5rem;
    transition: margin-left 0.35s;
    min-height: 100vh;
}

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

.page-header {
    margin-bottom: 2.5rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-tertiary);
    font-size: 1.1rem;
}

/* ==========================================================================
   Card & Glassmorphism
   ========================================================================== */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-header {
    background: rgba(255,255,255,0.08);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.25rem;
}

/* ==========================================================================
   Button
   ========================================================================== */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.25s ease;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */
.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(255,255,255,0.4);
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.15);
    outline: none;
}

/* ==========================================================================
   Table
   ========================================================================== */
.table-responsive {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.table {
    margin-bottom: 0;
}

.table th {
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Alert
   ========================================================================== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger  { background: #fee2e2; color: #991b1b; }

/* ==========================================================================
   Hamburger Menü (Mobil)
   ========================================================================== */
.hamburger {
    position: fixed;
    top: 1.2rem;
    left: 1.2rem;
    z-index: 1100;
    background: var(--primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* ==========================================================================
   Responsive İnce Ayar
   ========================================================================== */
@media (max-width: 576px) {
    .main-content { padding: 1.5rem 1rem; }
    h1 { font-size: 2rem; }
}