/* ================================================
   SALAMAT - Modern Medical Portal Design
   ================================================ */

:root {
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-200: #bbf7d0;
    --green-300: #86efac;
    --green-400: #4ade80;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-800: #166534;

    --orange-300: #fdba74;
    --orange-400: #fb923c;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --orange-700: #c2410c;

    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    --destructive: #ef4444;
    --radius: 0.75rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: var(--gray-800);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    scroll-behavior: smooth;
}

/* Subtle dot pattern background for main app */
.main-app {
    background:
        radial-gradient(circle at 1px 1px, var(--gray-200) 0.5px, transparent 0.5px);
    background-size: 24px 24px;
    background-color: #f8fafc;
}

/* ================================================
   ENTRANCE ANIMATIONS
   ================================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.welcome-banner {
    animation: fadeInUp 0.6s ease-out both;
}

.section {
    animation: fadeInUp 0.6s ease-out 0.15s both;
}

.right-section {
    animation: fadeInUp 0.6s ease-out 0.25s both;
}

.resource-card {
    animation: fadeInUp 0.5s ease-out both;
}

.resource-card:nth-child(1) { animation-delay: 0.2s; }
.resource-card:nth-child(2) { animation-delay: 0.3s; }
.resource-card:nth-child(3) { animation-delay: 0.4s; }
.resource-card:nth-child(4) { animation-delay: 0.5s; }
.resource-card:nth-child(5) { animation-delay: 0.6s; }
.resource-card:nth-child(6) { animation-delay: 0.7s; }

/* ================================================
   TOP ACCENT LINE
   ================================================ */

.top-accent {
    height: 3px;
    background: linear-gradient(90deg, var(--green-600), var(--green-400), var(--orange-400), var(--orange-500), var(--green-400), var(--green-600));
    background-size: 200% 100%;
    animation: shimmerAccent 4s ease-in-out infinite;
}

@keyframes shimmerAccent {
    0%, 100% { background-position: 0% 0; }
    50% { background-position: 100% 0; }
}

/* ================================================
   HEADER - Modern Slim Bar
   ================================================ */

.header {
    background: white;
    border-bottom: 1px solid var(--gray-100);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.92);
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 2rem;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--green-500), var(--green-600));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logo:hover .logo-icon {
    transform: rotate(-5deg) scale(1.05);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.logo-icon svg {
    width: 20px;
    height: 20px;
}

.logo span {
    font-weight: 800;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--green-700), var(--green-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.05em;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--green-50);
    border: 2px solid var(--green-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green-600);
}

.user-avatar svg {
    width: 20px;
    height: 20px;
}

.user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-800);
}

.user-role {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-weight: 400;
}

.logout-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
}

.logout-btn:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--destructive);
}

.logout-btn svg {
    width: 16px;
    height: 16px;
}

/* ================================================
   WELCOME BANNER - Dark Card with Spotlight & 3D
   ================================================ */

.main-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 2rem 3rem;
}

.welcome-banner {
    position: relative;
    background: linear-gradient(135deg, #0f766e 0%, var(--green-600) 30%, var(--green-500) 60%, #34d399 100%);
    border-radius: 1.25rem;
    padding: 0;
    margin-bottom: 2rem;
    color: white;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    min-height: 320px;
    box-shadow:
        0 20px 50px -12px rgba(22, 163, 74, 0.3),
        0 8px 20px -6px rgba(0, 0, 0, 0.15);
}

/* Spotlight SVG */
.spotlight {
    pointer-events: none;
    position: absolute;
    z-index: 1;
    height: 169%;
    width: 138%;
    opacity: 0;
    top: -40px;
    left: 0;
    animation: spotlightFadeIn 1.2s ease-out 0.3s forwards;
}

@keyframes spotlightFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .spotlight {
        width: 84%;
        left: 60px;
        top: -20px;
    }
}

.welcome-left {
    position: relative;
    z-index: 10;
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: fit-content;
}

.welcome-eyebrow svg {
    width: 12px;
    height: 12px;
}

.welcome-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: white;
}

