/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

img {
    max-width: 100%;
    height: auto;
}

/* ===== App Layout ===== */
.app-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-main {
    flex: 1;
}

/* ===== Navbar ===== */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 1.5rem;
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.025em;
}

.navbar-brand:hover {
    color: var(--primary);
}

.navbar-brand .brand-icon {
    width: 2.25rem;
    height: 2.25rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.navbar-menu li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.navbar-menu li a:hover,
.navbar-menu li a.active {
    color: var(--primary);
    background: var(--primary-bg);
}

.navbar-menu li a.nav-btn {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.navbar-menu li a.nav-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.navbar-menu li a.nav-btn-outline {
    border: 2px solid var(--gray-200);
    background: transparent;
    color: var(--gray-700);
    box-shadow: none;
}

.navbar-menu li a.nav-btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
    transform: translateY(-1px);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--gray-600);
    font-size: 1.5rem;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem 0.4rem 0.4rem;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    cursor: pointer;
    transition: var(--transition);
}

.user-badge:hover {
    background: var(--gray-200);
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: white;
    padding: 6rem 1.5rem 8rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 50%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: var(--gray-400);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.hero-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    color: white;
}

.hero-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: white;
}

/* ===== Features Section ===== */
.features {
    padding: 5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.features-header {
    text-align: center;
    margin-bottom: 4rem;
}

.features-header h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.features-header p {
    color: var(--gray-500);
    font-size: 1.1rem;
    max-width: 550px;
    margin: 0 auto;
}

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

.feature-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transform: scaleX(0);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    background: var(--primary-bg);
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.feature-card p {
    color: var(--gray-500);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== Stats Section ===== */
.stats-section {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    padding: 4rem 1.5rem;
}

.stats-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.stat-item p {
    color: var(--gray-500);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

/* ===== CTA Section ===== */
.cta-section {
    padding: 5rem 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--gray-900), var(--dark));
    color: white;
}

.cta-section h2 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.cta-section p {
    color: var(--gray-400);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 2rem;
}

/* ===== Admin Sidebar ===== */
.admin-sidebar nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid var(--gray-100);
    transition: var(--transition);
    text-decoration: none;
}
.admin-sidebar nav a:last-child {
    border-bottom: none;
}
.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
    background: var(--primary-bg);
    color: var(--primary);
}
.admin-sidebar nav a.active {
    font-weight: 600;
}

/* ===== Dashboard ===== */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.02em;
}

.dashboard-header p {
    color: var(--gray-500);
    font-size: 0.95rem;
}

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

.dashboard-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: var(--transition);
}

.dashboard-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gray-300);
}

.dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dashboard-card-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.dashboard-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
}

.dashboard-card .card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.dashboard-card .card-label {
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* ===== Profile Page ===== */
.profile-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.profile-header-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.profile-cover {
    height: 150px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.profile-info {
    padding: 0 2rem 2rem;
    margin-top: -3rem;
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.profile-avatar-lg {
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-lg);
}

.profile-details h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.profile-details p {
    color: var(--gray-500);
}

.profile-form {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 2rem;
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--gray-800);
    background: var(--white);
    transition: var(--transition);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

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

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' 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 1rem center;
    padding-right: 2.5rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
    color: white;
}

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

.btn-success:hover {
    background: #059669;
    color: white;
}

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

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

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--gray-200);
    color: var(--gray-700);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.9rem 2rem;
    font-size: 1rem;
}

/* ===== Alerts ===== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-info {
    background: var(--primary-bg);
    border: 1px solid #c7d2fe;
    color: #4338ca;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

/* ===== Page Header ===== */
.page-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem 1.5rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--gray-500);
    font-size: 1rem;
}

/* ===== Auth Pages ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.auth-card-header {
    padding: 1.5rem 2rem 1rem;
	margin-bottom: 0.5rem;
    text-align: center;
	border-bottom: 1px solid var(--gray-300);
}

.auth-card-header .auth-logo {
    /*
	width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
	*/
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.auth-card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.auth-card-header p {
    color: var(--gray-500);
    font-size: 0.95rem;
}

.auth-card-body {
    padding: 0 2rem 1.5rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    color: var(--gray-400);
    font-size: 0.85rem;
}

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

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--gray-500);
}

.auth-link a {
    color: var(--primary);
    font-weight: 600;
}

