/* ================================
   THEME VARIABLES
   ================================ */
:root {
    --bg-main: #fffbfb;
    --bg-card: #ffffff;
    --primary: #D83236;
    --primary-dark: #b1282c;
    --accent-sakura: #fff5f5;
    --text-main: #1a1a1a;
    --text-muted: #555555;
    --border-soft: #fdeaea;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(216, 50, 54, 0.12);
}

.brand-text {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
}

.brand-name-img {
    height: 1.8rem;
    width: auto;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.brand-name-img:hover {
    transform: scale(1.1) rotate(2deg);
    filter: drop-shadow(0 5px 15px rgba(216, 50, 54, 0.2));
}

/* Interactive Stat Pulse */
.stat {
    transition: all 0.3s ease !important;
}

.card:hover .stat {
    transform: scale(1.15) rotate(-5deg);
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 16px rgba(216, 50, 54, 0.25);
}

.header-logo-res {
    height: 1.6rem;
    width: auto;
    object-fit: contain;
}

@media (max-width: 576px) {
    .header-logo-res {
        height: 1.3rem;
    }
}

.admin-badge {
    padding: 0.2rem 0.8rem;
    background: rgba(216, 50, 54, 0.08);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 99px;
    border: 1px solid rgba(216, 50, 54, 0.1);
    transition: all 0.3s ease;
}

.admin-badge:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}

/* ================================
   GLOBAL SCROLLING FIX
   ================================ */
html, body {
    height: auto !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important; /* Force standard body scroll */
}

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    min-height: 100vh;
    height: auto !important;
    overflow: visible !important;
    background: var(--bg-main) !important; /* Fix: Remove black background */
}

.main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: auto !important;
    flex: 1 !important;
    min-width: 0;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
}

body {
    color: var(--text-main) !important;
    background-color: var(--bg-main) !important;
    position: relative;
    padding: 0 !important;
    margin: 0 !important;

    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-main);
}

/* =====================================================
   CALENDAR PREMIUM STYLING
   ===================================================== */
