:root {
    --sidebar-width: 240px;
    --bg: #f4f6f9;
    --sidebar-bg: #1e293b;
    --sidebar-text: #e2e8f0;
    --sidebar-active: #3b82f6;
    --content-bg: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --card-bg: #f8fafc;
    --lab-bg: #dbeafe;
    --lunch-bg: #dcfce7;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.brand {
    padding: 1.25rem 1rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand h1 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.35;
    font-weight: 700;
}

.brand p {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.nav {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 0;
}

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
    background: rgba(59, 130, 246, 0.15);
    border-left-color: var(--sidebar-active);
    color: #ffffff;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1rem;
    font-size: 0.75rem;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.content {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow: auto;
}

.content-panel {
    background: var(--content-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.content-panel.hidden {
    display: none;
}

.content-panel h2 {
    margin: 0 0 1rem;
    font-size: 1.5rem;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 1rem;
}

.panel-heading h2 {
    margin: 0;
}

.meeting-mode-btn {
    margin-left: auto;
    flex-shrink: 0;
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--text);
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.meeting-mode-btn:hover {
    background: #e2e8f0;
}

.meeting-mode-btn.is-active {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
}

.class-teachers-panel {
    margin-top: 0.25rem;
}

.class-teachers-panel.hidden,
#faculty-default-view.hidden {
    display: none;
}

.class-teachers-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin: 0 0 1rem;
}

.class-teachers-filters-label {
    font-weight: 600;
    font-size: 0.92rem;
}

.class-teachers-output {
    overflow-x: auto;
}

.class-teachers-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
    font-size: 0.9rem;
}

.class-teachers-table th,
.class-teachers-table td {
    border: 1px solid var(--border);
    padding: 0.55rem 0.7rem;
    text-align: left;
    vertical-align: top;
}

.class-teachers-table th {
    background: #f8fafc;
    font-weight: 600;
}

.class-teachers-table a {
    color: var(--sidebar-active);
    text-decoration: none;
}

.class-teachers-table a:hover {
    text-decoration: underline;
}

.lead {
    font-size: 1.05rem;
    color: var(--muted);
    margin-top: 0;
}

.placeholder {
    padding: 1rem 1.25rem;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--muted);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.1rem;
}

.card h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.selector-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.25rem 0 1.5rem;
}

.selector-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.selector-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    min-height: 160px;
    display: flex;
    flex-direction: column;
}

.selector-card-full {
    min-height: auto;
}

.selector-card h3 {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.radio-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    overflow: auto;
    flex: 1;
}

.radio-list label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.radio-list label:hover {
    background: rgba(59, 130, 246, 0.08);
}

.radio-list input {
    margin: 0;
}

.radio-list-inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
}

.muted-box .hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.timetable-output {
    margin-top: 0.5rem;
}

.timetable-title {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
}

.timetable-subtitle {
    margin: 0 0 0.75rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.timetable-wrap {
    overflow-x: auto;
}

.timetable-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
    font-size: 0.88rem;
}

.timetable-table th,
.timetable-table td {
    border: 1px solid var(--border);
    padding: 0.55rem 0.45rem;
    text-align: center;
    vertical-align: middle;
}

.timetable-table thead th {
    background: #eef2ff;
    font-weight: 600;
}

.timetable-table tbody th {
    background: #f8fafc;
    font-weight: 600;
    white-space: nowrap;
}

.timetable-table td.cell-class {
    background: #eff6ff;
}

.timetable-table td.cell-lab {
    background: var(--lab-bg);
    font-weight: 600;
    min-width: 120px;
}

.timetable-table td.cell-sametime {
    background: #fce7f3;
    font-weight: 600;
    min-width: 120px;
}

.timetable-table td.cell-lunch {
    background: var(--lunch-bg);
    color: #166534;
    font-weight: 700;
    font-size: 0.78rem;
}

.subject-list-section {
    margin-top: 1.5rem;
}

.subject-list-title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.subject-list-wrap {
    overflow-x: auto;
}

.subject-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.subject-list-table th,
.subject-list-table td {
    border: 1px solid var(--border);
    padding: 0.55rem 0.65rem;
    text-align: left;
    vertical-align: top;
}

.subject-list-table thead th {
    background: #f1f5f9;
    font-weight: 600;
}

.subject-list-table td.subject-name {
    min-width: 220px;
}

.subject-list-table td.subject-faculty {
    min-width: 180px;
}

