:root {
    /* Base Variables (Dark by Default) */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --input-bg: rgba(15, 23, 42, 0.5);
    --font-sans: 'Outfit', sans-serif;
    
    --grad-1: hsla(253,16%,7%,1);
    --grad-2: hsla(225,39%,30%,1);
    --grad-3: hsla(339,49%,30%,1);

    --logo-grad: var(--primary);
    --toggle-bg: #6366f1;
    --toggle-text: #ffffff;
}

/* Light Theme Variables */
html[data-theme='light'] {
    --bg-dark: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-main: #0f172a;
    --text-muted: #475569;
    --border: #e2e8f0;
    --glass-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --input-bg: #f1f5f9;
    
    --grad-1: #f8fafc;
    --grad-2: #f1f5f9;
    --grad-3: #e2e8f0;

    --logo-grad: var(--primary);
    --toggle-bg: #1e293b;
    --toggle-text: #ffffff;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, var(--grad-1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, var(--grad-2) 0, transparent 50%), 
        radial-gradient(at 100% 0%, var(--grad-3) 0, transparent 50%);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* SLEEK THEME TOGGLE */
.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--glass-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:hover {
    transform: rotate(15deg) scale(1.1);
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.theme-toggle:active {
    transform: scale(0.95) translateY(-1px);
}

.brand-logo {
    color: var(--primary);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 2rem;
    display: inline-block;
    transition: all 0.3s ease;
}

html[data-theme='light'] .brand-logo {
    color: var(--primary);
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
}

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

/* Auth Pages */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90vh;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 3rem;
}

.auth-card h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    text-align: center;
    background: var(--logo-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-card p {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2.5rem;
    font-weight: 500;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-field {
    width: 100%;
    padding: 0.85rem 1.1rem;
    background: var(--input-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-dark);
}

.btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.sidebar h2 {
    background: var(--logo-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.filters-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding: 2rem;
}

.table-container {
    overflow-x: auto;
    border-radius: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    font-weight: 700;
}

td {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 3rem;
}

.page-btn {
    padding: 0.6rem 1.2rem;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
}

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

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

@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
    .theme-toggle { padding: 0.6rem 1rem; font-size: 0.8rem; top: 1rem; right: 1rem; }
}

.tag {
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.tag-it { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.tag-non-it { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

html[data-theme='light'] .tag-it { background: #dbeafe; color: #1e40af; }
html[data-theme='light'] .tag-non-it { background: #f3e8ff; color: #6b21a8; }
