/* Institute Management System - Design System Stylesheet */

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

:root {
    /* Premium Glassmorphic Theme Variables */
    --bg-primary: #f8fafc;
    --bg-secondary: rgba(255, 255, 255, 0.45);
    --bg-glass: rgba(255, 255, 255, 0.45);
    --border-color: rgba(255, 255, 255, 0.4);
    --border-glow: rgba(99, 102, 241, 0.25);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --accent-primary: #6366f1; /* Indigo */
    --accent-secondary: #a855f7; /* Purple */
    --accent-gradient: linear-gradient(135deg, #6366f1, #a855f7);
    --accent-gradient-hover: linear-gradient(135deg, #4f46e5, #9333ea);

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --info: #06b6d4;
    --info-bg: rgba(6, 182, 212, 0.12);

    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.04), inset 0 8px 32px 0 rgba(255, 255, 255, 0.15);
    --sidebar-width: 260px;
    --transition-speed: 0.3s;
}

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: linear-gradient(
        135deg,
        #f8fafc 0%,
        #f1f5f9 25%,
        #e2e8f0 50%,
        #eef2ff 75%,
        #f5f3ff 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.12),
                0 0 24px rgba(168, 85, 247, 0.08),
                inset 0 8px 32px 0 rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-4px) scale(1.005);
}

/* Animated gradient text */
.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* Theme adaptive primary text */
.text-theme-primary {
    color: var(--text-primary) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.3);
}

