/* Alef font — copied to dist/fonts/ by Trunk */
@font-face {
    font-family: 'Alef';
    src: url('fonts/Alef/Alef-Bold.woff2') format('woff2'),
         url('fonts/Alef/Alef-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Alef';
    src: url('fonts/Alef/Alef-Regular.woff2') format('woff2'),
         url('fonts/Alef/Alef-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

html {
    /* Desktop min-width; removed on mobile via media query */
    min-width: 1250px;
}

/* ── Mobile responsive utilities ─────────────────────── */
@media (max-width: 768px) {
    html {
        min-width: unset !important;
    }
    .desktop-only {
        display: none !important;
    }
}
@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}
body {
    font-family: Alef, Roboto, Helvetica, Arial, sans-serif;
    direction: rtl;
    background-color: #f8f9fa;
}

/* Hide number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* Course type colors */
.course-type-0 { background-color: #fff; }         /* חובה */
.course-type-1 { background-color: #d4edda; }      /* פטור */
.course-type-2 { background-color: #d1ecf1; }      /* מל"ג */
.course-type-3 { background-color: #fff3cd; }       /* בחירה חופשית */
.course-type-4 { background-color: #e2d9f3; }       /* רשימה א' */
.course-type-5 { background-color: #f8d7da; }       /* רשימה ב' */

/* Semester tabs */
.semester-tab {
    cursor: pointer;
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background: #f8f9fa;
    margin-left: 2px;
}
.semester-tab.active {
    background: #fff;
    border-bottom: 2px solid #fff;
    font-weight: bold;
}
.semester-tab.summer {
    background: #fff3cd;
}
.semester-tab.summer.active {
    background: #fff;
}

/* Summary cards */
.degree-summary-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
    height: 100%;
}

.degree-summary-card > h5 {
    background-color: #343a40;
    color: #fff;
    font-weight: bold;
    padding: 12px 16px;
    margin: 0;
    border-radius: 8px 8px 0 0;
    text-align: center;
}

.degree-summary-card > .card-content {
    padding: 16px;
}

/* Category name labels in degree summary */
.category-label {
    background-color: aliceblue;
    cursor: default;
    width: 33%;
    flex: 0 0 33% !important;
}

/* Force input-group to single row */
.input-group {
    flex-wrap: nowrap !important;
}

/* Disabled/readonly inputs */
.disabled-input {
    background-color: whitesmoke !important;
}

/* Editable degree input hover */
.degree-input-field:hover {
    border-color: royalblue !important;
}

/* Degree summary number direction */
.degree-summary {
    text-align: center;
}
.degree-summary-number {
    direction: ltr;
    text-align: center;
}

/* Table styling */
.semester-table th {
    cursor: pointer;
    user-select: none;
}
.semester-table th:hover {
    background-color: #e9ecef;
}

/* Table header background — override Bootstrap RTL resets */
thead th {
    color: #495057 !important;
    background-color: rgb(233, 236, 239) !important;
    --bs-table-accent-bg: rgb(233, 236, 239) !important;
    border-color: #dee2e6;
    text-align: center;
}

thead th:hover {
    color: cornflowerblue !important;
    text-decoration: underline;
    cursor: pointer;
}

/* Search dialog overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 80px;
}
.search-dialog {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    min-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.search-dialog > :first-child {
    padding: 16px 24px;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}
.search-dialog > :nth-child(2) {
    padding: 24px;
    overflow-y: auto;
    flex: 1 1 auto;
}

/* Histogram stats grid */
.hist-stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
}
.hist-stat-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
    min-width: 80px;
    flex: 1 1 auto;
}
.hist-stat-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #212529;
    direction: ltr;
}
.hist-stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 2px;
}

/* Toast notification */
.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    z-index: 9999;
    animation: fadeInOut 3s ease;
}
@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* Header */
.app-header {
    background-color: #343a40;
    color: #fff;
    padding: 0;
}
.app-header .container-fluid {
    padding: 0;
}
.app-header a {
    color: #fff;
    text-decoration: none;
}
.nav-divider {
    width: 2px;
    background-color: #6c757d;
    align-self: stretch;
    margin: 0 2px;
}

/* Footer */
.app-footer {
    background-color: #343a40;
    color: #adb5bd;
    padding: 15px;
    text-align: center;
    margin-top: 30px;
}

/* Row action buttons */
.row-actions .btn {
    padding: 2px 6px;
    font-size: 0.8rem;
}

/* Autocomplete dropdown */
.autocomplete-list {
    z-index: 1000;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    width: 100%;
}
.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
}
.autocomplete-item:hover,
.autocomplete-item.active {
    background-color: #e9ecef;
}

/* RTL input-group fixes (ported from original Vue DegreeSummary) */

/* Remove number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Fix RTL input-group: first child (input-group-text) gets right radius */
[dir="rtl"] .input-group > .input-group-text:first-child {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
    border-right: 1px solid #dee2e6 !important;
    border-left: 0 !important;
}

/* Fix RTL input-group: last child (form-control) gets left radius */
[dir="rtl"] .input-group > .form-control:last-child,
[dir="rtl"] .input-group > input:last-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 0.375rem !important;
    border-bottom-left-radius: 0.375rem !important;
}