.title-highlight {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.welcome-subtitle {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 400;
    max-width: 440px;
    line-height: 1.7;
}

.welcome-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.badge:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.badge svg {
    width: 12px;
    height: 12px;
}

/* Right side - Spline 3D Scene */
.welcome-right {
    position: relative;
    z-index: 2;
    flex: 1;
    min-height: 280px;
}

/* Spline Wrapper */
.spline-wrapper {
    position: absolute;
    inset: 0;
    overflow: hidden;
    /* Green tint to match the app theme */
    filter: hue-rotate(85deg) saturate(1.3) brightness(1.05);
}

.spline-wrapper spline-viewer {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
}

/* Hide Spline watermark/logo */
.spline-wrapper spline-viewer::part(logo) {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* Fallback loader while Spline loads */
.spline-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    background: rgba(22, 163, 74, 0.3);
}

.spline-loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--green-400);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* When Spline loads, fade out fallback */
.spline-wrapper spline-viewer:defined ~ .spline-fallback {
    opacity: 0;
    transition: opacity 0.6s ease 0.5s;
    pointer-events: none;
}

/* Gradient fade between left content and Spline scene */
.welcome-right::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    background: linear-gradient(90deg, var(--green-600), transparent);
    z-index: 3;
    pointer-events: none;
}

/* ================================================
   CONTENT WRAPPER
   ================================================ */

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}

/* ================================================
   SECTION HEADER
   ================================================ */

.section {
    margin-bottom: 2rem;
}

.section-header {
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--green-500), var(--green-400));
    border-radius: 2px;
}

.section-subtitle {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    padding-left: calc(4px + 0.5rem);
}

/* ================================================
   RESOURCES GRID - Modern Cards
   ================================================ */

.resources-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.resource-card {
    position: relative;
}

.resource-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.resource-content {
    display: block;
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* Left accent bar on cards */
.resource-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gray-200);
    transition: all 0.3s ease;
}

/* Shimmer overlay on hover */
.resource-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.03), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.resource-content:hover::after {
    left: 100%;
}

.resource-content:hover {
    border-color: var(--green-300);
    box-shadow:
        0 10px 30px -5px rgba(0, 0, 0, 0.08),
        0 6px 12px -6px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(34, 197, 94, 0.08);
    transform: translateY(-4px);
}

.resource-content:hover::before {
    background: linear-gradient(180deg, var(--green-400), var(--green-500));
    box-shadow: 2px 0 8px rgba(34, 197, 94, 0.2);
}

.resource-checkbox:checked + .resource-content {
    border-color: var(--green-400);
    background: linear-gradient(135deg, white 0%, #f0fdf8 100%);
    box-shadow:
        0 0 0 3px rgba(34, 197, 94, 0.12),
        0 8px 24px rgba(34, 197, 94, 0.12),
        0 2px 6px rgba(34, 197, 94, 0.08);
}

.resource-checkbox:checked + .resource-content::before {
    background: linear-gradient(180deg, var(--green-500), var(--green-600));
    width: 4px;
    box-shadow: 2px 0 10px rgba(34, 197, 94, 0.3);
}

.resource-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.resource-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-50);
    color: var(--green-600);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.resource-content:hover .resource-icon {
    transform: scale(1.08) rotate(-2deg);
    background: var(--green-100);
}

.resource-checkbox:checked + .resource-content .resource-icon {
    background: linear-gradient(135deg, var(--green-500), var(--green-600));
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
    transform: scale(1.05);
}

.resource-icon svg {
    width: 24px;
    height: 24px;
}

.check-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    transition: all 0.25s ease;
}

.resource-checkbox:checked + .resource-content .check-icon {
    background: var(--green-500);
    border-color: var(--green-500);
    color: white;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.35);
    animation: checkBounce 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes checkBounce {
    0% { transform: scale(0.6); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.check-icon svg {
    width: 14px;
    height: 14px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.resource-checkbox:checked + .resource-content .check-icon svg {
    opacity: 1;
}

.resource-content h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.375rem;
}

.resource-content p {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 0.875rem;
    line-height: 1.5;
}

.resource-tag {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    background: var(--green-50);
    color: var(--green-700);
    border: 1px solid var(--green-200);
    margin-right: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.preview-btn {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    background: var(--orange-500);
    color: white;
    text-decoration: none;
    transition: all 0.2s;
}

.preview-btn:hover {
    background: var(--orange-600);
    transform: translateY(-1px);
}

/* ================================================
   FORM CONTAINER - Step-Based Design
   ================================================ */

.right-section {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.form-container {
    background: white;
    border-radius: 1rem;
    border: 1px solid var(--gray-200);
    overflow: hidden;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(0, 0, 0, 0.03),
        0 12px 40px rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.3s ease;
}

.form-container:hover {
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 6px 20px rgba(0, 0, 0, 0.05),
        0 16px 48px rgba(0, 0, 0, 0.03);
}

/* Form Container Header */
.form-container-header {
    background: linear-gradient(135deg, var(--gray-50), var(--green-50));
    padding: 1.5rem 1.5rem 1.25rem;
    text-align: center;
    border-bottom: 1px solid var(--gray-100);
}

.form-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--green-500), var(--green-600));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.form-header-icon svg {
    width: 20px;
    height: 20px;
}

.form-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.form-subtitle-text {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* Form Body */
#resourceForm {
    padding: 1.5rem;
}

.form-section {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-section:last-of-type {
    margin-bottom: 1.25rem;
}

/* Step connector lines between sections */
.form-section.has-connector::after {
    content: '';
    position: absolute;
    left: 11px; /* center of 24px step-number circle */
    bottom: -0.75rem;
    width: 2px;
    height: 0.75rem;
    background: linear-gradient(180deg, var(--green-300), var(--green-100));
    border-radius: 1px;
}

/* Step Headers */
.form-step-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.875rem;
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green-500), var(--green-600));
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-step-header:hover .step-number {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.4);
}