/* Base Buttons */
.btn-primary-custom {
    background: var(--accent-gradient);
    border: none;
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

.btn-primary-custom:hover {
    background: var(--accent-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
    color: #ffffff;
}

.btn-secondary-custom {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.btn-secondary-custom:hover {
    background: rgba(255, 255, 255, 0.65);
    border-color: var(--border-glow);
    transform: translateY(-2px);
    color: var(--text-primary);
}

/* Form Styling */
.form-control-custom {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--border-color);
    color: var(--text-primary) !important;
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.25s ease;
}

.form-control-custom:focus {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    outline: none;
}

.form-label-custom {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-size: 0.9rem;
}

/* Sidebar Styling */
.sidebar {
    position: fixed;
    top: 16px;
    left: 16px;
    height: calc(100vh - 32px);
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    z-index: 1000;
    transition: all var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-menu {
    list-style: none;
    padding: 16px 8px;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-item {
    margin-bottom: 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-link:hover,
.sidebar-item.active .sidebar-link {
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent-primary);
}

.sidebar-link i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

/* Main Content Wrapper */
.main-wrapper {
    margin-left: calc(var(--sidebar-width) + 32px);
    min-height: 100vh;
    transition: all var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    padding-right: 16px;
    font-size: 0.88rem; /* Slightly smaller default dashboard font size */
}

.sidebar {
    font-size: 0.88rem;
}

.main-wrapper h2 {
    font-size: 1.65rem !important; /* Sleeker dashboard section headings */
}
.main-wrapper h3 {
    font-size: 1.45rem !important;
}
.main-wrapper h5 {
    font-size: 1.1rem !important;
}

/* Header/Topbar */
.topbar {
    height: 70px;
    margin-top: 16px;
    margin-bottom: 16px;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 16px;
    z-index: 999;
}

.content-container {
    padding: 16px 8px 24px;
    flex-grow: 1;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
}

/* Quick Stats Section */
.stat-card {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2px;
    margin-bottom: 0;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
}

/* Global Table Theme Adapters */
.table {
    --bs-table-bg: transparent !important;
    --bs-table-color: inherit !important;
    background-color: transparent !important;
}

/* Tables custom design */
.table-custom {
    color: var(--text-primary) !important;
}

.table-custom th {
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom-width: 1px;
    border-color: rgba(255, 255, 255, 0.3) !important;
    padding: 14px 16px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-custom td {
    padding: 14px 16px;
    border-color: rgba(255, 255, 255, 0.2) !important;
    vertical-align: middle;
}

.table-custom tbody tr {
    transition: background-color 0.2s ease;
}

.table-custom tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

/* Badge custom design */
.badge-custom {
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-present,
.badge-paid {
    color: var(--success);
    background-color: var(--success-bg);
}

.badge-late,
.badge-partial {
    color: var(--warning);
    background-color: var(--warning-bg);
}

.badge-absent,
.badge-pending {
    color: var(--danger);
    background-color: var(--danger-bg);
}

/* Custom Tab Styling */
.nav-tabs-custom {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    gap: 8px;
}

.nav-tabs-custom .nav-link {
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 12px 18px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: transparent;
}

.nav-tabs-custom .nav-link:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.25);
}

.nav-tabs-custom .nav-link.active {
    background: var(--accent-gradient);
    color: #ffffff;
}

/* ===== COMPREHENSIVE RESPONSIVE RULES ===== */

/* --- Tablets & Small Desktops (max-width: 992px) --- */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    /* Dark backdrop when sidebar is open */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.35);
        z-index: 999;
        transition: opacity 0.3s ease;
    }

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

    .main-wrapper {
        margin-left: 0;
    }

    .toggle-sidebar-btn {
        display: block !important;
    }

    .content-container {
        padding: 16px;
    }

    /* Stat cards: 2 per row on tablets */
    .stat-card {
        padding: 18px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    /* Glass card padding reduce */
    .glass-card.p-4 {
        padding: 1rem !important;
    }

    /* Topbar compact */
    .topbar {
        padding: 0 12px;
        height: 60px;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* Landing hero reduce padding */
    .landing-hero {
        padding: 120px 0 60px;
    }

    .landing-section {
        padding: 60px 0;
    }
}

@media (min-width: 993px) {
    .toggle-sidebar-btn {
        display: none !important;
    }
}

/* --- Small Tablets & Large Phones (max-width: 768px) --- */
@media (max-width: 768px) {
    .content-container {
        padding: 12px;
    }

    .stat-value {
        font-size: 1.35rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
        border-radius: 10px;
    }

    /* Table cells tighter padding */
    .table-custom th,
    .table-custom td {
        padding: 10px 10px;
        font-size: 0.82rem;
    }

    /* Forms in rows: stack them */
    .row.g-3>[class*="col-md-"],
    .row.g-4>[class*="col-md-"] {
        /* Bootstrap handles this via col-md breakpoint, this is a fallback */
    }

    /* Section titles smaller */
    .section-title {
        font-size: 1.7rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    /* Landing hero */
    .landing-hero {
        padding: 110px 0 50px;
    }

    /* Stats banner */
    .stat-number {
        font-size: 2rem;
    }

    /* Login card compact */
    .login-card {
        padding: 28px 24px;
        max-width: 400px;
    }

    /* Module cards compact */
    .module-card {
        padding: 20px;
    }

    /* Footer compact */
    .landing-footer {
        padding: 40px 0 20px;
    }

    /* Topbar profile text hide on small screens */
    .topbar .text-end .text-secondary {
        display: none;
    }
}

/* --- Mobile Phones (max-width: 576px) --- */
@media (max-width: 576px) {
    body {
        font-size: 0.92rem;
    }

    .content-container {
        padding: 10px;
    }

    /* Stat cards stack to full width */
    .stat-card {
        padding: 14px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .stat-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        border-radius: 8px;
    }

    /* Glass cards even tighter */
    .glass-card.p-4 {
        padding: 0.75rem !important;
    }

    .glass-card {
        border-radius: 12px;
    }

    /* Topbar minimal */
    .topbar {
        height: 56px;
        padding: 0 8px;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* Hide user name on very small screens, keep avatar */
    .topbar .text-end {
        display: none;
    }

    /* Tables: smaller font, tighter cells */
    .table-custom th,
    .table-custom td {
        padding: 8px 6px;
        font-size: 0.75rem;
    }

    .table-custom th {
        letter-spacing: 0;
    }

    /* Badge sizing */
    .badge-custom {
        font-size: 0.65rem;
        padding: 4px 8px;
    }

    /* Buttons compact */
    .btn-primary-custom,
    .btn-secondary-custom {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    /* Form inputs compact */
    .form-control-custom {
        padding: 10px 12px;
        font-size: 0.88rem;
    }

    /* Landing Hero phone sizing */
    .landing-hero {
        padding: 100px 0 40px;
        min-height: auto !important;
    }

    .hero-title {
        font-size: 1.6rem;
        letter-spacing: -0.5px;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    /* Hero CTA buttons stack full width */
    .landing-hero .d-flex.flex-sm-row {
        flex-direction: column !important;
    }

    .landing-hero .btn {
        width: 100%;
    }

    /* Stats banner */
    .stats-banner {
        padding: 30px 0;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .stat-desc {
        font-size: 0.8rem;
    }

    /* Sections */
    .landing-section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .section-subtitle {
        font-size: 0.85rem;
        margin-bottom: 30px;
    }

    /* Login page */
    .login-card {
        padding: 24px 18px;
        max-width: 100%;
        margin: 0 8px;
    }

    .login-body .display-5 {
        font-size: 1.6rem !important;
    }

    /* Footer */
    .landing-footer {
        padding: 30px 0 16px;
    }

    .footer-brand {
        font-size: 1.2rem;
        justify-content: center !important;
    }

    /* FAQ */
    .faq-accordion .accordion-button {
        padding: 14px;
        font-size: 0.9rem;
    }

    .faq-accordion .accordion-body {
        padding: 14px;
        font-size: 0.85rem;
    }

    /* Modals fullscreen on mobile */
    .modal-dialog {
        margin: 8px;
    }

    .modal-content {
        border-radius: 14px !important;
    }

    /* Sidebar responsive width on phone */
    .sidebar {
        width: 280px;
        max-width: 85%;
    }

    /* d-flex header bars: stack when too tight */
    .d-flex.justify-content-between.align-items-center {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Quick action buttons in admin dashboard */
    .row .col-6 .btn {
        font-size: 0.8rem;
        padding: 10px 8px;
    }

    /* Timetable scroll */
    .timetable-grid {
        font-size: 0.8rem;
    }

    /* Navbar */
    .landing-navbar .navbar-brand {
        font-size: 1.1rem !important;
    }

    .landing-navbar .btn-primary-custom {
        width: 100%;
        text-align: center;
    }

    /* Benefit cards compact */
    .benefit-card {
        padding: 16px;
    }

    .benefit-icon {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }

    /* Module card compact */
    .module-icon-wrapper {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
        margin-bottom: 14px;
    }

    .module-features-list li {
        font-size: 0.8rem;
    }
}

/* Alert modifications */
.alert-custom {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 16px;
    margin-bottom: 20px;
}

/* Floating Actions */
.hover-scale {
    transition: transform 0.2s ease;
}

.hover-scale:hover {
    transform: translateY(-3px);
}

/* Login Page Specfic styles */
.login-body {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 40px;
}

/* Timetable styling */
.timetable-grid {
    display: grid;
    grid-template-columns: 100px 1fr;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.timetable-header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 12px;
    font-weight: 600;
    text-align: center;
}

.timetable-cell {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

/* Landing Page Styles */
.landing-navbar {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    top: 20px;
    border-radius: 100px;
    width: calc(100% - 40px);
    max-width: 1200px;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    animation: navbarFadeIn 0.8s ease forwards;
    z-index: 1050;
    padding-top: 12px;
    padding-bottom: 12px;
}

@keyframes navbarFadeIn {
    0% {
        transform: translateY(-50px) translateX(-50%);
        opacity: 0;
    }
    100% {
        transform: translateY(0) translateX(-50%);
        opacity: 1;
    }
}

.landing-navbar.scrolled {
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
    top: 20px;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.landing-hero {
    padding: 140px 0 90px;
    background: transparent;
}

.landing-hero>.container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto;
}

/* Mobile Navbar Collapsed Menu Styling */
@media (max-width: 991.98px) {
    .landing-navbar .navbar-collapse {
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 20px;
        margin-top: 15px;
        box-shadow: var(--card-shadow);
    }
}

.landing-section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
}

.section-subtitle {
    color: var(--text-secondary);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 50px;
}

/* Module Showcase Card */
.module-card {
    height: 100%;
    padding: 30px;
    border-radius: 20px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.module-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.12);
}

.module-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.8rem;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25);
}

.module-features-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}

.module-features-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.module-features-list li i {
    color: var(--accent-primary);
}

/* Stats Card */
.stats-banner {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 50px 0;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: #ffffff;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    margin-bottom: 5px;
}

.stat-desc {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

/* Feature/Benefit Card */
.benefit-card {
    padding: 24px;
    border-radius: 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    transition: all 0.25s ease;
}

.benefit-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-3px);
}

.benefit-icon {
    font-size: 2.2rem;
    color: var(--accent-primary);
    margin-bottom: 15px;
}

/* FAQ Card */
/* FAQ Custom Apple Messages Accordion */
.faq-accordion {
    background: transparent !important;
    border: none !important;
}

.faq-accordion .accordion-item {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
    padding: 14px 0 !important;
}

.faq-accordion .accordion-button {
    background: transparent !important;
    color: var(--text-primary) !important;
    font-weight: 700;
    border: none !important;
    box-shadow: none !important;
    padding: 16px 0 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-align: left;
}

/* Hide default Bootstrap arrow */
.faq-accordion .accordion-button::after {
    display: none !important;
}

/* Pill container for question text */
.faq-question-pill {
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-primary);
    border-radius: 50px;
    padding: 10px 24px;
    display: inline-block;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 1rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

/* Expanded state of the question text */
.faq-accordion .accordion-button:not(.collapsed) .faq-question-pill {
    background: transparent !important;
    color: #00a8cc !important; /* Cyan-blue color */
    padding-left: 0 !important;
    padding-right: 0 !important;
    transform: scale(1.02);
    box-shadow: none !important;
}

/* Interactive Plus/Minus Morphing Icon */
.faq-plus-minus {
    position: relative;
    width: 18px;
    height: 18px;
    display: inline-block;
    flex-shrink: 0;
    margin-left: 20px;
}

.faq-plus-minus::before,
.faq-plus-minus::after {
    content: '';
    position: absolute;
    background-color: var(--text-secondary);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.4s ease;
}

/* Horizontal line */
.faq-plus-minus::before {
    top: 8px;
    left: 0;
    width: 18px;
    height: 2px;
    border-radius: 2px;
}

/* Vertical line */
.faq-plus-minus::after {
    top: 0;
    left: 8px;
    width: 2px;
    height: 18px;
    border-radius: 2px;
}

/* Morph to minus when expanded */
.faq-accordion .accordion-button:not(.collapsed) .faq-plus-minus::after {
    transform: scaleY(0);
}

.faq-accordion .accordion-button:not(.collapsed) .faq-plus-minus::before {
    background-color: #00a8cc !important;
    transform: rotate(180deg);
}

/* Chat bubble for answer text */
.faq-accordion .accordion-collapse {
    border: none !important;
}

.faq-accordion .accordion-body {
    max-width: 65%;
    margin-left: auto;
    margin-right: 0;
    background: #005e80 !important; /* Premium dark teal/blue bubble */
    color: #ffffff !important;
    padding: 16px 24px !important;
    border-radius: 20px 20px 4px 20px !important; /* Apple Message style bubble shape */
    box-shadow: 0 10px 30px rgba(0, 94, 128, 0.2), inset 0 4px 12px rgba(255,255,255,0.1);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05) !important;
    /* Morphing scale animation origin */
    transform-origin: right top;
}

.landing-footer {
    background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 60px 0 30px;
    color: #ffffff !important;
}

.landing-footer .footer-brand.gradient-text,
.landing-footer .footer-brand i {
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
}

.landing-footer h6 {
    color: #ffffff !important;
}

.landing-footer .text-secondary {
    color: rgba(255, 255, 255, 0.8) !important;
}

.landing-footer a.text-secondary {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: color 0.2s ease, transform 0.2s ease;
}

.landing-footer a.text-secondary:hover {
    color: #ffffff !important;
}

.landing-footer hr {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}



/* ===== NEW RESPONSIVE FIXES ===== */

/* Responsive Form Dividers */
@media (min-width: 768px) {
    .border-start-md {
        border-left: 1px solid var(--border-color) !important;
        padding-left: 24px !important;
    }
}

/* Actions nowrap in table cells */
.table-custom td:last-child {
    white-space: nowrap;
}

/* Search input groups responsiveness */
.search-input-group {
    width: 100% !important;
}

@media (min-width: 577px) {
    .search-input-group {
        width: 500px !important;
    }
}

/* ── Animated Gradient Background (Home Page) ───────────────── */
.animated-gradient-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        135deg,
        #eef2ff,   /* indigo-50  */
        #ede9fe,   /* violet-100 */
        #dbeafe,   /* blue-100   */
        #fae8ff,   /* fuchsia-100*/
        #e0f2fe,   /* sky-100    */
        #ede9fe    /* back to violet */
    );
    background-size: 400% 400%;
    animation: gradientShift 14s ease infinite;
    pointer-events: none;
}

@keyframes gradientShift {
    0%   { background-position: 0%   50%; }
    25%  { background-position: 50%  0%;  }
    50%  { background-position: 100% 50%; }
    75%  { background-position: 50%  100%;}
    100% { background-position: 0%   50%; }
}

/* ── Typewriter Cursor ───────────────────────────────────────── */
.typing-cursor {
    display: inline-block;
    font-weight: 300;
    color: #6366f1;
    margin: 0 1px;
    animation: cursorBlink 0.75s step-end infinite;
    vertical-align: baseline;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ── Report Card Print & Custom styling ── */
.btn-custom-back {
    border-radius: 0.5rem;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
}

@media print {
    /* Hide non-printable items */
    .sidebar, .topbar, .no-print, header, footer, .breadcrumb, .d-flex.justify-content-between.align-items-center.mb-4 {
        display: none !important;
    }
    
    /* Reset main content container layout for printing */
    .main-wrapper, .content-container {
        margin-left: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    body {
        background: #ffffff !important;
        color: #000000 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Format report card for single page print */
    .print-report-card {
        background: #ffffff !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .table {
        border-color: #000000 !important;
    }

    .table td, .table th {
        color: #000000 !important;
        background: transparent !important;
        border-bottom: 1px solid #000000 !important;
    }

    .text-primary, .text-success, .text-info, .text-warning, .text-danger, .gradient-text {
        color: #000000 !important;
        -webkit-text-fill-color: #000000 !important;
        background: transparent !important;
    }
}

/* ── Scroll Reveal and Blur Reveal Animations ──────────────── */
.reveal {
    opacity: 0;
    transition: opacity 0.9s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.7s ease-in-out;
    will-change: transform, opacity, filter;
}

.blur-reveal {
    filter: blur(12px);
    transform: translateY(30px) scale(0.96);
}

.slide-left-reveal {
    transform: translateX(-40px);
}

.slide-right-reveal {
    transform: translateX(40px);
}

.reveal.revealed {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) translateX(0) scale(1);
}

/* Stagger animations for list groups or grid rows */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

/* Add custom transition delay counters for child elements */
.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.1s; }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.18s; }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.26s; }
.reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.34s; }
.reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.42s; }
.reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.5s; }