/* Fix RTL input-group: first form-control (after text) gets no radius */
[dir="rtl"] .input-group > .form-control:not(:first-child):not(:last-child),
[dir="rtl"] .input-group > .input-group-text:not(:first-child):not(:last-child),
[dir="rtl"] .input-group > input:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
}

/* Fix border doubling between adjacent elements in RTL */
[dir="rtl"] .input-group > *:not(:first-child) {
    margin-right: -1px;
    margin-left: 0;
}

/* Category label width */
.input-group > .input-group-prepend {
    flex: 0 0 33%;
}
.input-group .input-group-text {
    width: 100%;
}

/* Summary card header */
.summary-card-header {
    font-weight: bold !important;
    text-align: center;
}

/* Fix dropdown menu text in dark navbar */
.navbar-dark .dropdown-menu {
    background-color: #fff !important;
}
.navbar-dark .dropdown-menu .dropdown-item {
    color: #212529 !important;
}
.navbar-dark .dropdown-menu .dropdown-item:hover {
    background-color: #e9ecef !important;
    color: #212529 !important;
}
.navbar-dark .dropdown-menu .dropdown-divider {
    border-color: #dee2e6 !important;
}

/* Degree summary slide animation */
.summary-collapse-wrapper {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.4s ease, opacity 0.3s ease;
    opacity: 1;
}
.summary-collapse-wrapper > div {
    overflow: hidden;
}
.summary-collapse-wrapper.summary-collapsed {
    grid-template-rows: 0fr;
    opacity: 0;
}
.summary-collapse-wrapper.summary-collapsed > div {
    overflow: hidden;
}

/* Drag and drop rows */
.drop-zone-row {
    position: relative;
}
.drop-zone-row td {
    height: 6px;
    padding: 0 !important;
    transition: height 0.25s ease, background-color 0.25s ease;
}
.drop-zone-row.drag-over td {
    height: 30px !important;
    background-color: rgba(13, 110, 253, 0.2);
}
tr.dragging {
    opacity: 0.25;
}
/* Fade out on drop — Telegram-style collapse */
tr.drag-fade-out {
    opacity: 0 !important;
    transform: scaleY(0.3);
    transform-origin: center;
    transition: opacity 0.3s cubic-bezier(.36,.07,.19,.97),
                transform 0.3s cubic-bezier(.36,.07,.19,.97) !important;
}
/* Preview during drag: rows transition smoothly */
tr.course-row {
    transition: transform 0.75s ease, opacity 0.75s ease;
}

/* Semester swap fade-in animation */
@keyframes semesterFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.semester-fade-in {
    animation: semesterFadeIn 0.75s cubic-bezier(.36,.07,.19,.97) both;
}