.form-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Input Labels */
.input-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 0.375rem;
}

.input-label svg {
    width: 14px;
    height: 14px;
    color: var(--gray-400);
}

/* Form Inputs */
.form-group {
    margin-bottom: 0.875rem;
}

.form-container .form-group input,
.form-container .form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    height: 2.625rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--gray-50);
    color: var(--gray-800);
    transition: all 0.2s ease;
}

.form-container .form-group input::placeholder,
.form-container .form-group textarea::placeholder {
    color: var(--gray-400);
}

.form-container .form-group input:focus,
.form-container .form-group textarea:focus {
    outline: none;
    border-color: var(--green-500);
    background: white;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-container .form-group textarea {
    resize: none;
    min-height: 100px;
    height: auto;
}

/* Selected Resources */
.selected-resources {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 0.875rem;
    min-height: 52px;
    border: 1px dashed var(--gray-300);
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.no-resources {
    color: var(--gray-400);
    font-size: 0.8125rem;
    text-align: center;
    padding: 0.5rem 0;
}

.selected-resource-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
    transition: all 0.15s ease;
}

.selected-resource-item:hover {
    border-color: var(--green-300);
}

.selected-resource-item span {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-700);
}

.selected-resource-item button {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.125rem;
    display: flex;
    border-radius: 4px;
    transition: all 0.15s;
}

.selected-resource-item button:hover {
    background: #fef2f2;
    color: var(--destructive);
}

/* ================================================
   SEND OPTIONS - Pill Toggle Style
   ================================================ */

.send-options {
    display: flex;
    gap: 0.625rem;
}

.send-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1.5px solid var(--gray-200);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.send-option:hover {
    background: var(--green-50);
    border-color: var(--green-300);
}

.send-option input {
    display: none;
}

/* When checked - green glow effect */
.send-option:has(input:checked) {
    background: var(--green-50);
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.send-option input:checked + .option-icon {
    background: linear-gradient(135deg, var(--green-500), var(--green-600));
    color: white;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.35);
    transform: scale(1.05);
}

.send-option input:checked ~ span:last-child {
    font-weight: 600;
    color: var(--green-700);
}

.option-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-200);
    color: var(--gray-500);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.option-icon svg {
    width: 16px;
    height: 16px;
}

.option-icon.whatsapp {
    background: var(--gray-200);
    color: var(--gray-500);
}

.send-option input:checked + .option-icon.whatsapp {
    background: linear-gradient(135deg, var(--green-500), var(--green-600));
    color: white;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.35);
    transform: scale(1.05);
}

/* ================================================
   SUBMIT BUTTON - Modern Gradient
   ================================================ */

.submit-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--green-500) 0%, var(--green-600) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
    letter-spacing: 0.04em;
    position: relative;
    overflow: hidden;
}

.submit-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
    background: linear-gradient(135deg, var(--green-600) 0%, var(--green-700) 100%);
}

.submit-btn:hover::after {
    opacity: 1;
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-btn svg {
    width: 16px;
    height: 16px;
}

/* Security Badge */
.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    color: var(--gray-400);
    background: linear-gradient(135deg, var(--gray-50), var(--green-50));
    border-radius: 8px;
    border: 1px solid var(--gray-100);
    transition: all 0.2s ease;
}

