/* ===========================
   DESIGN VARIABLES
=========================== */

:root {
    --sidebar: #12263a;
    --sidebar-light: #1c3853;

    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;

    --green: #15803d;
    --green-light: #dcfce7;

    --orange: #c2410c;
    --orange-light: #ffedd5;

    --purple: #7e22ce;
    --purple-light: #f3e8ff;

    --background: #f4f7fb;
    --surface: #ffffff;

    --text: #172033;
    --muted: #6b7688;
    --border: #dfe5ec;

    --shadow:
        0 12px 30px rgba(25, 42, 70, 0.08);

    --radius: 18px;
}


/* ===========================
   GLOBAL
=========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button,
select {
    cursor: pointer;
}


/* ===========================
   SIDEBAR
=========================== */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;

    width: 250px;
    height: 100vh;

    display: flex;
    flex-direction: column;

    background: var(--sidebar);
    color: white;

    padding: 28px 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 42px;

    color: white;
    font-size: 1.05rem;
    line-height: 1.2;
}

.brand strong {
    display: block;
    color: #8db8ff;
}

.brand-icon {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 12px;

    background: var(--primary);
    color: white;

    font-size: 1.2rem;
    font-weight: 900;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 13px;

    border-radius: 12px;
    padding: 12px 14px;

    color: #b9c7d6;
    font-weight: 700;

    transition:
        background 160ms ease,
        color 160ms ease;
}

.nav-item:hover,
.nav-item.active {
    background: var(--sidebar-light);
    color: white;
}

.nav-icon {
    width: 22px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;

    border-radius: 16px;

    background: var(--sidebar-light);

    padding: 18px;
}

.sidebar-footer p {
    margin-bottom: 12px;
    color: #cad7e4;
    font-size: 0.9rem;
}

.sidebar-footer a {
    display: block;

    border-radius: 10px;

    background: var(--primary);
    color: white;

    padding: 10px 14px;

    text-align: center;
    font-weight: 800;
}


/* ===========================
   APPLICATION CONTAINER
=========================== */

.app-container {
    margin-left: 250px;
    min-height: 100vh;
}


/* ===========================
   TOP BAR
=========================== */

.topbar {
    min-height: 92px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    border-bottom: 1px solid var(--border);

    background: var(--surface);

    padding: 18px 40px;
}

.page-label,
.section-label {
    margin-bottom: 4px;

    color: var(--primary);

    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.topbar h1 {
    font-size: 1.65rem;
    line-height: 1.2;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.notification-button {
    width: 42px;
    height: 42px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: white;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 11px;
}

.user-avatar {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: var(--primary-light);
    color: var(--primary);

    font-size: 0.85rem;
    font-weight: 900;
}

.user-profile strong,
.user-profile span {
    display: block;
}

.user-profile span {
    color: var(--muted);
    font-size: 0.78rem;
}


/* ===========================
   MAIN LAYOUT
=========================== */

main {
    padding: 34px 40px 70px;
}


/* ===========================
   SEARCH PANEL
=========================== */

.search-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    align-items: end;
    gap: 18px;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: var(--surface);

    padding: 22px;

    box-shadow: var(--shadow);
}

.search-panel label {
    display: block;

    margin-bottom: 7px;

    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.search-panel input,
.search-panel select {
    width: 100%;

    border: 1px solid var(--border);
    border-radius: 11px;

    background: white;

    padding: 12px 13px;
}

.search-button,
.primary-button,
.card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: var(--primary);
    color: white;

    padding: 12px 18px;

    font-weight: 800;

    transition:
        background 160ms ease,
        transform 160ms ease;
}

.search-button:hover,
.primary-button:hover,
.card-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}


/* ===========================
   OVERVIEW CARDS
=========================== */

.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;

    margin: 24px 0;
}

.overview-card {
    display: flex;
    align-items: center;
    gap: 16px;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: var(--surface);

    padding: 20px;

    box-shadow: var(--shadow);
}

.overview-icon {
    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    border-radius: 14px;

    font-size: 1.2rem;
    font-weight: 900;
}

.overview-icon.available {
    background: var(--green-light);
    color: var(--green);
}

.overview-icon.scheduled {
    background: var(--primary-light);
    color: var(--primary);
}

.overview-icon.capacity-icon {
    background: var(--purple-light);
    color: var(--purple);
}

.overview-card span,
.overview-card strong {
    display: block;
}

.overview-card span {
    color: var(--muted);
    font-size: 0.82rem;
}

.overview-card strong {
    margin-top: 3px;
    font-size: 1.15rem;
}


/* ===========================
   FEATURED WORKSPACE
=========================== */

.featured-section {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;

    overflow: hidden;

    border-radius: 24px;

    background: var(--sidebar);
    color: white;

    box-shadow: var(--shadow);
}

.featured-content {
    padding: 42px;
}

.featured-content .section-label {
    margin-top: 22px;
    color: #8db8ff;
}

.featured-content h2 {
    margin-bottom: 14px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
}

.featured-content p {
    max-width: 600px;

    margin-bottom: 22px;

    color: #c3cfda;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;

    margin-bottom: 26px;
}

.feature-tags span {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;

    padding: 6px 10px;

    color: #d7e1ea;
    font-size: 0.78rem;
}

