/* ============================================================
   CloudPoynt Design System — "Modern Glass"
   ============================================================ */

/* Google Fonts loaded via HTML <link> — Inter 400,500,600,700 */

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

:root {
    /* Primary */
    --primary-color: #6366F1;
    --primary-light: #818CF8;
    --primary-dark: #4F46E5;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --primary-gradient: linear-gradient(135deg, #6366F1, #818CF8);

    /* Surface & Glass */
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    --backdrop-blur: blur(20px);
    --surface: #FFFFFF;
    --background: #F8FAFC;
    --bg-gradient: linear-gradient(135deg, #EEF2FF 0%, #FAF5FF 50%, #FFF1F2 100%);

    /* Neutrals */
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;
    --border: #E2E8F0;
    --text-primary: #1E293B;
    --text-secondary: #64748B;

    /* Semantic */
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --error: #EF4444;
    --error-light: #FEE2E2;
    --info: #3B82F6;
    --info-light: #DBEAFE;

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.14);
    --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.2);

    /* Animation */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   Animations — Global
   ============================================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 20px 4px rgba(99, 102, 241, 0.15); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Page entrance animation */
main {
    animation: fadeInUp var(--duration-slow) var(--ease-out);
}

/* ============================================================
   Navbar — Glassmorphic
   ============================================================ */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.04);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all var(--duration-normal) ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.nav-user {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.nav-brand a {
    text-decoration: none;
}

.nav-links, .nav-user {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
}

.nav-links a:hover {
    background: var(--primary-glow);
    color: var(--primary-color);
}

.nav-links a.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.nav-user span {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.admin-badge {
    background: var(--primary-gradient);
    color: white;
    padding: 0.2rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================================
   Buttons — Gradient & Glow
   ============================================================ */
.btn-primary, .btn-secondary, .btn-large {
    padding: 0.55rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--duration-normal) var(--ease-out);
    font-family: inherit;
    line-height: 1.4;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 4px rgba(99, 102, 241, 0.2);
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary-light);
    color: var(--primary-color);
    background: var(--primary-glow);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0) scale(0.98);
}

.btn-large {
    padding: 0.85rem 2.25rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background: linear-gradient(135deg, #EF4444, #F87171);
    color: white;
    padding: 0.55rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--duration-normal) var(--ease-out);
    font-family: inherit;
}

.btn-danger:hover {
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
    padding: 5rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Decorative orbs */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
}

.hero::before {
    width: 400px;
    height: 400px;
    background: rgba(99, 102, 241, 0.2);
    top: -100px;
    right: -100px;
}

.hero::after {
    width: 300px;
    height: 300px;
    background: rgba(236, 72, 153, 0.15);
    bottom: -50px;
    left: -50px;
}

.hero h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.hero-actions {
    margin-top: 2rem;
    position: relative;
}

.hero-actions .btn-large {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* ============================================================
   Features Section
   ============================================================ */
.features {
    padding: 4rem 0;
    position: relative;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.6);
    text-align: center;
    transition: all var(--duration-normal) var(--ease-out);
    box-shadow: var(--shadow-sm);
    animation: fadeInUp var(--duration-slow) var(--ease-out) backwards;
}

.feature-card:nth-child(1) { animation-delay: 100ms; }
.feature-card:nth-child(2) { animation-delay: 200ms; }
.feature-card:nth-child(3) { animation-delay: 300ms; }

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    border-radius: var(--radius-md);
    background: var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: var(--primary-color);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ============================================================
   Auth Page — Glass Card
   ============================================================ */
.auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    position: relative;
}

/* Decorative background */
.auth-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-gradient);
    background-size: 200% 200%;
    animation: gradient-shift 15s ease infinite;
    z-index: -1;
}

.auth-container {
    width: 100%;
    max-width: 440px;
    padding: 0 20px;
}

.auth-box {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    animation: scaleIn var(--duration-slow) var(--ease-out);
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    padding: 0.25rem;
    border-bottom: none;
}

.tab-btn {
    flex: 1;
    padding: 0.65rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--duration-normal) var(--ease-out);
    font-family: inherit;
    border-bottom: none;
    margin-bottom: 0;
}

.tab-btn.active {
    color: var(--primary-color);
    background: white;
    box-shadow: var(--shadow-sm);
    border-bottom-color: transparent;
}

.tab-btn:hover:not(.active) {
    color: var(--text-primary);
}

.auth-form h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: -0.02em;
}

/* ============================================================
   Forms — Refined
   ============================================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.925rem;
    font-family: inherit;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.8);
    transition: all var(--duration-normal) var(--ease-out);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: white;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-400);
}

.form-control {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.925rem;
    font-family: inherit;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.8);
    transition: all var(--duration-normal) var(--ease-out);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: white;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-help-text {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-top: 0.4rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* ============================================================
   Messages — Accent Border Style
   ============================================================ */
.error-message, .success-message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideDown var(--duration-normal) var(--ease-out);
}

.error-message {
    background: var(--error-light);
    color: #B91C1C;
    border-left: 3px solid var(--error);
}