.security-badge:hover {
    border-color: var(--green-200);
    color: var(--gray-500);
}

.security-badge svg {
    width: 14px;
    height: 14px;
    color: var(--green-500);
    flex-shrink: 0;
    animation: securityPulse 3s ease-in-out infinite;
}

@keyframes securityPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ================================================
   APP FOOTER
   ================================================ */

.app-footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gray-400);
    font-size: 0.8125rem;
    border-top: 1px solid var(--gray-100);
    margin-top: 1rem;
}

/* ================================================
   MODALS - Modern Glass Design
   ================================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal.show {
    display: flex;
    animation: modalBackdropIn 0.3s ease-out both;
}

@keyframes modalBackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 1.5rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: modalSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Subtle top gradient accent on modals */
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--green-400), var(--green-500), var(--orange-400));
    border-radius: 1.5rem 1.5rem 0 0;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem auto 1.5rem;
    position: relative;
}

/* Pulse ring behind modal icon */
.modal-icon::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid;
    animation: modalIconPulse 1.5s ease-out;
    opacity: 0;
}

@keyframes modalIconPulse {
    0% { transform: scale(0.8); opacity: 0.6; }
    100% { transform: scale(1.3); opacity: 0; }
}

.modal-icon.success {
    background: linear-gradient(135deg, var(--green-400), var(--green-600));
    color: white;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
    animation: modalIconBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

.modal-icon.success::after {
    border-color: var(--green-300);
}

.modal-icon.error {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: white;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
    animation: modalIconBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

.modal-icon.error::after {
    border-color: #fca5a5;
}

@keyframes modalIconBounce {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.modal-icon svg {
    width: 36px;
    height: 36px;
}

.modal-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.modal-content p {
    color: var(--gray-500);
    margin-bottom: 1.75rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.modal-btn {
    padding: 0.75rem 2.5rem;
    background: linear-gradient(135deg, var(--green-500), var(--green-600));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

/* Shine effect on modal button */
.modal-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.4s ease;
}

.modal-btn:hover::after {
    left: 100%;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4);
}

.modal-btn:active {
    transform: translateY(0);
}

.modal-btn.error-btn {
    background: linear-gradient(135deg, #f87171, #ef4444);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.modal-btn.error-btn:hover {
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

/* ================================================
   SCROLLBAR
   ================================================ */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

::selection {
    background: var(--green-200);
    color: var(--green-900);
}

/* Main App Hidden by Default */
.main-app {
    display: none;
}

/* ================================================
   RESPONSIVE - Dashboard
   ================================================ */

/* --- Tablet landscape and below (1024px) --- */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .right-section {
        position: static;
    }

    .welcome-right {
        min-height: 260px;
    }

    .main-container {
        padding: 1.5rem 1.25rem 2rem;
    }

    .section-title {
        font-size: 1.125rem;
    }
}

/* --- Tablet portrait and below (768px) --- */
@media (max-width: 768px) {
    .header-content {
        padding: 0.75rem 1rem;
    }

    .main-container {
        padding: 1rem 1rem 2rem;
    }

    /* Welcome banner stacks vertically */
    .welcome-banner {
        flex-direction: column;
        min-height: auto;
        border-radius: 1rem;
    }

    .welcome-left {
        padding: 2rem 1.5rem 1.5rem;
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .welcome-right {
        position: relative;
        min-height: 220px;
        width: 100%;
    }

    .welcome-right::before {
        display: none;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .welcome-subtitle {
        text-align: center;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .welcome-badges {
        gap: 0.5rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Header: hide user details, show avatar + logout only */
    .user-details {
        display: none;
    }

    .user-info {
        gap: 0.5rem;
    }

    .tagline {
        display: none !important;
    }

    /* Resources grid: 2 columns on tablet */
    .resources-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }

    /* Form container */
    .form-container {
        border-radius: 1rem;
    }

    .form-container-header {
        padding: 1.5rem 1.25rem;
    }

    #resourceForm {
        padding: 1.25rem;
    }

    /* Modals fit better on tablet */
    .modal-content {
        max-width: 360px;
        padding: 2rem 1.5rem;
        border-radius: 1.25rem;
    }

    .modal-icon {
        width: 64px;
        height: 64px;
    }

    .modal-icon svg {
        width: 30px;
        height: 30px;
    }

    /* Spotlight dims on smaller screens */
    .spotlight {
        opacity: 0;
        animation: spotlightFadeIn 1.2s ease-out 0.5s forwards;
    }
}

/* --- Mobile landscape / large phones (640px) --- */
@media (max-width: 640px) {
    body {
        font-size: 15px;
    }

    .header-content {
        padding: 0.625rem 0.75rem;
    }

    .logo span {
        font-size: 1.125rem;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .logo-icon svg {
        width: 16px;
        height: 16px;
    }

    .logout-btn {
        width: 34px;
        height: 34px;
    }

    .user-avatar {
        width: 34px;
        height: 34px;
    }

    .main-container {
        padding: 0.75rem 0.75rem 1.5rem;
    }

    /* Welcome banner */
    .welcome-banner {
        border-radius: 0.875rem;
        margin-bottom: 1.25rem;
    }

    .welcome-left {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .welcome-eyebrow {
        font-size: 0.625rem;
        padding: 0.25rem 0.625rem;
    }

    .welcome-title {
        font-size: 1.25rem;
        line-height: 1.3;
    }

    .welcome-subtitle {
        font-size: 0.8125rem;
        line-height: 1.5;
    }

    .welcome-right {
        display: none;
    }

    .badge {
        font-size: 0.625rem;
        padding: 0.25rem 0.5rem;
        gap: 0.25rem;
    }

    .badge svg {
        width: 10px;
        height: 10px;
    }

    /* Resources grid: single column */
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .resource-content {
        padding: 1.125rem;
    }

    .resource-title {
        font-size: 0.9375rem;
    }

    .resource-desc {
        font-size: 0.8125rem;
    }

    /* Section headers */
    .section-header {
        margin-bottom: 1rem;
    }

    .section-title {
        font-size: 1.0625rem;
    }

    .section-subtitle {
        font-size: 0.8125rem;
    }

    /* Form container */
    .form-container {
        border-radius: 0.875rem;
    }

    .form-container-header {
        padding: 1.25rem 1rem;
    }

    .form-title {
        font-size: 1rem;
    }

    .form-subtitle-text {
        font-size: 0.8125rem;
    }

    #resourceForm {
        padding: 1rem;
    }

    .form-section {
        padding: 0.875rem;
    }

    .form-section-title {
        font-size: 0.8125rem;
    }

    .step-number {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }

    /* Send options stack vertically */
    .send-options {
        flex-direction: column;
    }

    .send-option {
        padding: 0.625rem;
    }

    /* Submit button */
    .submit-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.8125rem;
    }

    /* Security badge */
    .security-badge {
        font-size: 0.6875rem;
        padding: 0.625rem 0.75rem;
    }

    /* Footer */
    .app-footer {
        padding: 1.5rem 0.75rem;
        font-size: 0.75rem;
    }

    /* Step connectors hidden on small screens */
    .has-connector::after {
        display: none;
    }

    /* Modals */
    .modal-content {
        max-width: 320px;
        width: calc(100% - 2rem);
        padding: 1.75rem 1.25rem;
        border-radius: 1rem;
    }

    .modal-content h3 {
        font-size: 1.125rem;
    }

    .modal-content p {
        font-size: 0.875rem;
    }

    .modal-btn {
        padding: 0.625rem 2rem;
        font-size: 0.875rem;
    }

    /* Entrance animation: reduce stagger on mobile for faster feel */
    .resource-card:nth-child(1) { animation-delay: 0s; }
    .resource-card:nth-child(2) { animation-delay: 0.05s; }
    .resource-card:nth-child(3) { animation-delay: 0.1s; }
    .resource-card:nth-child(4) { animation-delay: 0.15s; }
    .resource-card:nth-child(5) { animation-delay: 0.2s; }
    .resource-card:nth-child(6) { animation-delay: 0.25s; }
}

/* --- Small phones (480px) --- */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .header-content {
        padding: 0.5rem 0.625rem;
    }

    .logo span {
        font-size: 1rem;
        letter-spacing: 0.04em;
    }

    .logo-icon {
        width: 28px;
        height: 28px;
    }

    .logo-icon svg {
        width: 14px;
        height: 14px;
    }

    .main-container {
        padding: 0.625rem 0.5rem 1.25rem;
    }

    /* Welcome banner: tighter on small phones */
    .welcome-banner {
        border-radius: 0.75rem;
        margin-bottom: 1rem;
    }

    .welcome-left {
        padding: 1.25rem 1rem 1rem;
    }

    .welcome-title {
        font-size: 1.125rem;
    }

    .welcome-title br {
        display: none;
    }

    .welcome-subtitle {
        font-size: 0.75rem;
    }

    .welcome-badges {
        gap: 0.375rem;
    }

    .badge {
        font-size: 0.5625rem;
        padding: 0.1875rem 0.375rem;
    }

    /* Spotlight hidden on very small screens */
    .spotlight {
        display: none;
    }

    /* Resource cards */
    .resource-content {
        padding: 1rem;
    }

    .resource-icon-wrap {
        width: 38px;
        height: 38px;
    }

    .resource-icon-wrap svg {
        width: 18px;
        height: 18px;
    }

    /* Form */
    .form-container-header {
        padding: 1rem 0.875rem;
    }

    .form-header-icon {
        width: 36px;
        height: 36px;
    }

    .form-header-icon svg {
        width: 18px;
        height: 18px;
    }

    #resourceForm {
        padding: 0.875rem;
    }

    .form-section {
        padding: 0.75rem;
        border-radius: 8px;
    }

    .form-container .form-group input,
    .form-container .form-group textarea {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .input-label {
        font-size: 0.75rem;
    }

    /* Submit button */
    .submit-btn {
        padding: 0.6875rem 1rem;
        font-size: 0.75rem;
        border-radius: 8px;
        letter-spacing: 0.03em;
    }

    /* Security badge */
    .security-badge {
        font-size: 0.625rem;
        padding: 0.5rem 0.625rem;
    }

    /* Modals */
    .modal-content {
        width: calc(100% - 1.5rem);
        max-width: 300px;
        padding: 1.5rem 1rem;
    }

    .modal-icon {
        width: 60px;
        height: 60px;
    }

    .modal-icon svg {
        width: 28px;
        height: 28px;
    }

    .modal-content h3 {
        font-size: 1.0625rem;
    }

    .modal-content p {
        font-size: 0.8125rem;
        margin-bottom: 1.25rem;
    }

    .modal-btn {
        padding: 0.625rem 1.75rem;
        font-size: 0.8125rem;
        border-radius: 8px;
    }
}

/* --- Very small phones (360px and below) --- */
@media (max-width: 360px) {
    .main-container {
        padding: 0.5rem 0.375rem 1rem;
    }

    .welcome-left {
        padding: 1rem 0.75rem 0.75rem;
    }

    .welcome-title {
        font-size: 1rem;
    }

    .welcome-eyebrow {
        font-size: 0.5625rem;
    }

    .welcome-badges {
        display: none;
    }

    .form-container-header {
        padding: 0.875rem 0.75rem;
    }

    #resourceForm {
        padding: 0.75rem;
    }

    .form-step-header {
        gap: 0.5rem;
    }

    .step-number {
        width: 24px;
        height: 24px;
        font-size: 0.6875rem;
    }

    /* Spline scene smaller */
    .spline-wrapper {
        filter: hue-rotate(85deg) saturate(1.3) brightness(1.05);
    }
}

/* --- Spline scene on mobile: touch interaction enabled --- */
@media (max-width: 768px) {
    .spline-wrapper spline-viewer {
        touch-action: manipulation;
    }
}

/* --- Touch-friendly tap targets --- */
@media (hover: none) and (pointer: coarse) {
    .send-option {
        min-height: 48px;
    }

    .submit-btn {
        min-height: 48px;
    }

    .resource-card {
        cursor: default;
    }

    /* Disable hover effects on touch devices */
    .resource-card:hover {
        transform: none;
    }

    .submit-btn:hover {
        transform: none;
    }

    .modal-btn:hover {
        transform: none;
    }

    /* Larger logout button for touch */
    .logout-btn {
        min-width: 40px;
        min-height: 40px;
    }
}

/* ================================================
   FOCUS STYLES
   ================================================ */

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--green-400);
    outline-offset: 2px;
}

/* ================================================
   LOADING & TRANSITIONS
   ================================================ */

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.auth-btn svg[data-lucide="loader-2"] {
    animation: spin 1s linear infinite;
}

.login-page,
.main-app {
    transition: opacity 0.3s ease;
}

/* ================================================
   LOGIN PAGE STYLES - Figma Design
   ================================================ */

.login-page {
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, var(--green-50) 0%, #ffffff 50%, #fff7ed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    overflow-y: auto;
}

.login-outer {
    width: 100%;
    max-width: 480px;
    margin: auto;
}

.login-logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green-500), var(--green-600));
    color: white;
    margin-bottom: 1rem;
    box-shadow: 0 10px 25px -5px rgba(34, 197, 94, 0.4);
}

