/* Professional Design V3 - "Clean Lab" Light Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette - Light Mode */
    --bg-950: #ffffff;
    /* Main Background - White */
    --bg-900: #f8fafc;
    /* Secondary Background - Slate 50 */
    --bg-800: #f1f5f9;
    /* Tertiary Background - Slate 100 */
    --bg-700: #e2e8f0;
    /* Divider/Border - Slate 200 */

    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.15);
    /* Subtle Indigo Shadow */

    --text-50: #0f172a;
    /* Headings - Slate 900 */
    --text-100: #1e293b;
    /* Subheadings - Slate 800 */
    --text-300: #475569;
    /* Body Text - Slate 600 */
    --text-400: #64748b;
    /* Muted Text - Slate 500 */

    --border-color: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    /* Subtle white border */

    --success: #10b981;
    --error: #ef4444;
}

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

body {
    background-color: var(--bg-900);
    /* Slightly off-white for depth */
    color: var(--text-300);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-50);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-500);
}

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

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

.w-full {
    width: 100%;
}

.h-screen {
    height: 100vh;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}

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

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

/* Cards (Clean White Style) */
.glass-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.glass-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-400);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--primary-600);
    color: white;
    box-shadow: 0 4px 6px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-500);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px var(--primary-glow);
}

.btn-secondary {
    background: white;
    color: var(--text-100);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: var(--bg-800);
    border-color: var(--text-300);
}

.btn-danger {
    background: #fee2e2;
    color: var(--error);
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background: #fecaca;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Inputs */
.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

label {
    display: block;
    color: var(--text-100);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-50);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 10;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    background: var(--bg-900);
}

.brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-600);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand span {
    color: var(--primary-600);
}

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-300);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--bg-800);
    color: var(--text-50);
}

.nav-link.active {
    background: #eef2ff;
    color: var(--primary-600);
    font-weight: 600;
}

/* Stats Logic */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.rate-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.rate-row:last-child {
    border-bottom: none;
}

.rate-row input {
    width: 100px;
    padding: 0.4rem;
    font-size: 0.9rem;
    text-align: right;
    background: var(--bg-800);
    border: 1px solid var(--border-color);
}

/* Login Page Specifics */
.login-split {
    display: flex;
    min-height: 100vh;
}

.login-left {
    flex: 1;
    background: var(--bg-800);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--primary-400);
    filter: blur(150px);
    opacity: 0.15;
    border-radius: 50%;
}

.login-right {
    width: 500px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border-left: 1px solid var(--border-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.badge {
    background: #eef2ff;
    color: var(--primary-600);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid #c7d2fe;
}

/* Responsiveness */
@media (max-width: 768px) {
    .login-left {
        display: none;
    }

    .login-right {
        width: 100%;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .dashboard-layout {
        flex-direction: column;
    }

    .hero-title {
        font-size: 2rem;
    }
}

/* Custom Dropdown - Premium Dark Theme */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-input-wrapper {
    position: relative;
    width: 100%;
}

.dropdown-input-wrapper input {
    width: 100%;
    padding-right: 2.5rem;
    /* Space for arrow */
    cursor: text;
}

.dropdown-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-400);
    pointer-events: none;
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.custom-dropdown.active .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 0.5rem;
    background: #1e1e1e;
    /* Dark background as requested */
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 100;
    display: none;
    max-height: 250px;
    overflow-y: auto;
    padding: 0.5rem;
    animation: fadeIn 0.2s ease-out;
}

.custom-dropdown.active .dropdown-options {
    display: block;
}

.dropdown-option {
    padding: 0.75rem 1rem;
    color: #e2e8f0;
    /* Light text for dark bg */
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.95rem;
    font-weight: 500;
}

.dropdown-option:hover {
    background: #333333;
    color: #ffffff;
}

.dropdown-option.selected {
    background: var(--primary-600);
    color: white;
}

/* Scrollbar for dropdown */
.dropdown-options::-webkit-scrollbar {
    width: 8px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: #1e1e1e;
    border-radius: 0 12px 12px 0;
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #555;
}