/* ===== Ciro Panel - Core Design System ===== */

:root {
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --primary-light: rgba(99, 102, 241, 0.12);
    --secondary: #ec4899;
    --accent: #f59e0b;
    --bg: #09090b;
    --bg-card: rgba(18, 18, 23, 0.7);
    --bg-sidebar: #0e0e11;
    --text: #fafafa;
    --text-muted: #a1a1aa;
    --border: rgba(255, 255, 255, 0.08);
    --success: #10b981;
    --error: #ef4444;
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 24px;
    --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    --glass-border: rgba(255, 255, 255, 0.05);
    --transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Themes */
body.ciro-theme-light {
    --bg: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-sidebar: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: rgba(0, 0, 0, 0.08);
    --glass-border: rgba(0, 0, 0, 0.04);
    --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
}

body.ciro-theme-gold {
    --primary: #fbbf24;
    --primary-hover: #fcd34d;
    --bg-sidebar: #1a150a;
    --bg: #0c0a05;
}

body.ciro-theme-burgundy {
    --primary: #991b1b;
    --primary-hover: #ef4444;
    --bg-sidebar: #1a0a0a;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    background-image: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0px, transparent 50%), radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.03) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    user-select: none;
    /* Metin seçme engellendi */
}

input,
textarea,
[contenteditable] {
    user-select: text !important;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

h1,
h2,
h3,
h4,
h5 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

/* Layout */
#main-content {
    min-height: 100vh;
    transition: var(--transition);
    position: relative;
}

main {
    padding: 2.5rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Sidebar */
#sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    z-index: 50;
    padding: 1.5rem 0.75rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.5rem;
    margin-bottom: 2rem;
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
}

.sidebar-brand h1 {
    font-size: 1.15rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.sidebar-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    opacity: 0.8;
}

#sidebar nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
    scrollbar-width: none;
}

#sidebar nav::-webkit-scrollbar {
    display: none;
}

#sidebar nav a {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

#sidebar nav a:hover {
    background: var(--primary-light);
    color: var(--text);
    padding-left: 1.25rem;
}

#sidebar nav a.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 20px -6px rgba(99, 102, 241, 0.4);
}

.nav-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1.25rem 1rem 0.5rem;
    opacity: 0.6;
}

/* Sidebar User Section */
.sidebar-user-section {
    margin-top: auto;
    padding: 1.25rem 0.5rem 0.75rem;
    border-top: 1px solid var(--border);
}

.sidebar-user-profile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.sidebar-user-profile:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border);
}

.ciro-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.1rem;
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.ciro-logout-btn {
    color: var(--text-muted);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 10px;
}

.ciro-logout-btn:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

/* Mobile Nav Styles */
.ciro-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 45;
    transition: var(--transition);
}

.ciro-mobile-nav-btn {
    position: fixed;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 40;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ciro-btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition);
}

.ciro-btn-icon:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

/* Footer Toolbar */
.ciro-fixed-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--border);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.footer-left,
.footer-right,
.footer-center {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-credits {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.footer-credits span {
    opacity: 0.5;
    font-weight: 400;
    margin-right: 0.25rem;
}

.footer-credits:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .ciro-fixed-footer {
        padding: 0 0.75rem;
    }

    .footer-credits {
        font-size: 0.65rem;
        white-space: nowrap;
    }

    .footer-credits span {
        display: none;
        /* Hide "created by" on mobile if needed, or just make it tiny */
    }

    .footer-left,
    .footer-right,
    .footer-center {
        gap: 0.5rem;
    }
}

.footer-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

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

.footer-sep {
    width: 1px;
    height: 16px;
    background: var(--border);
    margin: 0 0.25rem;
}

/* Utilities */
.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.ciro-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.w-5 {
    width: 1.25rem;
}

.h-5 {
    height: 1.25rem;
}

.w-6 {
    width: 1.5rem;
}

.h-6 {
    height: 1.5rem;
}

.hidden {
    display: none !important;
}

.text-danger {
    color: var(--error);
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        transform: translateX(-100%);
        width: 260px;
    }

    #sidebar.open {
        transform: translateX(0);
        box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5);
    }

    #main-content {
        margin-left: 0 !important;
    }

    main {
        padding: 1.25rem;
        padding-bottom: 80px;
    }

    .md\:hidden {
        display: block !important;
    }
}

@media (min-width: 769px) {
    #main-content {
        margin-left: 280px;
    }

    .md\:hidden {
        display: none !important;
    }
}