.logo-circle svg {
    width: 32px;
    height: 32px;
}

.login-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.title-underline {
    height: 4px;
    width: 80px;
    background: linear-gradient(to right, var(--green-500), var(--orange-400));
    margin: 0 auto;
    border-radius: 9999px;
}

.login-container {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-100);
    overflow: hidden;
}

.login-form-container {
    padding: 2rem;
}

.form-header {
    margin-bottom: 2rem;
    text-align: center;
}

.form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.form-header p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.login-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    background: var(--gray-100);
    border-radius: 12px;
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    background: none;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.tab-btn.active {
    background: white;
    color: var(--gray-900);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.auth-form {
    display: none;
    animation: authFadeIn 0.3s ease;
}

.auth-form.active {
    display: block;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form .form-group {
    margin-bottom: 1rem;
}

/* Icon-wrapped inputs */
.input-icon-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.125rem;
    height: 1.125rem;
    color: var(--gray-400);
    pointer-events: none;
    z-index: 1;
}

.input-icon-wrap input,
.input-icon-wrap select {
    width: 100%;
    padding: 0.75rem 0.875rem 0.75rem 2.75rem;
    height: 2.875rem;
    border: 1.5px solid var(--gray-200);
    border-radius: 12px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--gray-50);
    color: var(--gray-800);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.input-icon-wrap input::placeholder {
    color: var(--gray-400);
}

.input-icon-wrap input:focus,
.input-icon-wrap select:focus {
    outline: none;
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
    background: white;
}

.input-icon-wrap select {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

/* Legacy .auth-form input for compatibility */
.auth-form input[type="checkbox"] {
    width: auto;
    height: auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Password toggle inside icon-wrap */
.input-icon-wrap .password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 1;
}

.input-icon-wrap .password-toggle:hover {
    color: var(--gray-700);
}

.input-icon-wrap .password-toggle svg {
    width: 1.125rem;
    height: 1.125rem;
}

.input-icon-wrap input[type="password"],
.input-icon-wrap input[type="text"] {
    padding-right: 2.75rem;
}

/* Password Strength Indicator */
.password-strength {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.password-strength.visible {
    display: flex;
}

.strength-bar {
    flex: 1;
    height: 6px;
    background: var(--gray-200);
    border-radius: 999px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0;
}

.strength-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    min-width: 60px;
    text-align: right;
}

.strength-hints {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 8px;
    margin-top: 0.375rem;
}

.strength-hints .hint {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: #d97706;
}

.strength-hints .hint svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

/* Auth Options Row (remember me + forgot) */
.auth-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.remember-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--green-600);
    cursor: pointer;
}