.faculty-search {
    position: relative;
    margin: 1.25rem 0 1.5rem;
    max-width: 640px;
}

.faculty-search label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.faculty-search input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--content-bg);
    color: var(--text);
}

.faculty-search input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.subject-offerings-wrap {
    overflow-x: auto;
    margin-top: 0.75rem;
}

.subject-offerings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.subject-offerings-table th,
.subject-offerings-table td {
    border-bottom: 1px solid var(--border);
    text-align: left;
    padding: 0.55rem 0.4rem;
    vertical-align: middle;
}

.subject-offerings-table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.subject-link-btn {
    border: 0;
    background: transparent;
    color: #2563eb;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.subject-link-btn:hover {
    color: #1d4ed8;
}

.subject-meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0.25rem 0 0.75rem;
}

.search-results {
    position: absolute;
    z-index: 10;
    left: 0;
    right: 0;
    margin-top: 0.35rem;
    background: var(--content-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    max-height: 280px;
    overflow: auto;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.search-results.hidden {
    display: none;
}

.search-results button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.65rem 0.85rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.92rem;
    color: var(--text);
}

.search-results button:hover,
.search-results button.active {
    background: rgba(59, 130, 246, 0.08);
}

.search-results .no-results {
    margin: 0;
    padding: 0.75rem 0.85rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.report-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.report-item {
    margin: 0;
}

.report-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.report-item a:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.report-item a::before {
    content: "PDF";
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #b91c1c;
    background: #fee2e2;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
}

.home-live {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.home-top-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.home-clock-card,
.home-program-card {
    min-width: 0;
}

.home-program-card {
    min-height: 0;
}

.home-clock {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 1.25rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.clock-time {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}

.clock-date,
.clock-status {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.period-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.period-tab {
    flex: 1 1 100px;
    min-width: 92px;
    padding: 0.65rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card-bg);
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.period-tab:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.period-tab.active {
    background: #dbeafe;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.period-tab.current:not(.active) {
    border-color: #22c55e;
}

.period-tab-label {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
}

.period-tab-time {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.25;
}

.period-tab.lunch .period-tab-label::after {
    content: " · Lunch";
    font-weight: 500;
    color: #166534;
}

.period-output-title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: var(--muted);
}

.period-session-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.period-session-item {
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card-bg);
    font-size: 0.92rem;
    line-height: 1.45;
}

.period-session-room {
    font-weight: 700;
    color: #1d4ed8;
}

.period-session-subject {
    font-weight: 600;
}

.period-session-faculty {
    color: var(--muted);
}

.period-session-batch {
    font-weight: 600;
    color: #0f766e;
}

a.period-session-room,
a.period-session-batch,
a.period-session-faculty {
    text-decoration: none;
    cursor: pointer;
}

a.period-session-room:hover,
a.period-session-batch:hover,
a.period-session-faculty:hover {
    text-decoration: underline;
}

a.period-session-faculty {
    color: #334155;
}

.room-picker {
    margin: 1.25rem 0 1.5rem;
}

.room-picker label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.room-picker input {
    width: 100%;
    max-width: 640px;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--content-bg);
    color: var(--text);
    margin-bottom: 0.75rem;
}

.room-picker input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.room-type-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
}

.room-type-tab {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card-bg);
    cursor: pointer;
    font-size: 0.85rem;
}

.room-type-tab.active {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1d4ed8;
    font-weight: 600;
}

.room-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    max-height: 220px;
    overflow: auto;
    padding: 0.15rem;
}

.room-option {
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    cursor: pointer;
    font-size: 0.88rem;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.room-option:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.room-option.active {
    background: #dbeafe;
    border-color: #3b82f6;
    font-weight: 600;
}

.room-option-meta {
    margin-left: 0.35rem;
    font-size: 0.72rem;
    color: var(--muted);
}

.floor-plan-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.85rem 0 1rem;
}

.floor-plan-tab {
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card-bg);
    cursor: pointer;
    font-size: 0.88rem;
}

.floor-plan-tab.active {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1d4ed8;
    font-weight: 600;
}

.floor-plan-viewer {
    margin-top: 0.5rem;
}

.floor-plan-frame {
    margin-top: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
    overflow: auto;
    max-height: min(78vh, 920px);
}

.floor-plan-frame img {
    display: block;
    width: 100%;
    height: auto;
    min-width: 640px;
}

