/* =========================================================
   Trovy – Violet/Ink/Lilac Premium Design System
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;1,6..72,400&family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

/* =========================================================
   DESIGN TOKENS (Trovy Official Palette)
   ========================================================= */
:root {
    /* Brand Primary – Trovy Violet */
    --primary-color: #675CF5;
    --primary-hover: #5143f4;
    --primary-deep: #4d40db;
    --primary-glow: rgba(103, 92, 245, 0.10);
    --primary-glow-light: rgba(103, 92, 245, 0.05);

    /* Secondary / Accent Palette – Trovy Lilac */
    --secondary-color: #8F86FF;
    --accent-color: #675CF5;
    --dark-panel: #15122F;
    --color-success: #2e7d32;
    --color-success-bg: rgba(46, 125, 50, 0.08);
    --color-warning: #d97706;
    --color-warning-bg: rgba(217, 119, 6, 0.08);
    --color-danger: #ba1a1a;
    --color-danger-bg: rgba(186, 26, 26, 0.08);

    /* Multi-color accents (for cards) */
    --violet-50: #f5f3ff;
    --violet-100: #ede9fe;
    --violet-600: #675CF5;
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-600: #059669;
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-600: #d97706;
    --sky-50: #f0f9ff;
    --sky-600: #0284c7;

    /* Backgrounds – Trovy Canvas */
    --bg-color: #EFE9DF;
    --bg-card: #ffffff;
    --bg-card-hover: #faf8f7;
    --bg-surface-dim: #EFE9DF;

    /* Text – Trovy Ink */
    --text-primary: #12101E;
    --text-secondary: #405261;
    --text-muted: #556575;

    /* Borders */
    --border-color: #ede8e6;
    --border-color-glow: #dfe6eb;

    /* Gradients */
    --gradient-accent: linear-gradient(135deg, #675CF5 0%, #847af7 100%);
    --gradient-accent-light: linear-gradient(135deg, rgba(103,92,245,0.04) 0%, rgba(132,122,247,0.04) 100%);
    --gradient-hero: linear-gradient(180deg, #faf8f7 0%, #ede8e6 100%);

    /* Shadows – Multi-stop with inset border */
    --shadow-sm: 0 1px 2px rgba(19,27,36,0.05), inset 0 0 0 1px var(--border-color-glow);
    --shadow-md: 0 4px 12px rgba(19,27,36,0.04), 0 12px 24px rgba(19,27,36,0.02), inset 0 0 0 1px var(--border-color-glow);
    --shadow-lg: 0 8px 16px rgba(19,27,36,0.04), 0 20px 48px rgba(19,27,36,0.03), inset 0 0 0 1px var(--border-color-glow);
    --shadow-glow: 0 0 0 3px rgba(103,92,245,0.15);
    --shadow-card-hover: 0px 12px 30px rgba(103,92,245,0.12);

    /* Radii */
    --border-radius-sm: 0.5rem;
    --border-radius-md: 0.75rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
    --border-radius-2xl: 1.75rem;
    --border-radius-3xl: 2rem;

    /* Typography */
    --font-heading: 'Plus Jakarta Sans', 'Helvetica Neue', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-serif: 'Newsreader', Georgia, serif;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================
   BASE TYPOGRAPHY
   ========================================================= */
body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Make all placeholders lighter */
::placeholder {
    color: #b0b0b0 !important;
    opacity: 1 !important;
}

p {
    color: var(--text-secondary);
}

/* Material Symbols */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* =========================================================
   BOOTSTRAP OVERRIDES – Color Mapping
   ========================================================= */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-light {
    background-color: var(--bg-surface-dim) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* =========================================================
   CARDS & CONTAINERS
   ========================================================= */
.card, .glass-panel {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-xl) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: var(--transition);
}

.card:hover, .card-hover:hover {
    box-shadow: var(--shadow-md) !important;
    transform: translateY(-4px);
    border-color: var(--primary-color) !important;
}

.card-body {
    padding: 1.5rem !important;
}

/* Glass Card (Glassmorphism) */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius-xl);
    transition: var(--transition);
}

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

/* Glow Card */
.glow-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    transition: var(--transition);
}

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

/* =========================================================
   BUTTONS & LINKS
   ========================================================= */
.btn {
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    padding: 0.6rem 1.25rem;
    transition: var(--transition);
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--gradient-accent);
    border-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(103, 92, 245, 0.2);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

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

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

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

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