.forgot-link {
    background: none;
    border: none;
    color: var(--green-600);
    font-size: 0.8125rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--green-700);
}

/* Terms Checkbox */
.terms-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--gray-500);
    line-height: 1.4;
}

.terms-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin-top: 2px;
    accent-color: var(--green-600);
    cursor: pointer;
    flex-shrink: 0;
}

.terms-label a {
    color: var(--green-600);
    text-decoration: none;
    font-weight: 500;
}

.terms-label a:hover {
    text-decoration: underline;
}

.auth-btn {
    width: 100%;
    height: 2.875rem;
    padding: 0 1.5rem;
    background: linear-gradient(135deg, var(--green-500), var(--green-600));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    font-family: inherit;
    box-sizing: border-box;
}

.auth-btn:hover {
    background: linear-gradient(135deg, var(--green-600), var(--green-700));
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.35);
    transform: translateY(-1px);
}

.auth-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.auth-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.divider {
    display: flex;
    align-items: center;
    margin: 1.25rem 0;
    color: var(--gray-400);
    font-size: 0.8125rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.divider span {
    padding: 0 1rem;
}

.google-btn {
    width: 100%;
    padding: 0.625rem 1rem;
    height: 2.875rem;
    border: 1.5px solid var(--gray-200);
    border-radius: 12px;
    background: white;
    color: var(--gray-700);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.google-btn:hover {
    border-color: var(--green-400);
    background: var(--green-50);
}

/* Auth Switch Text */
.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.auth-switch button {
    background: none;
    border: none;
    color: var(--green-600);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8125rem;
    transition: color 0.2s;
}

.auth-switch button:hover {
    color: var(--green-700);
}

/* Admin Panel Link */
.admin-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--gray-100);
    font-size: 0.75rem;
    color: var(--gray-400);
    text-decoration: none;
    transition: color 0.2s;
}