.fc {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.fc .fc-toolbar-title {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
}

.fc .fc-button-primary {
    background-color: transparent !important;
    border-color: #fdeaea !important;
    color: var(--text-muted) !important;
    font-weight: 600 !important;
    text-transform: capitalize !important;
    padding: 0.4rem 0.8rem !important;
    border-radius: 8px !important;
}

.fc .fc-button-primary:hover {
    background-color: var(--accent-sakura) !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.fc .fc-button-primary:disabled {
    opacity: 0.3 !important;
}

.fc .fc-daygrid-day-number {
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    padding: 8px !important;
    color: var(--text-main) !important;
}

.fc .fc-col-header-cell-cushion {
    font-weight: 800 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: var(--text-muted) !important;
    padding: 10px 0 !important;
}

.fc-theme-standard td, .fc-theme-standard th {
    border-color: #fdeaea !important;
}

.fc .fc-day-today {
    background: rgba(216, 50, 54, 0.03) !important;
}

.fc .fc-day-today .fc-daygrid-day-number {
    color: var(--primary) !important;
    background: var(--accent-sakura) !important;
    border-radius: 50% !important;
    display: inline-block !important;
    width: 25px !important;
    height: 25px !important;
    line-height: 25px !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 5px !important;
}

.fc-event {
    border-radius: 6px !important;
    border: none !important;
    padding: 2px 6px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

/* Webkit (Chrome, Edge, Safari, Opera) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 20px;
    border: 3px solid var(--bg-main);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* =====================================================
   SAKURA ANIMATIONS & WATERMARKS
   ===================================================== */
.sakura-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.petal {
    position: absolute;
    background-color: #ffb7c5;
    border-radius: 150% 0 150% 0;
    opacity: 0.6;
    z-index: 0;
}

.jp-watermark {
    position: fixed;
    font-family: "Noto Serif JP", serif;
    font-weight: 900;
    color: var(--primary);
    opacity: 0.025;
    font-size: 12rem;
    z-index: -1;
    pointer-events: none;
    white-space: nowrap;
    user-select: none;
}

.jp-pos-1 {
    top: 15%;
    right: 5%;
    transform: rotate(15deg);
}

.jp-pos-2 {
    bottom: 15%;
    left: 5%;
    transform: rotate(-15deg);
}

@keyframes fall {
    0% {
        transform: translate(0, -20px) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translate(var(--sway, 100px), 110vh) rotate(360deg);
        opacity: 0;
    }
}

/* Home Page Sakura Background Decoration */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    background-image: url('/theme/v1/img/photos/sakura.png'), url('/theme/v1/img/photos/sakura.png');
    background-repeat: no-repeat, no-repeat;
    background-position: -5% -5%, 105% 60%;
    background-size: 500px auto, 600px auto;
    opacity: 0.12;
    mix-blend-mode: multiply;
}

/* ================================
   SIDEBAR (LIGHT THEME)
   ================================ */
[data-bs-theme="dark"] .sidebar,
[data-bs-theme="dark"] .sidebar-content,
.sidebar,
.sidebar-content {
    background: linear-gradient(180deg, #ffffff 0%, #fffafa 100%) !important;
    border-right: 1px solid rgba(255, 90, 95, 0.08) !important;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.02) !important;
}

/* Sidebar text & icons */
.sidebar-brand,
.sidebar-nav .sidebar-link,
.sidebar-nav .sidebar-link span,
.sidebar-nav .sidebar-link svg {
    color: var(--text-main) !important;
}

/* Remove AdminKit dark pills */
.sidebar-nav .sidebar-link {
    background: transparent !important;
}

.sidebar-nav .sidebar-link::before {
    display: none !important;
}

/* Hover */
.sidebar-nav .sidebar-link:hover {
    background: #fff0f1 !important;
    color: var(--primary) !important;
}

.sidebar-nav .sidebar-link:hover svg {
    color: var(--primary) !important;
}

/* Active */
.sidebar-item.active>.sidebar-link {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: #ffffff !important;
    border-radius: 0 50px 50px 0 !important;
    margin-right: 15px !important;
    box-shadow: 0 8px 15px rgba(255, 90, 95, 0.2) !important;
}

.sidebar-item.active>.sidebar-link svg {
    color: #ffffff !important;
}

/* ================================
   NAVBAR
   ================================ */
.navbar,
.navbar-bg {
    background: rgba(255, 251, 251, 0.95) !important;
    border-bottom: 1px solid var(--border-soft) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky !important;
    top: 0;
    z-index: 1040 !important;
    /* Ensure it's above cards but below overlays */
}

/* Fix for notification dropdown hiding behind content */
.navbar .dropdown-menu {
    z-index: 1050 !important;
    margin-top: 10px !important;
}

.navbar .nav-link,
.navbar .nav-icon {
    color: var(--text-main) !important;
}

.navbar .indicator {
    background: var(--primary) !important;
}

/* ================================
   CARDS
   ================================ */
.card {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border) !important;
    border-top: 4px solid var(--primary) !important;
    border-radius: 24px !important;
    box-shadow: 0 10px 40px rgba(255, 90, 95, 0.04) !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: visible !important;
    /* Ensure children like dropdowns aren't cut off */
}

.card-body {
    overflow: visible !important;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(255, 90, 95, 0.08) !important;
    border-color: rgba(255, 90, 95, 0.2) !important;
}

.card-header {
    background: rgba(255, 90, 95, 0.03) !important;
    border-bottom: 1px solid rgba(255, 90, 95, 0.05) !important;
    padding: 1.5rem 1.8rem !important;
    border-top-left-radius: 24px !important;
    border-top-right-radius: 24px !important;
}

.card-title {
    color: var(--text-main) !important;
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    letter-spacing: -0.02em;
}

/* ================================
   BUTTONS
   ================================ */
.btn-primary {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 8px 18px rgba(255, 90, 95, 0.25) !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    padding: 0.6rem 1.5rem !important;
    transition: all 0.3s ease !important;
}

.btn-primary:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(255, 90, 95, 0.35) !important;
}

