/* ===================================
   REVER - Global Design System
   Mobile-First Approach
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --color-primary: hsl(260, 70%, 60%);
    --color-primary-dark: hsl(260, 70%, 50%);
    --color-primary-light: hsl(260, 70%, 75%);
    --color-secondary: hsl(200, 90%, 55%);
    --color-accent: hsl(320, 85%, 60%);

    --color-bg: #f3f4f6;
    --color-surface: #ffffff;
    --color-text: #1f2937;
    --color-text-muted: #6b7280;
    --color-border: #e5e7eb;

    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;

    --color-sidebar: #1f2937;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

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

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    margin-top: 0;
    color: var(--color-text);
}

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

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

/* Layout Utilities */
.container {
    width: 100%;
    padding-right: var(--space-md);
    padding-left: var(--space-md);
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    line-height: 1.25rem;
    gap: 0.5rem;
}

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

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

.btn-danger {
    background-color: var(--color-danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-secondary {
    background-color: white;
    border-color: var(--color-border);
    color: var(--color-text);
}

.btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Forms - Minimalist & Sophisticated */
.form-group {
    margin-bottom: 1.5rem;
    /* Increased spacing for airiness */
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 0.01em;
    transition: color 0.2s;
}

.form-input,
.form-select,
.form-textarea {
    display: block;
    width: 100%;
    padding: 0.875rem 1rem;
    /* Larger touch target, more comfortable */
    font-size: 1rem;
    /* Legible without zoom on mobile */
    line-height: 1.5;
    color: var(--color-text);
    background-color: #f9fafb;
    /* Very light gray background */
    background-clip: padding-box;
    border: 1px solid transparent;
    /* No border by default for cleaner look */
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    background-color: #f3f4f6;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    background-color: white;
    border-color: var(--color-primary);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

/* Section Headers */
.form-section {
    margin-bottom: 4rem;
    /* Significant spacing between sections */
    position: relative;
}

.form-section:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -2rem;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-border), transparent);
}

.form-section-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.form-section-label {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    display: inline-block;
}

.form-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    line-height: 1.2;
}

/* Radio & Checkbox Groups - Clean Cards */
.radio-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.radio-card {
    position: relative;
}

.radio-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radio-card-label {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    background-color: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: all 0.2s;
}

.radio-card input:checked~.radio-card-label {
    background-color: var(--color-primary-light);
    /* Very light purple */
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
    font-weight: 600;
}

.radio-card-label:hover {
    border-color: var(--color-primary-light);
    background-color: #f9fafb;
}

/* Cards */
.card {
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

/* Tables - Responsive */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    background: white;
}

.table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.table th,
.table td {
    padding: 0.75rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.table th {
    background-color: #f9fafb;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.table tr:last-child td {
    border-bottom: none;
}

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

/* Sidebar & Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: block;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.mobile-menu-btn:hover {
    background: var(--color-primary-dark);
}

.sidebar {
    width: 260px;
    background-color: var(--color-sidebar);
    color: white;
    flex-shrink: 0;
    display: none;
    /* Hidden on mobile by default */
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 50;
    transition: transform 0.3s ease;
}

/* Mobile sidebar state */
.sidebar.mobile-open {
    display: flex;
    transform: translateX(0);
}

/* Overlay for mobile menu */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
}

.sidebar-overlay.active {
    display: block;
}

.main-content {
    flex: 1;
    padding: var(--space-lg);
    width: 100%;
    padding-top: 4rem;
    /* Space for mobile menu button */
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
        /* Hide on desktop */
    }

    .sidebar {
        display: flex;
        /* Always visible on desktop */
    }

    .main-content {
        margin-left: 260px;
        padding-top: var(--space-lg);
        /* Reset padding on desktop */
    }

    .sidebar-overlay {
        display: none !important;
        /* Never show overlay on desktop */
    }
}

/* Login Page Specifics */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: var(--space-md);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: white;
    padding: 3rem 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo img {
    max-width: 280px;
    /* Significantly increased */
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.login-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.login-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-purple {
    background-color: #f3e8ff;
    color: #7e22ce;
}

.badge-gray {
    background-color: #f3f4f6;
    color: #4b5563;
}