.admin-link:hover {
    color: var(--gray-600);
}

/* Auth Messages */
.auth-error,
.auth-success {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.auth-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-success {
    background: var(--green-50);
    color: var(--green-700);
    border: 1px solid var(--green-200);
}

/* ================================================
   RESPONSIVE - LOGIN
   ================================================ */

@media (max-width: 640px) {
    .login-page {
        padding: 1.5rem 1rem;
    }

    .login-outer {
        max-width: 100%;
    }

    .login-logo-section {
        margin-bottom: 1.5rem;
    }

    .logo-circle {
        width: 56px;
        height: 56px;
    }

    .logo-circle svg {
        width: 28px;
        height: 28px;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .login-form-container {
        padding: 1.5rem;
    }

    .form-header h2 {
        font-size: 1.25rem;
    }

    .form-header p {
        font-size: 0.8125rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .tab-btn {
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
    }

    .auth-form input,
    .auth-form select {
        font-size: 0.875rem;
        height: 2.625rem;
    }

    .auth-btn {
        height: 2.75rem;
        font-size: 0.9375rem;
    }

    .google-btn {
        height: 2.625rem;
        font-size: 0.8125rem;
    }

    .auth-options-row {
        font-size: 0.8125rem;
    }

    .terms-label {
        font-size: 0.8125rem;
    }

    .auth-switch {
        font-size: 0.8125rem;
    }

    .input-icon {
        width: 16px;
        height: 16px;
        left: 12px;
    }

    .input-icon-wrap input,
    .input-icon-wrap select {
        padding-left: 2.25rem;
    }

    .strength-hints {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .login-page {
        padding: 1rem 0.75rem;
        align-items: flex-start;
        padding-top: 2rem;
    }

    .login-logo-section {
        margin-bottom: 1.25rem;
    }

    .logo-circle {
        width: 48px;
        height: 48px;
    }

    .logo-circle svg {
        width: 24px;
        height: 24px;
    }

    .login-title {
        font-size: 1.375rem;
    }

    .title-underline {
        width: 60px;
        height: 3px;
    }

    .login-form-container {
        padding: 1.25rem;
    }

    .form-header {
        margin-bottom: 1rem;
    }

    .form-header h2 {
        font-size: 1.125rem;
    }

    .login-tabs {
        margin-bottom: 1.25rem;
    }

    .auth-form .form-group {
        margin-bottom: 1rem;
    }

    .auth-form input,
    .auth-form select {
        font-size: 0.8125rem;
        height: 2.5rem;
        padding: 0.5rem 0.75rem;
    }

    .input-icon-wrap input,
    .input-icon-wrap select {
        padding-left: 2rem;
    }

    .input-icon {
        width: 15px;
        height: 15px;
        left: 10px;
    }

    .auth-btn {
        height: 2.625rem;
        font-size: 0.875rem;
        border-radius: 10px;
    }

    .google-btn {
        height: 2.5rem;
        font-size: 0.8125rem;
        border-radius: 10px;
    }

    .divider {
        margin: 1rem 0;
        font-size: 0.8125rem;
    }

    .auth-options-row {
        font-size: 0.75rem;
    }

    .terms-label {
        font-size: 0.75rem;
    }

    .auth-switch {
        font-size: 0.75rem;
        margin-top: 1rem;
    }

    .strength-hints {
        grid-template-columns: 1fr;
    }

    .password-strength {
        gap: 0.375rem;
    }
}

/* Very small login screens */
@media (max-width: 360px) {
    .login-page {
        padding: 0.75rem 0.5rem;
        padding-top: 1.5rem;
    }

    .login-form-container {
        padding: 1rem;
    }

    .form-header h2 {
        font-size: 1rem;
    }

    .login-title {
        font-size: 1.25rem;
    }
}

/* ================================================
   FOCUS STYLES - Login
   ================================================ */

.tab-btn:focus-visible,
.auth-btn:focus-visible,
.google-btn:focus-visible,
.logout-btn:focus-visible,
.password-toggle:focus-visible,
.submit-btn:focus-visible,
.modal-btn:focus-visible {
    outline: 3px solid var(--orange-500);
    outline-offset: 2px;
}