

:root {
    
    --bg-dark: #0f172a;
    
    --bg-darker: #020617;
    
    --surface-glass: rgba(30, 41, 59, 0.7);
    
    --surface-hover: rgba(51, 65, 85, 0.8);

    --border-color: rgba(148, 163, 184, 0.1);

    --primary-color: #6366f1;
    
    --primary-glow: rgba(99, 102, 241, 0.4);

    --text-main: #f8fafc;
    
    --text-muted: #94a3b8;
    

    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --nav-height: 70px;
    --sidebar-width: 260px;
}


body.light-mode {
    --bg-dark: #f1f5f9;
    
    --bg-darker: #ffffff;
    
    --surface-glass: rgba(255, 255, 255, 0.7);
    --surface-hover: rgba(241, 245, 249, 0.9);

    --border-color: rgba(148, 163, 184, 0.3);

    --text-main: #0f172a;
    
    --text-muted: #475569;
    

    
    --primary-glow: rgba(99, 102, 241, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-darker);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}


body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;

    
    background:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.08), transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.08), transparent 40%);
}


body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-image:
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
    pointer-events: none;
}





.layout-public,
.layout-admin {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


.layout-public .main-content {
    margin-top: var(--nav-height);
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 2rem;
}

.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(15, 23, 42, 0.85);
    
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
}

.brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

.top-nav-links {
    display: flex;
    gap: 0.5rem;
}

.top-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.top-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.top-nav-link.active {
    color: #818cf8;
    
    background: rgba(99, 102, 241, 0.1);
}


.layout-admin .main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    width: auto;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--surface-glass);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
    gap: 0.5rem;
    z-index: 1000;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-link.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}





.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    gap: 8px;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}


.card {
    background: rgba(15, 23, 42, 0.95);
    
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    
}

.card h1,
.card h2,
.card h3 {
    margin-bottom: 0.5rem;
}


label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}


table {
    width: 100%;
    border-collapse: collapse;
}

th {
    color: var(--text-muted);
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}


.dashboard-header {
    margin-bottom: 2rem;
}

#nprogress .bar {
    background: var(--primary-color) !important;
    height: 3px !important;
}


@media (max-width: 768px) {
    .top-navbar {
        padding: 0 1rem;
        height: auto;
        flex-wrap: wrap;
    }

    .top-nav-links {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .top-nav-link span {
        display: none;
    }

    .layout-admin .main-content {
        margin-left: 0;
        margin-top: 60px;
        
    }

    .sidebar {
        display: none;
        
    }

    
    .layout-admin {
        flex-direction: column;
    }

    .layout-admin .sidebar {
        display: flex;
        position: relative;
        width: 100%;
        height: auto;
        flex-direction: row;
        overflow-x: auto;
    }

    

}




.file-upload-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.file-upload-input {
    display: none !important;
    
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.file-upload-label:hover,
.file-upload-label.drag-over {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.file-upload-label i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    transition: color 0.3s;
}

.file-upload-label:hover i {
    color: var(--primary-color);
}

.file-name-display {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--success);
    text-align: center;
    min-height: 1.2em;
    font-weight: 500;
}


.upload-preview-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
    object-fit: cover;
}


.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}