/* Gradient Text Utility */
.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================================
   NAVBAR (Professional Header)
   ========================================================= */
.navbar {
    background: rgba(250, 248, 247, 0.92) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: none;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--text-primary) !important;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    transition: var(--transition-fast);
    letter-spacing: 0.02em;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link.active {
    color: var(--primary-deep) !important;
    font-weight: 700;
}

/* Nav Pills & Sub-tab Switchers (Capsule design) */
.nav-pills {
    gap: 0.35rem;
}

.nav-pills .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 600;
    border-radius: 9999px !important;
    padding: 0.5rem 1.25rem !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border: none;
}

.nav-pills .nav-link:hover:not(.active) {
    color: var(--primary-color) !important;
    background: rgba(103, 92, 245, 0.08) !important;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background: var(--gradient-accent) !important;
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(103, 92, 245, 0.35) !important;
}

.nav-pills .nav-link.active i,
.nav-pills .nav-link.active span {
    color: #ffffff !important;
}


/* =========================================================
   LIST GROUPS & SIDEBARS
   ========================================================= */
.list-group {
    border-radius: var(--border-radius-lg) !important;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color) !important;
}

.list-group-item {
    border: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    background-color: var(--bg-card) !important;
}

.list-group-item:last-child {
    border-bottom: none !important;
}

.list-group-item:hover {
    background-color: var(--bg-color) !important;
    color: var(--primary-color);
}

.list-group-item.active {
    background-color: var(--primary-glow-light) !important;
    color: var(--primary-color) !important;
    border-left: 4px solid var(--primary-color) !important;
}

/* =========================================================
   TABLES & FORMS
   ========================================================= */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table th {
    background-color: var(--bg-color);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    vertical-align: middle;
}

.table td {
    padding: 0.9rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    word-break: normal;
    overflow-wrap: normal;
}

.table td.text-nowrap,
.table th.text-nowrap,
.table .text-nowrap {
    white-space: nowrap !important;
}

.table th.text-center,
.table td.text-center {
    text-align: center !important;
}

.table th.text-end,
.table td.text-end {
    text-align: right !important;
}

.table-hover tbody tr:hover {
    background-color: rgba(103, 92, 245, 0.03) !important;
}

/* DataTables Styling & Word Alignment Fixes */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    margin-top: 1rem;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--border-color);
    padding: 0.45rem 1rem;
    transition: var(--transition);
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(103, 92, 245, 0.15);
    outline: none;
}

/* Fix sort icon spacing on DataTables headers without cramping text */
table.dataTable thead > tr > th.sorting,
table.dataTable thead > tr > th.sorting_asc,
table.dataTable thead > tr > th.sorting_desc {
    padding-right: 26px !important;
}

/* Disable sort arrows on un-sortable columns like Actions */
table.dataTable thead > tr > th.no-sort,
table.dataTable thead > tr > th[data-orderable="false"] {
    background-image: none !important;
    cursor: default !important;
    padding-right: 1rem !important;
}

table.dataTable thead > tr > th.no-sort:before,
table.dataTable thead > tr > th.no-sort:after,
table.dataTable thead > tr > th[data-orderable="false"]:before,
table.dataTable thead > tr > th[data-orderable="false"]:after {
    display: none !important;
    content: "" !important;
}

.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.7rem 1rem;
    color: var(--text-primary);
    transition: var(--transition);
    background-color: var(--bg-card);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(103, 92, 245, 0.15);
}

/* Prevent Bootstrap validation icons from overlapping custom password visibility toggle buttons */
input[type="password"],
input[data-toggle-initialized="true"],
.form-control[type="password"],
.form-control[data-toggle-initialized="true"],
.was-validated .form-control[type="password"]:invalid,
.was-validated .form-control[type="password"]:valid,
.form-control[type="password"].is-invalid,
.form-control[type="password"].is-valid,
.was-validated .form-control[data-toggle-initialized="true"]:invalid,
.was-validated .form-control[data-toggle-initialized="true"]:valid,
.form-control[data-toggle-initialized="true"].is-invalid,
.form-control[data-toggle-initialized="true"].is-valid {
    background-image: none !important;
}

/* Hide native browser password reveal icons (Edge/IE) that overlap with custom eye icon */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input::-ms-reveal,
input::-ms-clear {
    display: none !important;
}

/* =========================================================
   BADGES
   ========================================================= */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 600;
    border-radius: 9999px;
    letter-spacing: 0.03em;
}

.badge.bg-primary {
    background: var(--gradient-accent) !important;
    color: #ffffff !important;
}