.btn-outline-secondary {
    border: 2px solid #fdeaea !important;
    color: var(--text-muted) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.btn-outline-secondary:hover {
    background: var(--accent-sakura) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    transform: translateY(-2px);
}

/* ================================
   TABLES
   ================================ */
.table {
    color: var(--text-main) !important;
}

.table thead th {
    background: #fff5f6 !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border-soft) !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table tbody tr:hover {
    background: #fff3ee !important;
}

/* ================================
   FORMS
   ================================ */
.form-control,
.form-select {
    background: #ffffff !important;
    border: 1px solid #f0f0f0 !important;
    color: var(--text-main) !important;
    border-radius: 14px !important;
    padding: 0.75rem 1.2rem !important;
    font-size: 0.95rem !important;
    transition: all 0.2s ease !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(255, 90, 95, 0.1) !important;
    background: #fff !important;
}

.form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 0.15rem rgba(255, 90, 95, 0.25) !important;
}

/* ================================
   DROPDOWNS
   ================================ */
.dropdown-menu {
    border-radius: 1rem !important;
    border: 1px solid var(--border-soft) !important;
    box-shadow: 0 12px 26px rgba(222, 159, 150, 0.3) !important;
}

/* ================================
   FOOTER
   ================================ */
.footer {
    background: transparent !important;
    border-top: 1px solid var(--border-soft) !important;
    color: var(--text-muted) !important;
}

/* ================================
   Offcanvas & Premium Scrollbars
   ================================ */
.offcanvas {
    background-color: var(--bg-main) !important;
    border-left: 1px solid var(--border-soft) !important;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.05) !important;
    z-index: 1060 !important;
    /* Ensure it's above everything */
}

/* Fix for Offcanvas Body Scrolling - Ensure it scrolls correctly on all devices */
.offcanvas-body {
    flex-grow: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 1.5rem 1.8rem !important;

    /* Premium Scrollbar Style */
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-main);
}

/* Webkit Scrollbar Customization for Offcanvas - FORCED VISIBILITY */
.offcanvas-body::-webkit-scrollbar {
    width: 10px !important;
    height: 10px !important;
    display: block !important;
}

.offcanvas-body::-webkit-scrollbar-track {
    background: #eeeeee !important;
    border-radius: 0px;
}

.offcanvas-body::-webkit-scrollbar-thumb {
    background: var(--primary) !important;
    border-radius: 5px;
}

.offcanvas-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark) !important;
}

/* Force scrollbar visibility on Firefox */
.offcanvas-body {
    scrollbar-width: auto !important;
    scrollbar-color: var(--primary) #eeeeee !important;
}

/* Ensure body is scrollable and constrained */
.offcanvas-body {
    flex: 1 1 auto !important;
    overflow-y: scroll !important;
    /* Force track visibility always */
    overflow-x: hidden !important;
    padding: 1.5rem 1.8rem !important;
    min-height: 0 !important;
    /* Flexbox scroll fix */
}

.offcanvas-header {
    flex-shrink: 0 !important;
    border-bottom: 1px solid var(--border-soft) !important;
}

/* Ensure the wrapper content inside the offcanvas behaves correctly with flex for scrolling */
[id$="-offcanvas-content"] {
    display: flex !important;
    flex-direction: column !important;
    height: 100%;
    min-height: 0;
}

/* ================================
   list
   ================================ */
.list-group-item {
    background-color: var(--bg-main) !important;
}

/* ================================
   Sidebar hamburger
   ================================ */
.sidebar-toggle:hover .hamburger,
.sidebar-toggle:hover .hamburger:after,
.sidebar-toggle:hover .hamburger:before {
    background: var(--primary) !important
}

/* ================================
   Data Table
   ================================ */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    border: 2px solid #fdeaea;
    background: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(216, 50, 54, 0.1);
    outline: none;
}