/* ── Floating Glow Blobs Animations ──────────────────────── */
.floating-blob-1 {
    animation: floatBlob1 18s ease-in-out infinite;
}

.floating-blob-2 {
    animation: floatBlob2 22s ease-in-out infinite;
}

@keyframes floatBlob1 {
    0%   { transform: translate(0px, 0px) scale(1); }
    33%  { transform: translate(60px, -80px) scale(1.15); }
    66%  { transform: translate(-40px, 40px) scale(0.85); }
    100% { transform: translate(0px, 0px) scale(1); }
}

@keyframes floatBlob2 {
    0%   { transform: translate(0px, 0px) scale(1); }
    50%  { transform: translate(-80px, 80px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

/* ── Apple Messages Bouncy Accordion (FAQ) ───────────────── */
.faq-accordion .accordion-collapse {
    transition: height 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.faq-accordion .accordion-body {
    transform: translateY(-15px) scale(0.96);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
}

.faq-accordion .accordion-item .accordion-button:not(.collapsed) + .accordion-collapse .accordion-body,
.faq-accordion .accordion-collapse.show .accordion-body {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Apple Messages Bouncy Hover Scale for Interactive Items */
.btn-primary-custom, .btn-secondary-custom, .sidebar-link, .module-card, .benefit-card, .faq-accordion .accordion-button {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* ── Outlined Text Styles ────────────────────────────────── */
.text-outline {
    color: transparent !important;
    -webkit-text-stroke: 1.5px var(--text-primary);
}

.text-outline-gradient {
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px currentColor;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
}

/* ── Thematic Glass Cards (Red, Blue, Purple, Green, Yellow) ──── */
.card-theme-red {
    background: rgba(254, 242, 242, 0.45) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
}
.card-theme-red:hover {
    border-color: rgba(239, 68, 68, 0.45) !important;
    box-shadow: 0 20px 40px rgba(239, 68, 68, 0.08), 0 0 24px rgba(239, 68, 68, 0.04) !important;
}

.card-theme-blue {
    background: rgba(239, 246, 255, 0.45) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
}
.card-theme-blue:hover {
    border-color: rgba(59, 130, 246, 0.45) !important;
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.08), 0 0 24px rgba(59, 130, 246, 0.04) !important;
}

.card-theme-purple {
    background: rgba(250, 245, 255, 0.45) !important;
    border: 1px solid rgba(168, 85, 247, 0.2) !important;
}
.card-theme-purple:hover {
    border-color: rgba(168, 85, 247, 0.45) !important;
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.08), 0 0 24px rgba(168, 85, 247, 0.04) !important;
}

.card-theme-green {
    background: rgba(240, 253, 250, 0.45) !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}
.card-theme-green:hover {
    border-color: rgba(16, 185, 129, 0.45) !important;
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.08), 0 0 24px rgba(16, 185, 129, 0.04) !important;
}

.card-theme-yellow {
    background: rgba(254, 252, 232, 0.45) !important;
    border: 1px solid rgba(234, 179, 8, 0.2) !important;
}
.card-theme-yellow:hover {
    border-color: rgba(234, 179, 8, 0.45) !important;
    box-shadow: 0 20px 40px rgba(234, 179, 8, 0.08), 0 0 24px rgba(234, 179, 8, 0.04) !important;
}

/* ── Creative Floating Badges ── */
.creative-badge {
    position: absolute;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 3;
    pointer-events: auto;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.03), inset 0 8px 32px 0 rgba(255, 255, 255, 0.2);
    animation: floatAnimation 6s ease-in-out infinite;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.creative-badge:hover {
    transform: scale(1.1) translateY(-6px) !important;
    box-shadow: var(--badge-glow);
}

.creative-badge.badge-red {
    background: rgba(254, 242, 242, 0.65) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    color: #ef4444 !important;
    --badge-glow: 0 15px 30px rgba(239, 68, 68, 0.25);
    animation-delay: 0s;
}

.creative-badge.badge-blue {
    background: rgba(239, 246, 255, 0.65) !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    color: #3b82f6 !important;
    --badge-glow: 0 15px 30px rgba(59, 130, 246, 0.25);
    animation-delay: 1.5s;
}

.creative-badge.badge-purple {
    background: rgba(250, 245, 255, 0.65) !important;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
    color: #a855f7 !important;
    --badge-glow: 0 15px 30px rgba(168, 85, 247, 0.25);
    animation-delay: 3s;
}

.creative-badge.badge-green {
    background: rgba(240, 253, 250, 0.65) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    color: #10b981 !important;
    --badge-glow: 0 15px 30px rgba(16, 185, 129, 0.25);
    animation-delay: 4.5s;
}

.creative-badge.badge-yellow {
    background: rgba(254, 252, 232, 0.65) !important;
    border: 1px solid rgba(234, 179, 8, 0.3) !important;
    color: #eab308 !important;
    --badge-glow: 0 15px 30px rgba(234, 179, 8, 0.25);
    animation-delay: 2.2s;
}

@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-12px) rotate(1.5deg);
    }
}

/* Ensure landing-hero supports absolute children correctly */
.landing-hero {
    position: relative;
}
.landing-section {
    position: relative;
}
.login-body {
    position: relative;
}