.badge.bg-success {
    background-color: #10b981 !important;
    color: #ffffff !important;
}

.badge.bg-danger {
    background-color: #ef4444 !important;
    color: #ffffff !important;
}

/* Subtle / opacity badges with high contrast */
.badge.bg-primary.bg-opacity-10,
.badge.bg-opacity-10.text-primary,
.badge-subtle-primary {
    background: #ede9fe !important;
    color: #5143f4 !important;
    border: 1px solid #c4b5fd !important;
}

.badge.bg-success.bg-opacity-10,
.badge.bg-success.bg-opacity-15,
.badge.bg-opacity-10.text-success,
.badge-subtle-success {
    background: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
    background-color: var(--text-primary) !important;
}

footer h4, footer h5 {
    color: #ffffff !important;
}

footer a {
    color: var(--text-muted) !important;
    transition: var(--transition-fast);
}

footer a:hover {
    color: var(--secondary-color) !important;
}

/* =========================================================
   ALERT OVERRIDES
   ========================================================= */
.alert {
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

/* =========================================================
   HERO SECTION UTILITIES
   ========================================================= */
.hero-gradient {
    background: var(--bg-color);
    position: relative;
    overflow: hidden;
}

.hero-glow {
    background: radial-gradient(circle at 50% 50%, rgba(103, 92, 245, 0.05) 0%, rgba(250, 248, 247, 0) 70%);
}

/* Background Glows */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(103, 92, 245, 0.06) 0%, rgba(168, 85, 247, 0.02) 50%, transparent 70%);
    top: -200px;
    right: -200px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow-left {
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.04) 0%, rgba(103, 92, 245, 0.01) 50%, transparent 70%);
    bottom: -150px;
    left: -200px;
    pointer-events: none;
    z-index: 0;
}

/* =========================================================
   AUDIENCE CARDS (Student/Parent/Tutor)
   ========================================================= */
.audience-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: var(--border-radius-3xl);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: 0 8px 30px rgb(0 0 0 / 0.015);
    transition: var(--transition);
}

.audience-card .card-bg-fill {
    position: absolute;
    inset: 0;
    z-index: 0;
    transform-origin: bottom left;
    transform: scale(0);
    transition: transform 0.5s ease-out;
    border-radius: var(--border-radius-3xl);
}

.audience-card:hover .card-bg-fill {
    transform: scale(1);
}

.audience-card:hover {
    transform: translateY(-4px);
}

.audience-card .card-content {
    position: relative;
    z-index: 1;
}

/* Photo Canvas */
.photo-canvas {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 12px 24px rgba(0,0,0,0.03);
    background: var(--bg-surface-dim);
}

.photo-canvas img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.audience-card:hover .photo-canvas img {
    transform: scale(1.05);
}

/* Card Arrow Link */
.card-arrow-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    transition: var(--transition);
}

.audience-card:hover .card-arrow-link {
    gap: 1rem;
}

/* =========================================================
   FLOATING BADGE (Hero)
   ========================================================= */
.floating-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--border-radius-lg);
    padding: 0.75rem 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(103, 92, 245, 0.15);
    z-index: 20;
    transition: transform 0.3s ease;
}

.floating-badge:hover {
    transform: scale(1.05);
}

/* =========================================================
   FEATURE STRIP (Below Hero)
   ========================================================= */
.feature-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-3xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.feature-strip .feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
}

.feature-strip .feature-item + .feature-item {
    border-left: 1px solid var(--border-color);
}

.feature-icon-circle {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(103, 92, 245, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-color);
}

/* =========================================================
   PILL BADGE (Used across site)
   ========================================================= */
.pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(103, 92, 245, 0.06);
    border: 1px solid rgba(103, 92, 245, 0.15);
    border-radius: 9999px;
    padding: 0.375rem 1rem;
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* =========================================================
   CATEGORY PILLS
   ========================================================= */
.category-pill {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 9999px;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.category-pill:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(103, 92, 245, 0.3);
    transform: translateY(-2px);
}

/* =========================================================
   CTA BANNER
   ========================================================= */
.cta-banner {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-3xl);
    position: relative;
    overflow: hidden;
}

/* =========================================================
   TUTOR PROFILE CARDS
   ========================================================= */
