:root {
    --bg: #f5faef;
    --surface: #ffffff;
    --surface-2: #edf7e1;
    --border: rgba(163, 217, 93, 0.15);
    --text: #172b0d;
    --muted: #5e7054;
    --primary: #a1d65d;
    --primary-light: #bdec84;
    --primary-dark: #76a143;
    --gold: #fcc419;
    --success: #a1d65d;
    --error: #fa5252;
    --grad-primary: linear-gradient(135deg, #a1d65d 0%, #76a143 100%);
    --font: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 24px;
    --r-xl: 40px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.08);
    --glow: 0 0 24px rgba(161, 214, 93, 0.2);
    --t: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    overflow-x: hidden;
}

body.auth-body {
    overflow: hidden !important;
    height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    display: block;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/* Typography */
.text-sm {
    font-size: 0.875rem;
}

.text-base {
    font-size: 1rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.text-4xl {
    font-size: 2.25rem;
}

.text-5xl {
    font-size: 3rem;
}

.muted {
    color: var(--muted);
}

.fw-500 {
    font-weight: 500;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.fw-800 {
    font-weight: 800;
}

.tight {
    letter-spacing: -0.03em;
}

/* Layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.noise {
    position: relative;
}

.noise::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("https://grainy-gradients.vercel.app/noise.svg");
    opacity: 0.03;
    pointer-events: none;
}

/* Gradient text */
.grad-text {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--r-md);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--t);
    border: 1px solid transparent;
    text-decoration: none;
    user-select: none;
}

.btn-primary {
    background: #1b4932;
    color: #fff;
    box-shadow: 0 4px 14px rgba(27, 73, 50, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    background: #133323;
    box-shadow: 0 6px 20px rgba(27, 73, 50, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: rgba(0, 0, 0, 0.08);
    /* Adjusted for better contrast on white card */
}

.btn-ghost:hover {
    background: #f4f7f4;
    border-color: #1b4932;
}

.btn-full {
    width: 100%;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a3321;
}

.form-input-wrap {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    color: #1a3321;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    outline: none;
}

.form-input:focus {
    border-color: #1b4932;
    box-shadow: 0 0 0 3px rgba(27, 73, 50, 0.1);
}

.form-error {
    display: block;
    margin-top: 6px;
    font-size: 0.8125rem;
    color: var(--error);
}

.auth-page {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background: #e6f5d8;
    padding: 16px;
}

.auth-left {
    flex: 1.2;
    background: #e6f5d8;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-xl);
}

.auth-illustration {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
}

.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: transparent;
    z-index: 10;
}

.auth-card {
    width: 100%;
    max-width: 520px;
    background: #fff;
    padding: 40px;
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    max-height: 95vh;
    overflow-y: auto;
}

.auth-card::-webkit-scrollbar {
    width: 0;
}

.auth-header {
    margin-bottom: 24px;
    text-align: center;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 40px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.25rem;
}

.auth-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--text);
}

.auth-subtitle {
    color: var(--muted);
    font-size: 1.0625rem;
}

.auth-social {
    display: flex;
    gap: 12px;
    margin: 24px 0;
    justify-content: center;
}

.btn-social {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100px;
    border: none;
    background: #f1f8e9;
    transition: var(--t);
    cursor: pointer;
    color: #1b4932;
    /* Dashboard green */
}

.btn-social:hover {
    transform: translateY(-2px);
    background: #e6f5d8;
    box-shadow: 0 4px 12px rgba(27, 73, 50, 0.15);
    /* Dashboard dark green shadow */
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--muted);
    font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-footer {
    margin-top: 32px;
    text-align: center;
    color: var(--muted);
    font-size: 0.9375rem;
}

.auth-link {
    color: #1b4932;
    font-weight: 700;
    text-decoration: none;
    text-underline-offset: 4px;
    transition: all 0.2s ease;
}

.auth-link:hover {
    color: #133323;
    text-decoration: underline;
}

@media (max-width: 1100px) {
    .auth-page {
        padding: 0;
        flex-direction: column;
    }

    .auth-left {
        display: none;
    }

    .auth-right {
        padding: 40px 16px;
    }

    .auth-card {
        box-shadow: none;
        padding: 32px 20px;
        border-radius: 0;
    }
}

/* Dashboard Sidebar - Initial Styles */
.sidebar {
    width: 280px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    height: 100vh;
    position: fixed;
}

.main-content {
    margin-left: 280px;
    padding: 40px;
    background: var(--bg);
    min-height: 100vh;
}

/* Checkbox */
.checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.checkbox-wrap input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: var(--t);
    position: relative;
    margin-top: 2px;
}

.checkbox-wrap input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-wrap input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translate(1px, -1px);
}

.checkbox-label {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.5;
}

.checkbox-label a {
    color: var(--primary-light);
    transition: var(--t);
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.badge-primary {
    background: rgba(108, 99, 255, 0.15);
    color: var(--primary-light);
    border: 1px solid rgba(108, 99, 255, 0.25);
}

.badge-success {
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-gold {
    background: rgba(245, 200, 66, 0.1);
    color: #fde68a;
    border: 1px solid rgba(245, 200, 66, 0.2);
}

/* Card */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
}

/* Alert */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--r-sm);
    font-size: 0.875rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #86efac;
}

.alert-info {
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.25);
    color: var(--primary-light);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: 0.8125rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Pill Toggle */
.pill-toggle {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 4px;
    gap: 4px;
}

.pill-toggle input[type="radio"] {
    display: none;
}

.pill-toggle label {
    padding: 8px 22px;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: var(--t);
    user-select: none;
}

.pill-toggle input[type="radio"]:checked+label {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: 0 2px 12px rgba(108, 99, 255, 0.35);
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(108, 99, 255, 0.2);
    }

    50% {
        box-shadow: 0 0 40px rgba(108, 99, 255, 0.4);
    }
}

.anim-up {
    animation: fadeUp var(--t-slow) both;
}

.anim-in {
    animation: fadeIn var(--t-slow) both;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 99px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 18px;
    }

    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}