/* Inline SVG icons — replaces Font Awesome CDN (~185KB savings) */
/* Official FA 5.15.4 Free Solid paths, CC BY 4.0 license */
.fas, .fa {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}
.fa-flip-horizontal { transform: scaleX(-1); }
.fa-ban { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M256 8C119.034 8 8 119.033 8 256s111.034 248 248 248 248-111.034 248-248S392.967 8 256 8zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676zM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M256 8C119.034 8 8 119.033 8 256s111.034 248 248 248 248-111.034 248-248S392.967 8 256 8zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676zM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676z'/></svg>"); }
.fa-broom { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'><path d='M256.47 216.77l86.73 109.18s-16.6 102.36-76.57 150.12C206.66 523.85 0 510.19 0 510.19s3.8-23.14 11-55.43l94.62-112.17c3.97-4.7-.87-11.62-6.65-9.5l-60.4 22.09c14.44-41.66 32.72-80.04 54.6-97.47 59.97-47.76 163.3-40.94 163.3-40.94zM636.53 31.03l-19.86-25c-5.49-6.9-15.52-8.05-22.41-2.56l-232.48 177.8-34.14-42.97c-5.09-6.41-15.14-5.21-18.59 2.21l-25.33 54.55 86.73 109.18 58.8-12.45c8-1.69 11.42-11.2 6.34-17.6l-34.09-42.92 232.48-177.8c6.89-5.48 8.04-15.53 2.55-22.44z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'><path d='M256.47 216.77l86.73 109.18s-16.6 102.36-76.57 150.12C206.66 523.85 0 510.19 0 510.19s3.8-23.14 11-55.43l94.62-112.17c3.97-4.7-.87-11.62-6.65-9.5l-60.4 22.09c14.44-41.66 32.72-80.04 54.6-97.47 59.97-47.76 163.3-40.94 163.3-40.94zM636.53 31.03l-19.86-25c-5.49-6.9-15.52-8.05-22.41-2.56l-232.48 177.8-34.14-42.97c-5.09-6.41-15.14-5.21-18.59 2.21l-25.33 54.55 86.73 109.18 58.8-12.45c8-1.69 11.42-11.2 6.34-17.6l-34.09-42.92 232.48-177.8c6.89-5.48 8.04-15.53 2.55-22.44z'/></svg>"); }
.fa-chart-bar { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M332.8 320h38.4c6.4 0 12.8-6.4 12.8-12.8V172.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h38.4c6.4 0 12.8-6.4 12.8-12.8V76.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-288 0h38.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h38.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zM496 384H64V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M332.8 320h38.4c6.4 0 12.8-6.4 12.8-12.8V172.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h38.4c6.4 0 12.8-6.4 12.8-12.8V76.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-288 0h38.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h38.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zM496 384H64V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z'/></svg>"); }
.fa-check { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z'/></svg>"); }
.fa-ellipsis-v { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 192 512'><path d='M96 184c39.8 0 72 32.2 72 72s-32.2 72-72 72-72-32.2-72-72 32.2-72 72-72zM24 80c0 39.8 32.2 72 72 72s72-32.2 72-72S135.8 8 96 8 24 40.2 24 80zm0 352c0 39.8 32.2 72 72 72s72-32.2 72-72-32.2-72-72-72-72 32.2-72 72z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 192 512'><path d='M96 184c39.8 0 72 32.2 72 72s-32.2 72-72 72-72-32.2-72-72 32.2-72 72-72zM24 80c0 39.8 32.2 72 72 72s72-32.2 72-72S135.8 8 96 8 24 40.2 24 80zm0 352c0 39.8 32.2 72 72 72s72-32.2 72-72-32.2-72-72-72-72 32.2-72 72z'/></svg>"); }
.fa-file-export { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'><path d='M384 121.9c0-6.3-2.5-12.4-7-16.9L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128zM571 308l-95.7-96.4c-10.1-10.1-27.4-3-27.4 11.3V288h-64v64h64v65.2c0 14.3 17.3 21.4 27.4 11.3L571 332c6.6-6.6 6.6-17.4 0-24zm-379 28v-32c0-8.8 7.2-16 16-16h176V160H248c-13.2 0-24-10.8-24-24V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V352H208c-8.8 0-16-7.2-16-16z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'><path d='M384 121.9c0-6.3-2.5-12.4-7-16.9L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128zM571 308l-95.7-96.4c-10.1-10.1-27.4-3-27.4 11.3V288h-64v64h64v65.2c0 14.3 17.3 21.4 27.4 11.3L571 332c6.6-6.6 6.6-17.4 0-24zm-379 28v-32c0-8.8 7.2-16 16-16h176V160H248c-13.2 0-24-10.8-24-24V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V352H208c-8.8 0-16-7.2-16-16z'/></svg>"); }
.fa-file-import { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M16 288c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h112v-64zm489-183L407.1 7c-4.5-4.5-10.6-7-17-7H384v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-153 31V0H152c-13.3 0-24 10.7-24 24v264h128v-65.2c0-14.3 17.3-21.4 27.4-11.3L379 308c6.6 6.7 6.6 17.4 0 24l-95.7 96.4c-10.1 10.1-27.4 3-27.4-11.3V352H128v136c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H376c-13.2 0-24-10.8-24-24z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M16 288c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h112v-64zm489-183L407.1 7c-4.5-4.5-10.6-7-17-7H384v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-153 31V0H152c-13.3 0-24 10.7-24 24v264h128v-65.2c0-14.3 17.3-21.4 27.4-11.3L379 308c6.6 6.7 6.6 17.4 0 24l-95.7 96.4c-10.1 10.1-27.4 3-27.4-11.3V352H128v136c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H376c-13.2 0-24-10.8-24-24z'/></svg>"); }
.fa-graduation-cap { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'><path d='M622.34 153.2L343.4 67.5c-15.2-4.67-31.6-4.67-46.79 0L17.66 153.2c-23.54 7.23-23.54 38.36 0 45.59l48.63 14.94c-10.67 13.19-17.23 29.28-17.88 46.9C38.78 266.15 32 276.11 32 288c0 10.78 5.68 19.85 13.86 25.65L20.33 428.53C18.11 438.52 25.71 448 35.94 448h56.11c10.24 0 17.84-9.48 15.62-19.47L82.14 313.65C90.32 307.85 96 298.78 96 288c0-11.57-6.47-21.25-15.66-26.87.76-15.02 8.44-28.3 20.69-36.72L296.6 284.5c9.06 2.78 26.44 6.25 46.79 0l278.95-85.7c23.55-7.24 23.55-38.36 0-45.6zM352.79 315.09c-28.53 8.76-52.84 3.92-65.59 0l-145.02-44.55L128 384c0 35.35 85.96 64 192 64s192-28.65 192-64l-14.18-113.47-145.03 44.56z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'><path d='M622.34 153.2L343.4 67.5c-15.2-4.67-31.6-4.67-46.79 0L17.66 153.2c-23.54 7.23-23.54 38.36 0 45.59l48.63 14.94c-10.67 13.19-17.23 29.28-17.88 46.9C38.78 266.15 32 276.11 32 288c0 10.78 5.68 19.85 13.86 25.65L20.33 428.53C18.11 438.52 25.71 448 35.94 448h56.11c10.24 0 17.84-9.48 15.62-19.47L82.14 313.65C90.32 307.85 96 298.78 96 288c0-11.57-6.47-21.25-15.66-26.87.76-15.02 8.44-28.3 20.69-36.72L296.6 284.5c9.06 2.78 26.44 6.25 46.79 0l278.95-85.7c23.55-7.24 23.55-38.36 0-45.6zM352.79 315.09c-28.53 8.76-52.84 3.92-65.59 0l-145.02-44.55L128 384c0 35.35 85.96 64 192 64s192-28.65 192-64l-14.18-113.47-145.03 44.56z'/></svg>"); }
.fa-grip-lines { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M496 288H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-128H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M496 288H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-128H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16z'/></svg>"); }
.fa-sign-in-alt { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M416 448h-84c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h84c17.7 0 32-14.3 32-32V160c0-17.7-14.3-32-32-32h-84c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h84c53 0 96 43 96 96v192c0 53-43 96-96 96zm-47-201L201 79c-15-15-41-4.5-41 17v96H24c-13.3 0-24 10.7-24 24v96c0 13.3 10.7 24 24 24h136v96c0 21.5 26 32 41 17l168-168c9.3-9.4 9.3-24.6 0-34z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M416 448h-84c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h84c17.7 0 32-14.3 32-32V160c0-17.7-14.3-32-32-32h-84c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h84c53 0 96 43 96 96v192c0 53-43 96-96 96zm-47-201L201 79c-15-15-41-4.5-41 17v96H24c-13.3 0-24 10.7-24 24v96c0 13.3 10.7 24 24 24h136v96c0 21.5 26 32 41 17l168-168c9.3-9.4 9.3-24.6 0-34z'/></svg>"); }
.fa-sign-out-alt { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M497 273L329 441c-15 15-41 4.5-41-17v-96H152c-13.3 0-24-10.7-24-24v-96c0-13.3 10.7-24 24-24h136V88c0-21.4 25.9-32 41-17l168 168c9.3 9.4 9.3 24.6 0 34zM192 436v-40c0-6.6-5.4-12-12-12H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h84c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12H96c-53 0-96 43-96 96v192c0 53 43 96 96 96h84c6.6 0 12-5.4 12-12z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M497 273L329 441c-15 15-41 4.5-41-17v-96H152c-13.3 0-24-10.7-24-24v-96c0-13.3 10.7-24 24-24h136V88c0-21.4 25.9-32 41-17l168 168c9.3 9.4 9.3 24.6 0 34zM192 436v-40c0-6.6-5.4-12-12-12H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h84c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12H96c-53 0-96 43-96 96v192c0 53 43 96 96 96h84c6.6 0 12-5.4 12-12z'/></svg>"); }
.fa-times { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 352 512'><path d='M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 352 512'><path d='M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z'/></svg>"); }
.fa-trash { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z'/></svg>"); }
.fa-user-circle { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 496 512'><path d='M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 96c48.6 0 88 39.4 88 88s-39.4 88-88 88-88-39.4-88-88 39.4-88 88-88zm0 344c-58.7 0-111.3-26.6-146.5-68.2 18.8-35.4 55.6-59.8 98.5-59.8 2.4 0 4.8.4 7.1 1.1 13 4.2 26.6 6.9 40.9 6.9 14.3 0 28-2.7 40.9-6.9 2.3-.7 4.7-1.1 7.1-1.1 42.9 0 79.7 24.4 98.5 59.8C359.3 421.4 306.7 448 248 448z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 496 512'><path d='M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 96c48.6 0 88 39.4 88 88s-39.4 88-88 88-88-39.4-88-88 39.4-88 88-88zm0 344c-58.7 0-111.3-26.6-146.5-68.2 18.8-35.4 55.6-59.8 98.5-59.8 2.4 0 4.8.4 7.1 1.1 13 4.2 26.6 6.9 40.9 6.9 14.3 0 28-2.7 40.9-6.9 2.3-.7 4.7-1.1 7.1-1.1 42.9 0 79.7 24.4 98.5 59.8C359.3 421.4 306.7 448 248 448z'/></svg>"); }
.fa-utensils { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 416 512'><path d='M207.9 15.2c.8 4.7 16.1 94.5 16.1 128.8 0 52.3-27.8 89.6-68.9 104.6L168 486.7c.7 13.7-10.2 25.3-24 25.3H80c-13.7 0-24.7-11.5-24-25.3l12.9-238.1C27.7 233.6 0 196.2 0 144 0 109.6 15.3 19.9 16.1 15.2 19.3-5.1 61.4-5.4 64 16.3v141.2c1.3 3.4 15.1 3.2 16 0 1.4-25.3 7.9-139.2 8-141.8 3.3-20.8 44.7-20.8 47.9 0 .2 2.7 6.6 116.5 8 141.8.9 3.2 14.8 3.4 16 0V16.3c2.6-21.6 44.8-21.4 48-1.1zm119.2 285.7l-15 185.1c-1.2 14 9.9 26 23.9 26h56c13.3 0 24-10.7 24-24V24c0-13.2-10.7-24-24-24-82.5 0-221.4 178.5-64.9 300.9z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 416 512'><path d='M207.9 15.2c.8 4.7 16.1 94.5 16.1 128.8 0 52.3-27.8 89.6-68.9 104.6L168 486.7c.7 13.7-10.2 25.3-24 25.3H80c-13.7 0-24.7-11.5-24-25.3l12.9-238.1C27.7 233.6 0 196.2 0 144 0 109.6 15.3 19.9 16.1 15.2 19.3-5.1 61.4-5.4 64 16.3v141.2c1.3 3.4 15.1 3.2 16 0 1.4-25.3 7.9-139.2 8-141.8 3.3-20.8 44.7-20.8 47.9 0 .2 2.7 6.6 116.5 8 141.8.9 3.2 14.8 3.4 16 0V16.3c2.6-21.6 44.8-21.4 48-1.1zm119.2 285.7l-15 185.1c-1.2 14 9.9 26 23.9 26h56c13.3 0 24-10.7 24-24V24c0-13.2-10.7-24-24-24-82.5 0-221.4 178.5-64.9 300.9z'/></svg>"); }
.fa-bars { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z'/></svg>"); }
.fa-plus { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z'/></svg>"); }
.fa-search { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z'/></svg>"); }
.fa-chevron-up { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z'/></svg>"); }
.fa-sun { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1z'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1z'/></svg>"); }
.fa-arrow-up { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M34.9 289.5l-22.2-22.2c-9.4-9.4-9.4-24.6 0-33.9L207 39c9.4-9.4 24.6-9.4 33.9 0l194.3 194.3c9.4 9.4 9.4 24.6 0 33.9l-22.2 22.2c-9.4 9.3-24.6 9.3-33.9 0L256 133.2V480c0 17.7-14.3 32-32 32h-32c-17.7 0-32-14.3-32-32V133.2L34.9 289.5z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M34.9 289.5l-22.2-22.2c-9.4-9.4-9.4-24.6 0-33.9L207 39c9.4-9.4 24.6-9.4 33.9 0l194.3 194.3c9.4 9.4 9.4 24.6 0 33.9l-22.2 22.2c-9.4 9.3-24.6 9.3-33.9 0L256 133.2V480c0 17.7-14.3 32-32 32h-32c-17.7 0-32-14.3-32-32V133.2L34.9 289.5z'/%3E%3C/svg%3E"); }
.fa-arrow-down { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M413.1 222.5l22.2 22.2c9.4 9.4 9.4 24.6 0 33.9L241 472.9c-9.4 9.4-24.6 9.4-33.9 0L12.7 278.6c-9.4-9.4-9.4-24.6 0-33.9l22.2-22.2c9.5-9.5 24.8-9.3 34.1.4L192 378.8V32c0-17.7 14.3-32 32-32h32c17.7 0 32 14.3 32 32v346.8l122.9-156c9.3-9.6 24.6-9.8 34.1-.3z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M413.1 222.5l22.2 22.2c9.4 9.4 9.4 24.6 0 33.9L241 472.9c-9.4 9.4-24.6 9.4-33.9 0L12.7 278.6c-9.4-9.4-9.4-24.6 0-33.9l22.2-22.2c9.5-9.5 24.8-9.3 34.1.4L192 378.8V32c0-17.7 14.3-32 32-32h32c17.7 0 32 14.3 32 32v346.8l122.9-156c9.3-9.6 24.6-9.8 34.1-.3z'/%3E%3C/svg%3E"); }

/* ══════════════════════════════════════════════════════════
   MOBILE RESPONSIVE STYLES (≤768px)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* ── Mobile Header ───────────────────────── */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: #343a40;
        color: #fff;
        padding: 8px 12px;
    }
    .mobile-account-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background: #fff;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        z-index: 1050;
        min-width: 160px;
        overflow: hidden;
    }
    .mobile-header-btn {
        background: none;
        border: none;
        color: #fff;
        padding: 8px;
        font-size: 1.2rem;
        cursor: pointer;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .mobile-header-title {
        font-weight: bold;
        font-size: 1.1rem;
    }

    /* ── Mobile Semester Tabs ────────────────── */
    .mobile-tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        background: #fff;
        border-bottom: 2px solid #dee2e6;
        padding: 0 8px;
        gap: 0;
        scrollbar-width: none;
    }
    .mobile-tabs::-webkit-scrollbar { display: none; }
    .mobile-tab {
        flex-shrink: 0;
        padding: 10px 16px;
        border: none;
        background: transparent;
        color: #6c757d;
        font-size: 0.95rem;
        font-weight: 500;
        border-bottom: 3px solid transparent;
        cursor: pointer;
        white-space: nowrap;
        min-height: 44px;
    }
    .mobile-tab.active {
        color: #0d6efd;
        border-bottom-color: #0d6efd;
        font-weight: bold;
    }
    .mobile-tab.summer { color: #856404; }
    .mobile-tab-add {
        flex-shrink: 0;
        padding: 10px 12px;
        border: none;
        background: transparent;
        color: #0d6efd;
        font-size: 1.1rem;
        font-weight: bold;
        cursor: pointer;
        min-width: 44px;
        min-height: 44px;
    }

    /* ── Mobile Semester Summary Card ─────────── */
    .mobile-sem-summary {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        background: #fff;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
        margin: 0 0 12px 0;
        padding: 16px;
        position: relative;
        z-index: 10;
    }
    .mobile-sem-summary-metrics {
        display: flex;
        flex: 1;
        gap: 24px;
        justify-content: center;
    }
    .mobile-sem-metric {
        text-align: center;
    }
    .mobile-sem-metric-value {
        font-size: 1.5rem;
        font-weight: bold;
        color: #212529;
        direction: ltr;
    }
    .mobile-sem-metric-label {
        font-size: 0.8rem;
        color: #6c757d;
        margin-top: 2px;
    }
    .mobile-sem-actions-btn {
        position: absolute;
        top: 8px;
        left: 8px;
        background: none;
        border: none;
        color: #6c757d;
        padding: 8px;
        cursor: pointer;
        min-width: 44px;
        min-height: 44px;
    }
    .mobile-sem-actions-menu {
        position: absolute;
        top: 44px;
        left: 8px;
        background: #fff;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        z-index: 100;
        min-width: 180px;
        overflow: hidden;
    }
    .mobile-sem-actions-menu a {
        display: flex;
        align-items: center;
        padding: 12px 16px;
        color: #212529;
        text-decoration: none;
        font-size: 0.95rem;
    }
    .mobile-sem-actions-menu a:hover {
        background: #f8f9fa;
    }

    /* ── Mobile Course Card ──────────────────── */
    .mobile-course-card {
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
        margin: 0 12px 10px;
        padding: 12px;
        border-right: 4px solid #dee2e6;
    }
    .mobile-course-card.course-type-0 { border-right-color: #6c757d; }
    .mobile-course-card.course-type-1 { border-right-color: #28a745; }
    .mobile-course-card.course-type-2 { border-right-color: #17a2b8; }
    .mobile-course-card.course-type-3 { border-right-color: #ffc107; }
    .mobile-course-card.course-type-4 { border-right-color: #6f42c1; }
    .mobile-course-card.course-type-5 { border-right-color: #dc3545; }

    .mobile-card-row {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }
    .mobile-card-row:last-child { margin-bottom: 0; }

    .mobile-card-row .form-control,
    .mobile-card-row .form-select {
        font-size: 0.9rem;
        min-height: 44px;
    }

    .mobile-card-drag {
        display: none;
    }

    /* ── Floating label fields ───────────────── */
    .mobile-float-field {
        position: relative;
        flex: 1;
    }
    .mobile-float-input {
        padding-top: 14px !important;
    }
    .mobile-float-label {
        position: absolute;
        top: 50%;
        right: 12px;
        transform: translateY(-50%);
        font-size: 0.75rem;
        color: #999;
        pointer-events: none;
        transition: all 0.15s ease;
        background: transparent;
        padding: 0 2px;
        max-width: calc(100% - 24px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    /* When input has value or is focused, shrink label to top-right */
    .mobile-float-input:focus ~ .mobile-float-label,
    .mobile-float-input:not(:placeholder-shown) ~ .mobile-float-label {
        top: 4px;
        transform: translateY(0);
        font-size: 0.65rem;
        color: #0d6efd;
        background: #fff;
        padding: 0 4px;
        border-radius: 2px;
    }
    /* Select always shows a value, so always float the label */
    .mobile-float-label-select {
        top: 4px !important;
        transform: translateY(0) !important;
        font-size: 0.65rem !important;
        color: #0d6efd !important;
        background: #fff;
        padding: 0 4px;
        border-radius: 2px;
    }

    .mobile-card-category {
        flex: 1;
    }

    .mobile-card-number {
        width: 110px;
        flex-shrink: 0;
    }

    /* ── Card actions menu ───────────────────── */
    .mobile-card-menu-wrap {
        position: relative;
        flex-shrink: 0;
    }
    .mobile-card-actions-btn {
        background: none;
        border: none;
        color: #6c757d;
        padding: 4px 8px;
        cursor: pointer;
        min-width: 36px;
        min-height: 36px;
    }
    .mobile-card-menu {
        position: absolute;
        bottom: 100%;
        right: 0;
        background: #fff;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
        z-index: 200;
        min-width: 180px;
    }
    .mobile-card-menu a {
        display: block;
        padding: 12px 16px;
        color: #212529;
        text-decoration: none;
        font-size: 0.95rem;
    }
    .mobile-card-menu a:hover {
        background: #f8f9fa;
    }
    .mobile-card-menu a:first-child {
        border-radius: 8px 8px 0 0;
    }
    .mobile-card-menu a:last-child {
        border-radius: 0 0 8px 8px;
    }

    .mobile-card-grade {
        flex: 1;
    }
    .mobile-binary-pass,
    .mobile-binary-pass:read-only,
    input.mobile-binary-pass {
        color: green !important;
        cursor: default;
        font-size: 1.2rem;
    }

    .mobile-card-points {
        flex: 1;
    }

    /* ── Mobile Action Buttons ───────────────── */
    .mobile-action-buttons {
        display: flex;
        gap: 10px;
        margin: 4px 12px 16px;
    }
    .mobile-action-buttons .btn {
        flex: 1;
        min-height: 44px;
        font-size: 0.95rem;
    }

    /* ── Mobile Degree Summary Bottom Sheet ──── */
    .mobile-degree-trigger {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #343a40;
        color: #fff;
        text-align: center;
        padding: 12px;
        cursor: pointer;
        z-index: 1030;
        font-weight: 500;
        border: none;
        width: 100%;
        font-size: 0.95rem;
    }
    .mobile-bottom-sheet-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1050;
    }
    .mobile-bottom-sheet {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
        overflow-y: auto;
        z-index: 1060;
        padding: 16px;
        padding-bottom: 32px;
        animation: slideUp 0.3s ease;
    }
    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
    .mobile-bottom-sheet-handle {
        width: 40px;
        height: 4px;
        background: #dee2e6;
        border-radius: 2px;
        margin: 0 auto 8px;
        cursor: pointer;
        padding: 10px 40px;
        background-clip: content-box;
    }

    /* ── Mobile Modals ───────────────────────── */
    .search-dialog {
        width: 95% !important;
        min-width: unset !important;
        max-width: unset !important;
        max-height: 90vh !important;
        margin: 0 auto;
        border-radius: 12px;
    }
    .search-overlay {
        padding-top: 20px !important;
        align-items: flex-start !important;
    }

    /* ── Hide desktop layout on mobile ────────── */
    .app-header { display: none !important; }
    .app-footer { display: none !important; }

    /* Container fluid tighter padding */
    .container-fluid { padding: 0 !important; }

    /* Main card removes desktop chrome */
    .desktop-only .card.shadow { border-radius: 0; box-shadow: none !important; margin: 0 !important; border: none; }
    .desktop-only .card-header { display: none; }
    .desktop-only .card-body { padding: 0 !important; }

    /* Hide desktop semester table */
    .semester-fade-in > .row.justify-content-md-center { display: none !important; }
    /* Hide desktop semester control buttons row */
    .semester-fade-in > .row:not(.justify-content-md-center) { display: none !important; }

    /* Hide desktop add-row/search buttons */
    .semester-fade-in .d-flex.justify-content-center { display: none !important; }

    /* Degree summary section — hide desktop version */
    .summary-collapse-wrapper { display: none !important; }
    .justify-content-md-center > button.btn-outline-dark { display: none !important; }

    /* Footer padding for bottom bar */
    body { padding-bottom: 50px; }
}