.dataTables_wrapper .dataTables_length label {
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dataTables_wrapper .dataTables_filter {
    text-align: right;
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_paginate .pagination {
    margin: 0;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 0.85rem;
    font-size: 0.875rem;
    color: #6c757d;
}

/* Data Table Pagination */
.dataTables_wrapper .pagination .page-item.active .page-link {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(255, 90, 95, 0.2);
}

.dataTables_wrapper .pagination .page-link {
    color: var(--text-main) !important;
    border: 1px solid #ffe0e0;
    margin: 0 2px;
    border-radius: 8px !important;
}

.dataTables_wrapper .pagination .page-link:hover {
    background-color: var(--accent-sakura) !important;
    color: var(--primary) !important;
    border-color: var(--primary);
}

/* Data Table Pagination */
.dataTables_wrapper .pagination {
    --bs-pagination-padding-y: 0.25rem;
    --bs-pagination-padding-x: 0.5rem;
    --bs-pagination-font-size: 0.875rem;
}

.dataTables_wrapper .pagination .page-link {
    border-radius: 0.375rem;
    min-width: 32px;
    text-align: center;
}

.paginate_button.page-item.previous {
    margin-right: 10px;
}

.paginate_button.page-item.next {
    margin-left: 10px;
}

/* Base processing container */

@keyframes pulseDots {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.3;
    }
}


.dataTables_wrapper .dataTables_processing {
    background: #fff7f3 !important;
    border: 1px solid #ffccc2;
    box-shadow: none;
    color: transparent !important;
    /* hide text */
}

.dataTables_wrapper .dataTables_processing>* {
    display: none !important;
}

.dataTables_wrapper .dataTables_processing::before {
    content: "•••";
    font-size: 20px;
    letter-spacing: 6px;
    color: #ff5a5f;
    animation: pulseDots 1.2s infinite ease-in-out;
}


/* =====================================================
   SELECT2 – CUSTOM THEME
   ===================================================== */

.select2-container {
    z-index: 9999 !important;
}

.select2-container--bootstrap5 .select2-selection {
    min-height: 48px !important;
    padding: 0.5rem 1rem !important;
    background: #ffffff !important;
    border: 2px solid #fdeaea !important;
    border-radius: 16px !important;
    color: var(--text-main) !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(216, 50, 54, 0.03) !important;
}

.select2-container--bootstrap5 .select2-selection:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 6px 16px rgba(216, 50, 54, 0.08) !important;
}

/* Text rendering */
.select2-container--bootstrap5 .select2-selection__rendered {
    padding-left: 0 !important;
    color: var(--text-main) !important;
    line-height: 1.5 !important;
    font-size: 0.95rem !important;
}

/* Clear (×) button */
.select2-container--bootstrap5 .select2-selection__clear {
    width: 1.2em !important;
    height: 1.2em !important;
    line-height: 1.1 !important;
    background-color: #fff0f1 !important;
    color: var(--primary) !important;
    border-radius: 50% !important;
    font-size: 0.8rem !important;
    text-align: center !important;
    margin-right: 0.5rem !important;
    transition: all 0.2s !important;
}

.select2-container--bootstrap5 .select2-selection__clear:hover {
    background-color: var(--primary) !important;
    color: #fff !important;
}

/* -------------------------------
   Focus state
   ------------------------------- */

.select2-container--bootstrap5.select2-container--focus .select2-selection {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(255, 90, 95, 0.1) !important;
}

/* -------------------------------
   Dropdown menu
   ------------------------------- */

.select2-results__option {
    padding: 0.75rem 1.2rem !important;
    font-size: 0.95rem !important;
    color: var(--text-main) !important;
    transition: background-color 0.2s !important;
}

/* Hover option (soft primary) */
.select2-container--bootstrap5 .select2-results__option--highlighted {
    background-color: rgba(255, 90, 95, 0.08);
    color: var(--text-main);
}

/* Selected option */
.select2-container--bootstrap5 .select2-results__option--selected {
    background-color: rgba(255, 90, 95, 0.12);
    color: var(--primary);
    font-weight: 500;
}

/* -------------------------------
   Clear (×) button
   ------------------------------- */

.select2-container--bootstrap5 .select2-selection__clear {
    color: #ff8a8f;
    margin-right: .25rem;
}

.select2-container--bootstrap5 .select2-selection__clear:hover {
    color: var(--primary);
}

/* -------------------------------
   Search box
   ------------------------------- */

.select2-container--bootstrap5 .select2-search__field {
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 10px !important;
    color: var(--text-main) !important;
    padding: 0.5rem 0.75rem !important;
    outline: none !important;
}

.select2-container--bootstrap5 .select2-search__field:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 90, 95, 0.15) !important;
}

.select2-container--open,
.select2-dropdown {
    z-index: 999999 !important;
}

