.rooms-page {
    width: min(1180px, calc(100vw - 40px));
    margin: 0 auto;
    padding: 42px 0 56px;
    flex: 1;
}

.rooms-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(10, 10, 61, 0.1);
}

.rooms-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 5px 12px;
    border: 1px solid rgba(79, 110, 247, 0.2);
    border-radius: 999px;
    background: rgba(79, 110, 247, 0.08);
    color: #4f6ef7;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rooms-eyebrow::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #22c55e;
}

.rooms-hero h1 {
    color: #0a0a3d;
    font-size: 38px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.rooms-subtitle {
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
    max-width: 620px;
}

.rooms-summary {
    min-width: 220px;
    padding: 18px 20px;
    border: 1px solid rgba(10, 10, 61, 0.1);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 255, 0.98));
    box-shadow: 0 16px 36px rgba(10, 10, 61, 0.08);
}

.rooms-summary strong {
    display: block;
    color: #0a0a3d;
    font-size: 34px;
    line-height: 1;
}

.rooms-summary span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
}

.rooms-toolbar {
    display: grid;
    grid-template-columns: auto minmax(170px, 210px) minmax(160px, 190px) minmax(220px, 1fr);
    gap: 16px;
    margin: 22px 0 14px;
    padding: 18px;
    border: 1px solid rgba(10, 10, 61, 0.08);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(79, 110, 247, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 255, 0.98));
    box-shadow: 0 18px 40px rgba(10, 10, 61, 0.08);
}

.filter-tabs {
    display: inline-flex;
    align-self: end;
    padding: 6px;
    border: 1px solid rgba(132, 149, 255, 0.2);
    border-radius: 20px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 255, 0.98));
    box-shadow:
        0 18px 34px rgba(79, 110, 247, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.filter-tab {
    border: none;
    border-radius: 16px;
    background: transparent;
    color: #334155;
    cursor: pointer;
    font-size: 15px;
    font-weight: 800;
    min-height: 52px;
    padding: 0 22px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.filter-tab.active {
    background: linear-gradient(135deg, #0a0a3d, #1b1b6f);
    color: white;
    box-shadow: 0 14px 28px rgba(10, 10, 61, 0.22);
}

.filter-tab:hover {
    color: #0a0a3d;
    background: rgba(79, 110, 247, 0.08);
    transform: translateY(-1px);
}

.filter-field,
.room-search {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.custom-select {
    position: relative;
}

.filter-field span,
.room-search span {
    color: #5d6b88;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.select-shell {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    min-height: 56px;
    padding: 0 18px;
    border: 1px solid rgba(132, 149, 255, 0.28);
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 255, 0.98));
    box-shadow:
        0 18px 34px rgba(79, 110, 247, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.select-shell:focus-visible {
    outline: none;
}

.select-shell:hover {
    transform: translateY(-1px);
    border-color: rgba(79, 110, 247, 0.34);
    box-shadow:
        0 20px 38px rgba(79, 110, 247, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.select-shell::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 17px;
    background:
        radial-gradient(circle at top right, rgba(79, 110, 247, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 255, 0.96));
    pointer-events: none;
}

.select-shell::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 46px;
    width: 1px;
    height: 22px;
    background: linear-gradient(180deg, rgba(79, 110, 247, 0), rgba(79, 110, 247, 0.22), rgba(79, 110, 247, 0));
    transform: translateY(-50%);
    pointer-events: none;
}

.custom-select.open .select-shell {
    transform: translateY(-1px);
    border-color: rgba(79, 110, 247, 0.44);
    box-shadow:
        0 24px 42px rgba(79, 110, 247, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.custom-select.open .select-chevron {
    transform: translateY(-46%) rotate(225deg);
}

.select-value {
    position: relative;
    z-index: 1;
    display: block;
    max-width: calc(100% - 34px);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #0a0a3d;
    font-size: 16px;
    font-weight: 700;
    text-align: left;
}

.filter-select-hidden {
    display: none;
}

.room-search-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 56px;
    padding: 0 6px 0 16px;
    border: 1px solid rgba(79, 110, 247, 0.18);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f7f9ff);
    box-shadow: 0 10px 24px rgba(79, 110, 247, 0.08);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.room-search-box.active,
.room-search-box:focus-within {
    border-color: rgba(79, 110, 247, 0.45);
    box-shadow: 0 14px 28px rgba(79, 110, 247, 0.16);
    transform: translateY(-1px);
}

.room-search input {
    width: 100%;
    min-height: 54px;
    border: none;
    background: transparent;
    color: #0a0a3d;
    font: inherit;
    outline: none;
}

.room-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 12px;
    background: rgba(79, 110, 247, 0.12);
    color: #4f6ef7;
    cursor: pointer;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.room-search-clear:hover {
    background: rgba(79, 110, 247, 0.18);
    color: #3558f2;
    transform: translateY(-1px);
}

.room-search-clear:focus-visible {
    outline: none;
    background: rgba(79, 110, 247, 0.18);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.18);
}

.room-search-clear span {
    transform: translateY(-2px);
}

.room-search-clear[hidden] {
    display: none;
}

.room-search-button {
    background: linear-gradient(135deg, #0a0a3d, #1b1b6f);
    border: none;
    min-width: 46px;
    min-height: 44px;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(10, 10, 61, 0.16);
}

.room-search-button-icon {
    position: relative;
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2.5px solid #ffffff;
    border-radius: 50%;
}

.room-search-button-icon::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 2.5px;
    border-radius: 999px;
    background: #ffffff;
    right: -6px;
    bottom: -3px;
    transform: rotate(45deg);
}

.room-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 45;
    display: none;
    overflow: hidden;
    border: 1px solid rgba(132, 149, 255, 0.18);
    border-radius: 16px;
    background: radial-gradient(circle at top right, rgba(79, 110, 247, 0.12), transparent 32%), linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(244, 247, 255, 0.98));
    box-shadow: 0 24px 44px rgba(10, 10, 61, 0.12);
}

.room-search-results.show {
    display: block;
}

.room-search-result {
    width: 100%;
    padding: 11px 14px;
    border: none;
    border-bottom: 1px solid rgba(226, 232, 240, 0.72);
    background: transparent;
    color: #122033;
    text-align: left;
    cursor: pointer;
}

.room-search-result:last-child {
    border-bottom: none;
}

.room-search-result strong,
.room-search-result span {
    display: block;
}

.room-search-result strong {
    font-size: 14px;
}

.room-search-result span {
    color: #64748b;
    font-size: 11px;
    margin-top: 4px;
}

.room-search-result:hover {
    background: rgba(79, 110, 247, 0.06);
}

.room-search-result.muted {
    cursor: default;
    color: #94a3b8;
}

.select-chevron {
    position: absolute;
    right: 18px;
    top: 50%;
    z-index: 1;
    width: 12px;
    height: 12px;
    border-right: 3px solid #1d2d75;
    border-bottom: 3px solid #1d2d75;
    transform: translateY(-62%) rotate(45deg);
    pointer-events: none;
    opacity: 0.92;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.7));
    transition: transform 0.18s ease;
}