.tutor-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.tutor-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.tutor-card .tutor-photo {
    width: 100%;
    height: 16rem;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.tutor-card:hover .tutor-photo {
    transform: scale(1.05);
}

/* =========================================================
   CONTACT PAGE TABS
   ========================================================= */
.contact-tab {
    transition: var(--transition);
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
    border-radius: var(--border-radius-md);
    padding: 0.625rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
}

.contact-tab:hover {
    background-color: rgba(103, 92, 245, 0.05);
}

.contact-tab.active-parent {
    background-color: var(--color-success);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.25);
}

.contact-tab.active-tutor {
    background-color: var(--color-warning);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}

.contact-tab.active-student {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(103, 92, 245, 0.25);
}

/* =========================================================
   FLOATING INPUT LABELS
   ========================================================= */
.floating-group {
    position: relative;
}

.floating-group input,
.floating-group select,
.floating-group textarea {
    padding-top: 1.6rem !important;
    padding-bottom: 0.6rem !important;
}

.floating-group label {
    position: absolute;
    left: 1rem;
    top: 1.1rem;
    transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
    pointer-events: none;
    color: var(--text-muted);
    transform-origin: left top;
}

.floating-group input:focus ~ label,
.floating-group input:not(:placeholder-shown) ~ label,
.floating-group select:focus ~ label,
.floating-group textarea:focus ~ label,
.floating-group textarea:not(:placeholder-shown) ~ label {
    transform: translateY(-0.75rem) scale(0.85);
    font-weight: 600;
    color: var(--primary-color);
}

/* =========================================================
   STEP CARDS (How it Works)
   ========================================================= */
.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: var(--border-radius-3xl);
    transition: var(--transition);
    box-shadow: 0 8px 30px rgb(0 0 0 / 0.015);
}

.step-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.step-number {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-md);
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: var(--shadow-sm);
}

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

@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

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

.animate-bounce-slow {
    animation: bounceSlow 4s ease-in-out infinite;
}

/* =========================================================
   SCROLLBAR
   ========================================================= */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
    border: 2px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