.success-message {
    background: var(--success-light);
    color: #065F46;
    border-left: 3px solid var(--success);
}

/* ============================================================
   Loading & Empty States
   ============================================================ */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.loading::before {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    margin: 0 auto 1rem;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-sm);
}

.empty-state-icon {
    font-size: 3.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.7;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Skeleton loading animation */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

/* ============================================================
   Modal — Glass + Slide-in
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal.show,
.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn var(--duration-fast) ease;
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-xl);
    animation: scaleIn var(--duration-normal) var(--ease-spring);
}

.modal-content.modal-sm {
    max-width: 400px;
}

.modal-content.modal-lg {
    max-width: 800px;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.modal-close {
    background: var(--gray-100);
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    transition: all var(--duration-fast);
    line-height: 1;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ============================================================
   Tab System — Pill Switcher
   ============================================================ */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn var(--duration-normal) var(--ease-out);
}

/* ============================================================
   Hamburger Toggle — Animated
   ============================================================ */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
    z-index: 101;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s var(--ease-out);
    transform-origin: center;
}

/* Animated X when open */
.navbar.open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar.open .nav-toggle span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.navbar.open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   Responsive — Mobile
   ============================================================ */
@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
        gap: 0;
    }

    .navbar {
        padding: 0.75rem 0;
    }

    .nav-brand {
        flex: 1;
    }

    .nav-brand h1 {
        font-size: 1.25rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links, .nav-user {
        display: none;
        width: 100%;
        padding: 0.75rem 0 0;
    }

    .navbar.open .nav-links,
    .navbar.open .nav-user {
        display: flex;
        animation: slideDown var(--duration-normal) var(--ease-out);
    }

    .nav-links {
        flex-direction: column;
        gap: 0.25rem;
        border-top: 1px solid var(--gray-200);
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }

    .nav-links a {
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
        border-radius: var(--radius-md);
    }

    .nav-user {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0;
        gap: 0.75rem;
    }

    #userName {
        font-size: 0.9rem;
    }

    .hero h2 {
        font-size: 2.25rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .auth-box {
        padding: 1.75rem;
    }

    /* Mobile modals slide up from bottom */
    .modal.show .modal-content,
    .modal.active .modal-content {
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        max-height: 92vh;
    }

    .modal.show,
    .modal.active {
        align-items: flex-end;
    }

    .modal-header {
        position: sticky;
        top: 0;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 1;
    }

    .modal-footer {
        position: sticky;
        bottom: 0;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 1;
    }
}

/* ============================================================
   Utility Classes
   ============================================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

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

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

.badge {
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-primary {
    background: var(--primary-glow);
    color: var(--primary-color);
}

.badge-success {
    background: var(--success-light);
    color: #065F46;
}

.badge-warning {
    background: var(--warning-light);
    color: #92400E;
}

.badge-error {
    background: var(--error-light);
    color: #B91C1C;
}

.badge-info {
    background: var(--info-light);
    color: #1E40AF;
}

/* ============================================================
   Icon Buttons
   ============================================================ */
.btn-icon {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--gray-200);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--duration-fast);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--primary-glow);
    border-color: var(--primary-light);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.btn-icon.danger:hover {
    background: var(--error-light);
    color: var(--error);
    border-color: var(--error);
}

/* ============================================================
   Toggle Switch — Refined
   ============================================================ */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 0.5rem;
}

.toggle-inner {
    width: 48px;
    height: 26px;
    background: var(--gray-300);
    border-radius: 13px;
    position: relative;
    transition: all var(--duration-normal) var(--ease-out);
}

.toggle-inner::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all var(--duration-normal) var(--ease-spring);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

input[type="checkbox"]:checked + .toggle-label .toggle-inner {
    background: var(--success);
}

input[type="checkbox"]:checked + .toggle-label .toggle-inner::after {
    left: 24px;
}

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-200);
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-fast);
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text-secondary);
}

.pagination button:hover:not(:disabled) {
    background: var(--primary-glow);
    border-color: var(--primary-light);
    color: var(--primary-color);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination .page-info {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================================================
   Image Upload Area
   ============================================================ */
.image-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    transition: all var(--duration-normal);
}

.image-upload-area:hover,
.image-upload-area.dragover {
    border-color: var(--primary-color);
    background: var(--primary-glow);
}

.image-preview {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.image-preview img {
    max-width: 100%;
    max-height: 180px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.image-remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: var(--error);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform var(--duration-fast);
}

.image-remove-btn:hover {
    transform: scale(1.1);
}

.image-upload-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

.btn-upload,
.btn-browse {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    border: 1px solid var(--gray-200);
    text-align: center;
    font-family: inherit;
}

.btn-upload {
    background: var(--primary-gradient);
    color: #fff;
    border-color: transparent;
}

.btn-upload:hover {
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.btn-browse {
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-primary);
}

.btn-browse:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

/* Upload Progress */
.image-upload-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.upload-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 3px;
    transition: width 0.2s;
    width: 0%;
}

.upload-progress-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: right;
    font-weight: 600;
}