.select2-container--bootstrap5 .select2-dropdown {
    border: 1px solid #ffd8c5 !important;
    border-radius: 15px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    margin-top: 5px;
    z-index: 1056;
}

/* -------------------------------
   Validation — INVALID
   ------------------------------- */

.form-control.is-invalid {
    background: #fff0eb;
}

.is-invalid+.select2-container--bootstrap5 .select2-selection {
    background: #fff0eb;
    border-color: #ffb4a2;
}

.is-invalid+.select2-container--bootstrap5.select2-container--focus .select2-selection {
    box-shadow: 0 0 0 0.15rem rgba(255, 90, 95, 0.25);
}

/* -------------------------------
   Validation — VALID
   ------------------------------- */

.form-control.is-valid {
    background: #fffaf7;
}

.is-valid+.select2-container--bootstrap5 .select2-selection {
    background: #fffaf7;
    border-color: #ffd8c5;
}

/* =====================================================
   MOBILE RESPONSIVENESS FIXES (GLOBAL)
   ===================================================== */
@media (max-width: 768px) {
    .content {
        padding: 1.25rem 0.75rem 1rem !important;
    }

    .card-header {
        padding: 1.2rem 1.25rem !important;
    }

    .card-body {
        padding: 1.25rem !important;
    }

    .card-title {
        font-size: 1rem !important;
    }

    .sidebar-brand {
        padding: 1.5rem 1.25rem !important;
    }

    .brand-name-img {
        height: 1.4rem !important;
    }

    .jp-watermark {
        font-size: 5rem !important; /* Smaller on mobile */
    }

    .navbar {
        padding: 0.5rem 0.75rem !important;
    }

    .sidebar-toggle {
        margin-left: 0.5rem !important;
    }

    /* Adjust form inputs for better thumb-touch targets */
    .form-control,
    .form-select,
    .select2-container--bootstrap5 .select2-selection {
        min-height: 48px !important;
        font-size: 16px !important;
        /* Prevents iOS auto-zoom */
    }

    .btn {
        padding: 0.75rem 1.25rem !important;
    }

    /* DataTable Mobile Adjustments */
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        text-align: center !important;
        margin-bottom: 1rem;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100% !important;
        margin-left: 0 !important;
    }

    /* Navbar icon spacing */
    .navbar-nav.navbar-align {
        gap: 0.25rem;
    }

    .nav-icon {
        padding: 0.4rem 0.6rem !important;
    }

    /* Learning Hero Mobile Optimizations */
    .learning-hero {
        padding: 1.5rem !important;
        text-align: center;
    }
    
    .learning-hero::before {
        top: 0 !important;
        bottom: auto !important;
        left: 20% !important;
        right: 20% !important;
        width: auto !important;
        height: 4px !important;
        border-radius: 0 0 10px 10px !important;
    }

    .learning-hero .d-flex.gap-3 {
        justify-content: center !important;
        margin-top: 1rem;
    }

    .hero-stat-box {
        flex: 1;
        min-width: 0 !important;
        padding: 0.75rem !important;
    }

    .hero-stat-box .h3 {
        font-size: 1.5rem !important;
    }

    /* Student Profile Mobile Fixes */
    .profile-card-premium {
        margin-bottom: 1.5rem;
    }

    .profile-header-accent {
        height: 80px !important;
    }

    .profile-avatar {
        width: 100px !important;
        height: 100px !important;
    }
}

/* Very Small Devices */
@media (max-width: 480px) {
    .brand-text {
        display: none !important;
    }

    .sidebar-brand {
        justify-content: center !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .sidebar-brand .d-flex.flex-column {
        display: none !important;
    }
}

/* Update background to match new public theme */
body::before {
    opacity: 0.25 !important;
}

:root {
    --bg-main: #fffafa;
    --accent-sakura: #fff2f2;
}

.sakura-bg {
    background-color: #fffafb;
    background-image: radial-gradient(#ffeef1 1px, transparent 1px);
    background-size: 40px 40px;
}

/* 🌟 LAYOUT NORMALIZATION - SENSEI STUDENT PORTAL 🌟 */
.wrapper {
    display: flex !important;
    width: 100% !important;
}

.sidebar {
    min-width: 260px !important;
    max-width: 260px !important;
}

.main {
    flex: 1 !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

.navbar {
    width: 100% !important;
    margin: 0 !important;
    padding: 1rem 1.5rem !important;
}

.content {
    padding: 1.5rem !important;
    width: 100% !important;
}

/* =====================================================
   NOTYF TOAST NOTIFICATIONS (PREMIUM VISIBILITY)
   ===================================================== */
.notyf {
    z-index: 100000 !important; /* Above everything */
}

.notyf__toast {
    border-radius: 16px !important;
    padding: 15px 22px !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2) !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    max-width: 400px !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1) !important;
}

.notyf__message {
    padding-left: 8px !important;
}

.notyf__toast--success {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%) !important;
    border-left: 8px solid #4caf50 !important;
}