.select-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 40;
    display: grid;
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid rgba(132, 149, 255, 0.24);
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(79, 110, 247, 0.12), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(244, 247, 255, 0.98));
    box-shadow: 0 28px 54px rgba(10, 10, 61, 0.14);
    backdrop-filter: blur(16px);
}

.select-menu[hidden] {
    display: none;
}

.select-option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    color: #0a0a3d;
    cursor: pointer;
    text-align: left;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.select-option span {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.select-option:hover {
    transform: translateX(2px);
    background: rgba(79, 110, 247, 0.08);
    border-color: rgba(79, 110, 247, 0.14);
}

.select-option.active {
    background: linear-gradient(180deg, #eef2ff, #e3eaff);
    border-color: rgba(79, 110, 247, 0.2);
    box-shadow: inset 0 0 0 1px rgba(79, 110, 247, 0.05);
}

.select-option.active::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4f6ef7, #1d4ed8);
    box-shadow: 0 0 0 5px rgba(79, 110, 247, 0.12);
}

.rooms-status {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.room-card {
    min-height: 208px;
    display: flex;
    flex-direction: column;
    padding: 18px;
    border: 1px solid rgba(10, 10, 61, 0.1);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 250, 255, 0.99));
    box-shadow: 0 14px 30px rgba(10, 10, 61, 0.06);
}

.room-card.free {
    border-color: rgba(22, 163, 74, 0.18);
    box-shadow: 0 16px 34px rgba(22, 163, 74, 0.08);
}

.room-card.booked {
    border-color: rgba(190, 24, 93, 0.18);
    box-shadow: 0 16px 34px rgba(190, 24, 93, 0.08);
}

.room-card-top {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.room-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.room-card-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    min-width: 0;
}

.building-badge {
    display: inline-flex;
    min-width: 32px;
    height: 24px;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef0fd;
    color: #4f6ef7;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.room-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.room-type-badge.study-room {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

.room-type-badge.classroom {
    background: rgba(15, 118, 110, 0.1);
    color: #0f766e;
}

.room-card h2 {
    color: #0a0a3d;
    font-size: 24px;
    line-height: 1.08;
    margin: 0;
}

.status-pill {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.status-pill.free {
    background: rgba(22, 163, 74, 0.1);
    color: #166534;
}

.status-pill.booked {
    background: rgba(190, 24, 93, 0.1);
    color: #9f1239;
}

.room-status-text {
    color: #0a0a3d;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
}

.room-detail {
    min-height: 32px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

.room-actions {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.room-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    background: #0a0a3d;
    color: white;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(10, 10, 61, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.room-link:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(29, 78, 216, 0.2);
}

.room-link.room-link-secondary {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff;
    border: 1px solid rgba(22, 163, 74, 0.22);
    box-shadow:
        0 14px 26px rgba(22, 163, 74, 0.18),
        inset 0 1px 0 rgba(255,255,255,0.16);
}

.room-link.room-link-secondary:hover {
    background: linear-gradient(135deg, #15803d, #166534);
    color: #ffffff;
    box-shadow:
        0 18px 30px rgba(22, 163, 74, 0.22),
        inset 0 1px 0 rgba(255,255,255,0.16);
}

.empty-state {
    grid-column: 1 / -1;
    padding: 34px;
    border: 1px solid rgba(10, 10, 61, 0.1);
    border-radius: 18px;
    background: white;
    text-align: center;
    box-shadow: 0 14px 30px rgba(10, 10, 61, 0.05);
}

.empty-state strong,
.empty-state span {
    display: block;
}

.empty-state strong {
    color: #0a0a3d;
    font-size: 18px;
    margin-bottom: 6px;
}

.empty-state span {
    color: #64748b;
    font-size: 13px;
}

.empty-state.error {
    border-color: rgba(159, 18, 57, 0.18);
}

@media (max-width: 980px) {
    .rooms-toolbar {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 780px) {
    .rooms-page {
        width: min(100vw - 24px, 1180px);
        padding-top: 26px;
    }

    .rooms-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .rooms-hero h1 {
        font-size: 30px;
    }

    .rooms-summary {
        width: 100%;
    }

    .rooms-toolbar {
        grid-template-columns: 1fr;
    }

    .filter-tabs {
        width: 100%;
    }

    .filter-tab {
        flex: 1;
    }
}