.meeting-slot-grid-wrap {
    overflow: auto;
    margin: 1rem 0 1.25rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.meeting-slot-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.meeting-slot-table th,
.meeting-slot-table td {
    border: 1px solid var(--border);
    text-align: center;
    padding: 0.55rem 0.35rem;
    font-size: 0.82rem;
}

.meeting-slot-table thead th {
    background: #f8fafc;
    font-weight: 600;
}

.meeting-slot-table tbody th {
    background: #f8fafc;
    text-align: left;
    padding-left: 0.75rem;
    white-space: nowrap;
}

.meeting-slot-table td.slot-free {
    background: #22c55e;
}

.meeting-slot-table td.slot-busy {
    background: #ef4444;
}

.meeting-slot-table.free-faculty-mode td[data-day][data-period] {
    background: #fff;
    cursor: pointer;
}

.meeting-slot-table.free-faculty-mode td.slot-picked {
    background: #86efac;
    outline: 2px solid #16a34a;
    outline-offset: -2px;
}

.meeting-faculty-search {
    margin-top: 0.5rem;
}

.meeting-program-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.85rem;
    align-items: center;
    margin: 0 0 0.85rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
}

.meeting-program-filters.hidden {
    display: none;
}

.meeting-program-filters-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    margin-right: 0.25rem;
}

.meeting-program-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.88rem;
    cursor: pointer;
    user-select: none;
}

.meeting-program-filter input {
    margin: 0;
}

.meeting-faculty-selected {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
    resize: vertical;
    background: #f8fafc;
}

.meeting-free-faculty-panel {
    margin-top: 1.25rem;
}

.meeting-free-faculty-panel.hidden,
#meeting-finder-controls.hidden,
#room-schedule-main.hidden {
    display: none;
}

.meeting-free-faculty-panel h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.meeting-free-faculty-output {
    margin-top: 0.75rem;
    display: grid;
    gap: 0.85rem;
}

.meeting-free-slot-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    background: #f8fafc;
}

.meeting-free-slot-card h4 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.meeting-free-slot-card .free-count {
    color: var(--muted);
    font-weight: 500;
}

.meeting-free-slot-card ul {
    margin: 0;
    padding-left: 1.1rem;
    columns: 2;
    column-gap: 1.5rem;
}

.meeting-free-slot-card li {
    break-inside: avoid;
    margin: 0.15rem 0;
    font-size: 0.88rem;
}

@media (max-width: 720px) {
    .meeting-free-slot-card ul {
        columns: 1;
    }

    .panel-heading {
        flex-wrap: wrap;
    }
}

.swap-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.25rem 0 1rem;
}

.swap-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
}

.swap-card h3 {
    margin: 0 0 0.85rem;
    font-size: 1rem;
}

.swap-field {
    margin-bottom: 0.75rem;
}

.swap-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.swap-preview {
    margin-top: 0.5rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.88rem;
    line-height: 1.45;
}

.swap-actions {
    display: flex;
    justify-content: center;
    margin: 0.5rem 0 1.25rem;
}

.swap-evaluate-btn {
    padding: 0.7rem 1.25rem;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.swap-evaluate-btn:hover {
    background: #1d4ed8;
}

.feedback-action {
    margin-top: 1.25rem;
}

.feedback-open-btn {
    display: inline-block;
    padding: 0.7rem 1.25rem;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.feedback-open-btn:hover {
    background: #1d4ed8;
}

.swap-results {
    margin-top: 0.5rem;
}

.swap-summary {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.swap-summary.ok {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.swap-summary.warn {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.swap-summary.bad {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.swap-section-title {
    margin: 1rem 0 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.swap-step-list,
.swap-conflict-list,
.swap-domino-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.swap-step-item,
.swap-conflict-item,
.swap-domino-item {
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card-bg);
    font-size: 0.9rem;
    line-height: 1.45;
}

.swap-conflict-item {
    border-color: #fca5a5;
    background: #fff1f2;
}

.swap-domino-item {
    border-color: #fcd34d;
    background: #fffbeb;
}

@media (max-width: 960px) {
    .home-top-row {
        grid-template-columns: 1fr;
    }

    .swap-cards {
        grid-template-columns: 1fr;
    }

    .selector-row {
        grid-template-columns: 1fr;
    }

    .selector-card,
    .selector-card-full {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.25rem;
        padding: 0.5rem;
    }

    .nav-link {
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 0.55rem 0.75rem;
    }

    .nav-link.active {
        border-bottom-color: var(--sidebar-active);
    }

    .content {
        padding: 1rem;
    }
}