.notyf__toast--error {
    background: linear-gradient(135deg, #D83236 0%, #a11d21 100%) !important;
    border-left: 8px solid #ff5a5f !important;
}

.notyf__ripple {
    height: 600px !important;
    width: 600px !important;
}

/* =====================================================
   PROFESSIONAL UI HELPERS (SOFT BADGES & UTILS)
   ===================================================== */
.bg-soft-primary { background-color: rgba(216, 50, 54, 0.08) !important; color: #D83236 !important; }
.bg-soft-success { background-color: rgba(46, 125, 50, 0.08) !important; color: #2e7d32 !important; }
.bg-soft-info { background-color: rgba(13, 202, 240, 0.08) !important; color: #0dcaf0 !important; }
.bg-soft-danger { background-color: rgba(216, 50, 54, 0.08) !important; color: #D83236 !important; }

.fw-900 { font-weight: 900 !important; }
.fw-800 { font-weight: 800 !important; }
.fw-700 { font-weight: 700 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-500 { font-weight: 500 !important; }

.mx-n2 { margin-left: -0.5rem !important; margin-right: -0.5rem !important; }

.animated {
    animation-duration: 0.3s;
    animation-fill-mode: both;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fadeIn {
    animation-name: fadeIn;
}

/* =====================================================
   PREMIUM FORM STYLING
   ===================================================== */
.offcanvas {
    border-left: none !important;
    box-shadow: -10px 0 40px rgba(0,0,0,0.1) !important;
}

.offcanvas-header {
    background: #fdfdfd;
    border-bottom: 1px solid #f1f1f1;
    padding: 1.5rem !important;
}

.offcanvas-title {
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.form-label {
    font-weight: 800;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #adb5bd;
    margin-bottom: 0.5rem;
}

.form-control {
    border-radius: 12px !important;
    padding: 0.6rem 1rem !important;
    border: 2px solid #f8f9fa !important;
    background: #fdfdfd !important;
    transition: all 0.2s ease !important;
    font-weight: 600 !important;
}

.form-control:focus {
    border-color: var(--primary) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(216, 50, 54, 0.06) !important;
}

/* Select2 Premium Overrides */
.select2-container--default .select2-selection--single {
    border-radius: 12px !important;
    height: 45px !important;
    border: 2px solid #f8f9fa !important;
    background-color: #fdfdfd !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    font-weight: 600 !important;
    color: #444 !important;
    padding-left: 12px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px !important;
    right: 10px !important;
}

.select2-dropdown {
    border-radius: 12px !important;
    border: 1px solid #f1f1f1 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
    overflow: hidden !important;
}

.select2-search__field {
    border-radius: 8px !important;
    border: 1px solid #eee !important;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary) !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    margin-right: 25px !important;
    color: #ff5b5c !important;
    font-weight: bold !important;
    font-size: 1.2rem !important;
}

/* Logout Item Enhancements */
.logout-item {
    transition: all 0.2s ease;
}

.logout-item:hover {
    background-color: rgba(216, 50, 54, 0.05) !important;
}

/* Notification Utility Classes */
.bg-soft-success {
    background-color: rgba(46, 125, 50, 0.1) !important;
}

.bg-soft-warning {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

.bg-soft-danger {
    background-color: rgba(216, 50, 54, 0.1) !important;
}

.smaller {
    font-size: 0.8rem;
}

.hover-bg-light:hover {
    background-color: #f8f9fa;
}
