:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #7dd3fc;
    --bg-color: #f0f9ff;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: rgba(148, 163, 184, 0.3);
    --success: #10b981;
    --danger: #ef4444;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
    color: var(--text-main);
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* Layout Wrapper */
.wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 2rem 0;
}

.sidebar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 2.5rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-links { 
    display: flex; 
    flex-direction: column; 
    gap: 0.5rem; 
}

.nav-item {
    font-weight: 600;
    color: var(--text-muted);
    padding: 1rem 2rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover { 
    color: var(--primary); 
    background: rgba(59, 130, 246, 0.1);
    border-left-color: var(--primary);
}

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

.main-content {
    flex: 1;
    overflow-y: auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
    flex-grow: 1;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-muted);
}
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-main);
    font-family: inherit;
    transition: all 0.3s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.form-control::file-selector-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    margin-right: 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    font-family: inherit;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
}
.btn-success {
    background: var(--success);
    color: white;
}
.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}
tr:hover td {
    background: rgba(59, 130, 246, 0.05);
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge.active { background: rgba(16, 185, 129, 0.2); color: var(--success); border: 1px solid var(--success); }
.badge.inactive { background: rgba(148, 163, 184, 0.2); color: var(--text-muted); border: 1px solid var(--text-muted); }

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}
.alert.info { background: rgba(99, 102, 241, 0.1); color: #818cf8; border: 1px solid #818cf8; }
.alert.success { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid var(--success); }
.alert.danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid var(--danger); }

/* Login Page Layout */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-card {
    width: 100%;
    max-width: 400px;
}
.login-card h2 {
    margin-bottom: 2rem;
    text-align: center;
    font-size: 2rem;
}

/* Titles */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
h1 { font-size: 2.2rem; font-weight: 800; }

.thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}