.featured-visual {
    min-height: 390px;

    display: flex;
    align-items: flex-end;

    background:
        linear-gradient(
            to top,
            rgba(9, 23, 37, 0.82),
            rgba(9, 23, 37, 0.05)
        ),
        linear-gradient(
            135deg,
            #54738f,
            #91a9bd
        );
}

.room-visual-content {
    padding: 32px;
}

.room-visual-content span,
.room-visual-content strong {
    display: block;
}

.room-visual-content span {
    color: #dce6ee;
}

.room-visual-content strong {
    margin-top: 3px;
    font-size: 1.4rem;
}


/* ===========================
   STATUS BADGES
=========================== */

.status-badge {
    display: inline-flex;
    align-items: center;

    border-radius: 999px;

    padding: 6px 10px;

    font-size: 0.72rem;
    font-weight: 900;
}

.available-status {
    background: var(--green-light);
    color: var(--green);
}

.busy-status {
    background: var(--orange-light);
    color: var(--orange);
}


/* ===========================
   SPACES SECTION
=========================== */

.spaces-section,
.availability-section {
    padding-top: 54px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 22px;
}

.section-heading h2 {
    font-size: 1.8rem;
}

.section-heading > a {
    color: var(--primary);
    font-weight: 800;
}

.workspace-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.workspace-card {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: var(--surface);

    box-shadow: var(--shadow);
}

.workspace-image {
    position: relative;

    min-height: 190px;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    padding: 18px;
}

.focus-room {
    background:
        linear-gradient(
            135deg,
            #c9dbe8,
            #7997ad
        );
}

.meeting-room {
    background:
        linear-gradient(
            135deg,
            #d8c9b5,
            #9b7e5e
        );
}

.conference-room {
    background:
        linear-gradient(
            135deg,
            #abbccc,
            #536b80
        );
}

.training-room {
    background:
        linear-gradient(
            135deg,
            #c3c8d8,
            #737e9e
        );
}

.room-number {
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.9);

    padding: 6px 10px;

    color: var(--text);
    font-size: 0.72rem;
    font-weight: 900;
}

.workspace-card-body {
    padding: 22px;
}

.workspace-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.workspace-title h3 {
    margin-bottom: 3px;
    font-size: 1.2rem;
}

.workspace-title p,
.workspace-card-body > p {
    color: var(--muted);
}

.workspace-title p {
    font-size: 0.78rem;
}

.capacity-badge {
    min-width: 36px;
    height: 36px;

    display: grid;
    place-items: center;

    border-radius: 11px;

    background: var(--primary-light);
    color: var(--primary);

    font-size: 0.82rem;
    font-weight: 900;
}

.amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin: 18px 0;

    list-style: none;
}

.amenities li {
    border-radius: 999px;

    background: var(--background);

    padding: 5px 9px;

    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
}

.card-button {
    width: 100%;
}


/* ===========================
   SCHEDULE
=========================== */

.schedule-card {
    overflow-x: auto;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: var(--surface);

    box-shadow: var(--shadow);
}

.schedule-header,
.schedule-row {
    min-width: 780px;

    display: grid;
    grid-template-columns: 180px repeat(6, 1fr);
    align-items: center;
    gap: 10px;

    padding: 16px 18px;
}

.schedule-header {
    border-bottom: 1px solid var(--border);

    background: #f8fafc;

    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
}

.schedule-row {
    border-bottom: 1px solid var(--border);
}

.schedule-row:last-child {
    border-bottom: none;
}

.slot {
    border-radius: 9px;

    padding: 8px 5px;

    text-align: center;
    font-size: 0.72rem;
    font-weight: 900;
}

.slot.open {
    background: var(--green-light);
    color: var(--green);
}

.slot.booked {
    background: #edf0f4;
    color: #7f8997;
}


/* ===========================
   FOOTER
=========================== */

footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;

    border-top: 1px solid var(--border);

    background: var(--surface);
    color: var(--muted);

    padding: 24px 40px;

    font-size: 0.82rem;
}


/* ===========================
   FOCUS STATES
=========================== */

a:focus-visible,
button:focus-visible,
input:focus,
select:focus {
    outline: 3px solid rgba(37, 99, 235, 0.22);
    outline-offset: 2px;
}


/* ===========================
   RESPONSIVE DESIGN
=========================== */

@media (max-width: 1100px) {

    .search-panel {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-button {
        width: 100%;
    }

    .featured-section {
        grid-template-columns: 1fr;
    }

    .featured-visual {
        min-height: 260px;
    }

}


@media (max-width: 850px) {

    .sidebar {
        position: static;

        width: 100%;
        height: auto;

        padding: 18px 20px;
    }

    .brand {
        margin-bottom: 18px;
    }

    .sidebar-nav {
        display: flex;
        overflow-x: auto;
    }

    .nav-item {
        flex: 0 0 auto;
    }

    .sidebar-footer {
        display: none;
    }

    .app-container {
        margin-left: 0;
    }

    .topbar {
        padding: 18px 24px;
    }

    main {
        padding: 28px 24px 60px;
    }

    .overview-grid,
    .workspace-grid {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 620px) {

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .featured-content {
        padding: 28px 22px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    footer {
        flex-direction: column;

        padding: 24px;
    }

}