/* ===== Footer ===== */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 3rem 1.5rem;
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.footer-links a {
    color: var(--gray-400);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--white);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.25rem;
    }

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

    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--gray-200);
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
        box-shadow: var(--shadow-lg);
    }

    .navbar-menu.open {
        display: flex;
    }

    .navbar-toggle {
        display: block;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .features-header h2,
    .cta-section h2 {
        font-size: 1.75rem;
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    .auth-card {
        box-shadow: none;
        background: transparent;
    }

    .auth-card-header h2,
    .auth-card-header p {
        color: white;
    }

    .auth-card-header p {
        color: var(--gray-400);
    }

    .auth-link {
        color: var(--gray-400);
    }

    .auth-link a {
        color: var(--primary-light);
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .hero-btn-primary,
    .hero-actions .hero-btn-secondary {
        width: 100%;
        justify-content: center;
    }

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

/* ===== Toast Notifications ===== */
.fb-toast-container {
    position: fixed;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    pointer-events: none;
    max-width: 400px;
    width: 100%;
}

.fb-toast-top-right {
    top: 1.25rem;
    right: 1.25rem;
}

.fb-toast-top-left {
    top: 1.25rem;
    left: 1.25rem;
}

.fb-toast-bottom-right {
    bottom: 1.25rem;
    right: 1.25rem;
}

.fb-toast-bottom-left {
    bottom: 1.25rem;
    left: 1.25rem;
}

.fb-toast-top-center {
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    max-width: min(500px, calc(100vw - 2.5rem));
}

.fb-toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--gray-300);
    pointer-events: auto;
    transition: box-shadow 0.2s ease;
    max-width: 100%;
}

.fb-toast:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.fb-toast-success {
    border-left-color: var(--success);
}
.fb-toast-success .fb-toast-icon { color: var(--success); }

.fb-toast-error {
    border-left-color: var(--danger);
}
.fb-toast-error .fb-toast-icon { color: var(--danger); }

.fb-toast-warning {
    border-left-color: var(--warning);
}
.fb-toast-warning .fb-toast-icon { color: var(--warning); }

.fb-toast-info {
    border-left-color: var(--info);
}
.fb-toast-info .fb-toast-icon { color: var(--info); }

.fb-toast-icon {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.125rem;
}

.fb-toast-body {
    flex: 1;
    min-width: 0;
}

.fb-toast-message {
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--gray-800);
    word-break: break-word;
}

.fb-toast-action {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.25rem 0;
    margin-top: 0.25rem;
    transition: var(--transition);
    display: inline-block;
    font-family: inherit;
}

.fb-toast-action:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.fb-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--gray-400);
    transition: var(--transition);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.125rem;
}

.fb-toast-close:hover {
    color: var(--gray-600);
    background: var(--gray-100);
}

/* Toast animations */
@keyframes fbToastIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes fbToastOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.95);
    }
}

.fb-toast-enter {
    animation: fbToastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fb-toast-leave {
    animation: fbToastOut 0.25s ease-in forwards;
}

/* Toast left-position animations */
.fb-toast-top-left .fb-toast-enter {
    animation-name: fbToastInLeft;
}
.fb-toast-top-left .fb-toast-leave {
    animation-name: fbToastOutLeft;
}

@keyframes fbToastInLeft {
    from { opacity: 0; transform: translateX(-100%) scale(0.95); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes fbToastOutLeft {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to   { opacity: 0; transform: translateX(-100%) scale(0.95); }
}

/* ===== Modal / Dialog ===== */
.fb-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.fb-modal-open {
    opacity: 1;
    visibility: visible;
}

.fb-modal-box {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    max-width: 440px;
    width: 100%;
    transform: scale(0.92) translateY(12px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.fb-modal-open .fb-modal-box {
    transform: scale(1) translateY(0);
}

.fb-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.5rem 1.5rem 0.5rem;
}

.fb-modal-icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fb-modal-danger .fb-modal-icon {
    background: #fef2f2;
    color: var(--danger);
}
.fb-modal-warning .fb-modal-icon {
    background: #fffbeb;
    color: var(--warning);
}
.fb-modal-default .fb-modal-icon {
    background: var(--primary-bg);
    color: var(--primary);
}

.fb-modal-title {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-top: 0.2rem;
}

.fb-modal-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.fb-modal-close:hover {
    color: var(--gray-600);
    background: var(--gray-100);
}

.fb-modal-body {
    padding: 0.75rem 1.5rem 1rem;
}

.fb-modal-body p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--gray-600);
}

.fb-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem 1.5rem;
}

/* ===== Spinner ===== */
.fb-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: fbSpin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 0.25rem;
}

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

/* Button loading state */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== Countdown progress bar on toasts ===== */
.fb-toast-bar-wrap {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gray-100);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
}

.fb-toast-bar {
    height: 100%;
    width: 100%;
    border-radius: 0 0 0 var(--radius-lg);
    transition: none; /* set by JS */
}

.fb-toast-bar-success { background: var(--success); }
.fb-toast-bar-error { background: var(--danger); }
.fb-toast-bar-warning { background: var(--warning); }
.fb-toast-bar-info { background: var(--info); }

.fb-toast-time {
    position: absolute;
    right: 0.5rem;
    bottom: 0.2rem;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--gray-400);
    letter-spacing: 0.02em;
    line-height: 1;
}

/* ===== Undo button on toasts ===== */
.fb-toast-undo-row {
    margin-top: 0.4rem;
    display: flex;
    gap: 0.5rem;
}

.fb-toast-undo-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.fb-toast-undo-btn:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
    color: var(--dark);
}

.fb-toast-undo-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Toast with undo has extra bottom padding for the bar */
.fb-toast-undoable {
    padding-bottom: 1.5rem;
}

/* ===== Remove animation (for data-remove) ===== */
.fb-remove {
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(20px);
}

/* ===== Form validation helpers ===== */
.is-invalid {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.invalid-feedback {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

/* ===== Flash data container (hidden) ===== */
#fb-flash-data {
    display: none;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

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

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* ===== Utility ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