@media (max-width: 991.98px) {
    .feature-strip {
        grid-template-columns: repeat(2, 1fr);
    }
    .feature-strip .feature-item:nth-child(3) {
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    .feature-strip .feature-item:nth-child(4) {
        border-top: 1px solid var(--border-color);
    }
}

@media (max-width: 575.98px) {
    .feature-strip {
        grid-template-columns: 1fr;
    }
    .feature-strip .feature-item + .feature-item {
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
}

/* =========================================================
   GLOBAL MOBILE RESPONSIVENESS – ALL PAGES
   ========================================================= */

/* ---------- BASE / CONTAINER ---------- */
@media (max-width: 767.98px) {
    main.container {
        padding-left: 12px !important;
        padding-right: 12px !important;
        margin-top: 1rem !important;
    }

    .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Reduce page-level heading sizes */
    h1 { font-size: 1.45rem !important; }
    h2 { font-size: 1.25rem !important; }
    h3 { font-size: 1.1rem !important; }
    h4 { font-size: 1rem !important; }
    h5 { font-size: 0.95rem !important; }
}

/* ---------- NAVBAR ---------- */
@media (max-width: 991.98px) {
    .navbar .d-flex.align-items-center.gap-3 {
        flex-wrap: wrap;
        gap: 8px !important;
        padding: 8px 0;
    }

    .navbar .btn {
        font-size: 0.78rem !important;
        padding: 6px 14px !important;
    }

    .navbar-collapse {
        border-top: 1px solid var(--border-color);
        padding-top: 10px;
        background: #fff;
        border-radius: 0 0 12px 12px;
        padding-bottom: 10px;
    }
}

/* ---------- CARDS / STAT CARDS ---------- */
@media (max-width: 767.98px) {
    .card {
        border-radius: 14px !important;
    }

    .card.p-4 {
        padding: 16px !important;
    }

    .card.p-3 {
        padding: 12px !important;
    }

    /* Stat cards – make 2 per row on mobile */
    .row.g-3 > .col-md-3,
    .row.g-4 > .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .row.g-3 > .col-md-4,
    .row.g-4 > .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* stat icon sizes */
    .stat-icon, [class*="stat-icon"] {
        width: 42px !important;
        height: 42px !important;
        font-size: 1.1rem !important;
    }
}

/* ---------- BUTTONS ---------- */
@media (max-width: 575.98px) {
    .btn {
        font-size: 0.82rem !important;
        padding: 8px 14px !important;
    }

    .btn-sm {
        font-size: 0.75rem !important;
        padding: 5px 10px !important;
    }

    /* Stack buttons that are inline on desktop */
    .d-flex.gap-2.flex-wrap {
        flex-direction: column !important;
        width: 100% !important;
    }

    .d-flex.gap-2.flex-wrap .btn,
    .d-flex.gap-2.flex-wrap a.btn {
        width: 100% !important;
        text-align: center;
    }
}

/* ---------- PAGE HEADERS / HERO BANNERS ---------- */
@media (max-width: 767.98px) {
    .page-header,
    [class*="page-header"] {
        padding: 20px 16px !important;
        border-radius: 14px !important;
    }

    .page-header h1 {
        font-size: 1.3rem !important;
    }

    .page-header p {
        font-size: 0.82rem !important;
    }
}

/* ---------- TABLES ---------- */
@media (max-width: 767.98px) {
    /* Horizontal scroll for wide tables */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    table.table thead th {
        font-size: 0.68rem !important;
        padding: 10px 7px !important;
    }

    table.table tbody td {
        font-size: 0.78rem !important;
        padding: 10px 7px !important;
    }

    /* DataTables controls */
    .dataTables_wrapper .dataTables_filter input {
        width: 100% !important;
    }

    .dataTables_wrapper .row > div {
        width: 100% !important;
        text-align: left !important;
        margin-bottom: 8px;
    }

    .dt-buttons {
        flex-wrap: wrap;
        gap: 6px;
    }

    .dt-buttons .dt-button {
        font-size: 0.75rem !important;
        padding: 6px 10px !important;
    }
}

/* ---------- FILTER BARS ---------- */
@media (max-width: 767.98px) {
    .filter-card,
    [class*="filter-card"] {
        padding: 16px !important;
        border-radius: 14px !important;
    }

    .filter-card .row > [class^="col-"] {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* ---------- FULLCALENDAR (Teacher Calendar) ---------- */
@media (max-width: 991.98px) {
    /* On tablet/mobile, calendar goes full width */
    .col-lg-8 { 
        width: 100% !important; 
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    .col-lg-4 { 
        width: 100% !important; 
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .fc .fc-toolbar {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .fc .fc-toolbar-title {
        font-size: 1rem !important;
        width: 100%;
        text-align: center;
    }

    .fc .fc-button {
        font-size: 0.72rem !important;
        padding: 4px 8px !important;
    }

    .fc-header-toolbar .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    /* Limit slot table height on mobile */
    #availability-slots-table_wrapper {
        max-height: 350px;
        overflow-y: auto;
    }
}

/* ---------- TEACHER MANAGE COURSE (sidebar tabs) ---------- */
@media (max-width: 767.98px) {
    /* Sidebar tab list → horizontal scrollable pill tabs */
    #manage-tabs {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        border-radius: 12px !important;
        padding: 4px !important;
        background: #f8f9ff;
        margin-bottom: 16px !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    #manage-tabs::-webkit-scrollbar { display: none; }

    #manage-tabs .list-group-item {
        display: inline-flex !important;
        flex: 0 0 auto !important;
        border-radius: 10px !important;
        border: none !important;
        margin-right: 4px !important;
        font-size: 0.78rem !important;
        padding: 8px 14px !important;
        white-space: nowrap;
    }

    #manage-tabs .list-group-item.active {
        background: var(--primary-color) !important;
        color: white !important;
    }

    /* Make both sidebar and content 100% width on mobile */
    .col-md-3.mb-4,
    .col-md-9 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* ---------- DASHBOARD CARDS ---------- */
@media (max-width: 575.98px) {
    /* 2-col grid for dashboard stat cards */
    .row.g-3 > .col-6,
    .row.g-4 > .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Full-width cards on very small screens */
    .row.g-3 > .col-12,
    .row.g-4 > .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ---------- FORMS / INPUTS ---------- */
@media (max-width: 575.98px) {
    .form-control,
    .form-select {
        font-size: 0.875rem !important;
        padding: 9px 12px !important;
    }

    .form-label {
        font-size: 0.82rem !important;
    }
}

/* ---------- ATTENDANCE / ANALYTICS PARTIAL ---------- */
@media (max-width: 767.98px) {
    .attendance-ring,
    [class*="attendance-ring"] {
        width: 90px !important;
        height: 90px !important;
    }

    .attendance-stat-grid,
    [class*="analytics-grid"] {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
}

/* ---------- MODALS ---------- */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 10px !important;
    }

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

    .modal-body {
        padding: 16px !important;
    }

    .modal-footer {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .modal-footer .btn {
        width: 100% !important;
    }
}

/* ---------- LEGEND CONTAINER (Calendar) ---------- */
@media (max-width: 767.98px) {
    .legend-container {
        flex-wrap: wrap !important;
        gap: 6px !important;
        padding: 10px 12px !important;
    }

    .legend-badge {
        font-size: 0.7rem !important;
        padding: 4px 8px !important;
    }
}

/* ---------- STUDENT CHIPS (slots report) ---------- */
@media (max-width: 575.98px) {
    .student-chip {
        font-size: 0.68rem !important;
        padding: 2px 8px !important;
    }
}

/* ---------- PAGE HEADER ACTIONS (flex row → column) ---------- */
@media (max-width: 575.98px) {
    .d-flex.flex-column.flex-md-row {
        flex-direction: column !important;
    }
}

/* ---------- GENERAL SPACING FIX ON MOBILE ---------- */
@media (max-width: 575.98px) {
    .mb-4 { margin-bottom: 12px !important; }
    .mb-5 { margin-bottom: 20px !important; }
    .py-4 { padding-top: 12px !important; padding-bottom: 12px !important; }
    .px-4 { padding-left: 12px !important; padding-right: 12px !important; }
    .p-4  { padding: 14px !important; }
    .gap-4 { gap: 12px !important; }
    .gap-3 { gap: 8px !important; }
}

/* ---------- TABLE-CARD HEADER (slots report) ---------- */
@media (max-width: 767.98px) {
    .card-header-custom {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 14px 16px !important;
    }
}

/* ---------- BOOKING PROGRESS BAR ---------- */
@media (max-width: 575.98px) {
    .booking-bar { min-width: 50px !important; }
}

/* ---------- CHAT PAGE ---------- */
@media (max-width: 767.98px) {
    #chat-container, 
    .chat-wrapper {
        height: calc(100vh - 140px) !important;
    }

    .chat-input-area {
        padding: 8px !important;
    }
}

/* ---------- PREVENT TEXT OVERFLOW GLOBALLY ---------- */
.card-body, .list-group-item {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ---------- TOUCH-FRIENDLY LINK/BUTTON TARGETS ---------- */
@media (max-width: 767.98px) {
    a.nav-link,
    .list-group-item,
    .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* =========================================================
   MODERN LMS DESIGN SYSTEM UTILITIES
   ========================================================= */

/* Animations */
.fade-in-up {
    animation: lmsFadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.hover-elevate {
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease;
}

.hover-elevate:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(103, 92, 245, 0.12), 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

/* Glassmorphism Cards & Panels */
.lms-glass-card {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 8px 32px rgba(19, 27, 36, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.6) !important;
}

/* Sleek Offcanvas LMS Drawer */
.lms-offcanvas-drawer {
    width: 320px !important;
    border-radius: 0 24px 24px 0 !important;
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 20px 60px rgba(19, 27, 36, 0.15) !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.lms-offcanvas-header {
    background: linear-gradient(135deg, rgba(103, 92, 245, 0.06) 0%, rgba(132, 122, 247, 0.03) 100%);
    border-bottom: 1px solid rgba(103, 92, 245, 0.08);
}

.lms-nav-item {
    border-radius: 12px !important;
    margin-bottom: 5px;
    padding: 12px 16px !important;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-secondary) !important;
    border: 1px solid transparent !important;
    transition: all 0.22s ease !important;
}

.lms-nav-item:hover {
    background-color: rgba(103, 92, 245, 0.07) !important;
    color: var(--primary-color) !important;
    transform: translateX(4px);
}

.lms-nav-item.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, #7d72f8 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(103, 92, 245, 0.32) !important;
}

.lms-nav-item.active i {
    color: #ffffff !important;
}

/* KPI Stat Cards */
.lms-stat-card {
    border-radius: 20px !important;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.lms-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(19, 27, 36, 0.12) !important;
}

.lms-stat-card .stat-icon-bg {
    position: absolute;
    right: -10px;
    bottom: -15px;
    font-size: 5.5rem;
    opacity: 0.12;
    pointer-events: none;
    line-height: 1;
}

/* Pulse Live Indicator */
.pulse-live {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ef4444;
    display: inline-block;
    position: relative;
}

.pulse-live::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: 50%;
    background-color: #ef4444;
    animation: livePulse 1.6s infinite ease-out;
}

@keyframes livePulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.6); opacity: 0; }
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(103, 92, 245, 0.2);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(103, 92, 245, 0.4);
}


