@import url('https://fonts.googleapis.com/css2?family=Sriracha&display=swap');

:root {
    /* Premium Color Palette (Dark Mode Base) */
    --bg-main: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.7);
    --accent-primary: #3b82f6;
    /* Premium Blue */
    --accent-glow: rgba(59, 130, 246, 0.5);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --success: #10b981;
    --danger: #ef4444;

    /* Typography */
    --font-main: 'Prompt', 'Inter', system-ui, -apple-system, sans-serif;

    /* Spacing & Radius */
    --radius-lg: 16px;
    --radius-md: 8px;
    --shadow-main: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 20px var(--accent-glow);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-main);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Sidebar Layout */
body {
    overflow-x: hidden;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
    top: 0;
    left: 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
}

.sidebar-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar .logo {
    font-family: 'Sriracha', cursive;
    font-size: 1.8rem;
    display: block;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(96, 165, 250, 0.3);
    line-height: 1.4;
}

/* Sidebar Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    width: 100%;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transform: translateX(5px);
}

.sidebar-nav a.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), transparent);
    color: var(--accent-primary);
    border-left: 3px solid var(--accent-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    width: calc(100% - 260px);
}

/* User Profile in Sidebar */
.user-profile-sidebar {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.btn-logout-sidebar {
    width: 100%;
    justify-content: center;
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid var(--danger) !important;
    color: var(--danger) !important;
}

.btn-logout-sidebar:hover {
    background: var(--danger) !important;
    color: white !important;
}

/* Hide Old Header */
.header {
    display: none;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    border-color: var(--accent-primary);
}

/* User Menu (Logout + Name) */
.user-menu {
    position: relative;
    margin-left: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-left: 1.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-logout {
    color: white;
    background: var(--danger);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.25);
    order: 2;
    /* Button last */
}

.btn-logout:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(239, 68, 68, 0.35);
}

.btn-logout:active {
    transform: translateY(0);
}

.user-name {
    position: static;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    opacity: 0.9;
    order: 1;
    /* Name first */
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* 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 {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Utilities */
.text-center {
    text-align: center;
}

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

.flex {
    display: flex;
    gap: 1rem;
}

.grid-cols-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.grid-cols-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Dashboard Specific */
.stat-card {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin: 1rem 0;
}