:root {
    /* Brand Colors */
    --primary-color: #4f46e5; /* Indigo 600 */
    --primary-hover: #4338ca; /* Indigo 700 */
    --secondary-color: #64748b; /* Slate 500 */
    --success-color: #10b981; /* Emerald 500 */
    --warning-color: #f59e0b; /* Amber 500 */
    --danger-color: #ef4444; /* Red 500 */
    --info-color: #3b82f6; /* Blue 500 */
    --light-color: #f8fafc; /* Slate 50 */
    --dark-color: #1e293b; /* Slate 800 */

    /* Backgrounds */
    --bg-body: #f1f5f9; /* Slate 100 */
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-body);
    color: var(--dark-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--dark-color);
    letter-spacing: -0.025em;
}

a {
    text-decoration: none;
    transition: var(--transition-fast);
}

/* --- Components --- */

/* Cards */
.card {
    background-color: var(--bg-card);
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition-fast);
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.btn-lg {
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-lg);
}

/* Forms */
.form-control, .form-select {
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: var(--transition-fast);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-group-text {
    border-radius: var(--radius-md);
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
    border-radius: var(--radius-sm);
    letter-spacing: 0.025em;
}

/* Tables */
.table thead th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* --- Layout Specifics --- */

/* Navbar (Public) */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.025em;
}

.nav-link {
    font-weight: 500;
    color: #475569 !important;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    color: white;
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero-img {
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.2));
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Features */
.feature-card {
    padding: 2rem;
    height: 100%;
    border-radius: var(--radius-xl);
    background: white;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    color: var(--primary-color);
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.auth-card {
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    background: white;
    overflow: hidden;
}

/* Dashboard Sidebar */
.sidebar {
    background: white;
    border-right: 1px solid #e2e8f0;
}

.sidebar .nav-link {
    padding: 0.8rem 1.5rem;
    color: #64748b !important;
    border-left: 3px solid transparent;
    transition: var(--transition-fast);
}

.sidebar .nav-link:hover {
    color: var(--primary-color) !important;
    background-color: #f8fafc;
}

.sidebar .nav-link.active {
    color: var(--primary-color) !important;
    background-color: #f0fdf4; /* Light Emerald tint or just light primary */
    background-color: rgba(79, 70, 229, 0.05);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.sidebar .nav-link i {
    width: 24px;
    margin-right: 10px;
    text-align: center;
    transition: var(--transition-fast);
}

.sidebar .nav-link:hover i, .sidebar .nav-link.active i {
    transform: scale(1.1);
}

/* Dashboard Cards */
.stat-card {
    transition: var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Footer */
.footer {
    background-color: #1e293b;
    color: #cbd5e1;
    padding-top: 4rem;
    padding-bottom: 2rem;
}

.footer h5 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer a {
    color: #cbd5e1;
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}

/* Tab Styles */
.nav-tabs {
    border-bottom: 2px solid #e2e8f0;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: #64748b !important;
    padding: 1rem 1.5rem;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: var(--primary-color) !important;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color) !important;
    border-bottom-color: var(--primary-color);
    background: transparent;
    font-weight: 600;
}
