:root {
    --navy: #102a43;
    --navy2: #173f67;
    --blue: #2f80ed;
    --cyan: #38bdf8;
    --bg: #f4f7fb;
    --card: #fff;
    --text: #1d2939;
    --muted: #667085;
    --line: #e4e7ec;
    --success: #12b76a;
    --warn: #f79009;
    --danger: #f04438;
    --shadow: 0 12px 32px rgba(16, 42, 67, .08);
    --radius: 18px
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: "Rubik", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5
}

.app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 270px 1fr
}

.sidebar {
    background: linear-gradient(180deg, var(--navy), #0c2135);
    color: #dbeafe;
    padding: 24px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden
}

.sidebar-brand {
    flex-shrink: 0
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px 20px
}

.nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch
}

.nav-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 12px;
    margin: 3px 0;
    border-radius: 10px;
    color: #b8c9d8;
    font-size: 14px;
    background: transparent;
    border: 0;
    font: inherit;
    text-align: left;
    cursor: pointer
}

.nav-logout:hover:not(:disabled),
.nav-logout:focus-visible:not(:disabled) {
    background: rgba(255, 255, 255, .10);
    color: #fff;
    outline: none
}

.nav-logout:disabled {
    opacity: .65;
    cursor: not-allowed
}

.mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(16, 42, 67, .45);
    z-index: 15
}

.brandmark {
    width: 75px;
    height: 75px;
    border-radius: 13px;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(0) invert(1)
}

.brand b {
    display: block;
    color: #fff
}

.brand small {
    color: #9fb5c8
}

.nav-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #7992a8;
    padding: 18px 12px 8px
}

.nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    margin: 3px 0;
    border-radius: 10px;
    color: #b8c9d8;
    font-size: 14px
}

.nav a:hover,
.nav a.active {
    background: rgba(255, 255, 255, .10);
    color: #fff
}

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

.main {
    min-width: 0
}

.top {
    height: 76px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 5
}

.search {
    width: min(360px, 45vw);
    background: #f7f9fc;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 14px;
    color: var(--muted)
}

.top-right {
    display: flex;
    align-items: center;
    gap: 18px
}

.bell {
    position: relative;
    font-size: 20px
}

.dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    top: 0;
    right: -3px
}

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

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #dcecff;
    color: var(--blue);
    display: grid;
    place-items: center;
    font-weight: 800
}

.profile small {
    display: block;
    color: var(--muted)
}

.content {
    padding: 32px
}

.mobile-toggle {
    display: none;
    border: 0;
    background: none;
    font-size: 24px
}

.eyebrow {
    font-size: 12px;
    color: var(--blue);
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase
}

.title {
    font-size: 30px;
    margin: 5px 0 4px
}

.sub {
    color: var(--muted);
    margin: 0
}

.grid {
    display: grid;
    gap: 20px
}

.stats {
    grid-template-columns: repeat(4, 1fr);
    margin: 26px 0
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow)
}

.stat {
    padding: 20px
}

.stat-top {
    display: flex;
    justify-content: space-between
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #edf5ff;
    display: grid;
    place-items: center;
    font-size: 20px
}

.stat .value {
    font-size: 28px;
    font-weight: 800;
    margin: 18px 0 2px
}

.muted {
    color: var(--muted);
    font-size: 13px
}

.trend {
    color: var(--success);
    font-size: 12px;
    font-weight: 700
}

.dashboard-grid {
    grid-template-columns: 1.3fr .7fr
}

.panel {
    padding: 24px
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px
}

.panel h2 {
    font-size: 18px;
    margin: 0
}

.link {
    color: var(--blue);
    font-size: 13px;
    font-weight: 700
}

.event {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line)
}

.event:last-child {
    border: 0
}

.date {
    width: 54px;
    height: 58px;
    border-radius: 12px;
    background: #eef6ff;
    color: var(--blue);
    display: grid;
    place-items: center;
    text-align: center;
    font-size: 11px;
    font-weight: 700
}

.date b {
    font-size: 21px;
    display: block
}

.event h3 {
    font-size: 15px;
    margin: 0 0 3px
}

.event p {
    margin: 0;
    color: var(--muted);
    font-size: 13px
}

.notice {
    display: flex;
    gap: 13px;
    padding: 15px;
    background: #fffaf0;
    border: 1px solid #f6e4b8;
    border-radius: 12px;
    margin-bottom: 12px
}

.quick {
    grid-template-columns: repeat(2, 1fr)
}

.quick a {
    padding: 18px
}

.quick span {
    display: block;
    font-size: 25px;
    margin-bottom: 10px
}

.quick b {
    font-size: 14px
}

.table {
    width: 100%;
    border-collapse: collapse
}

.table th,
.table td {
    text-align: left;
    padding: 14px;
    border-bottom: 1px solid var(--line);
    font-size: 13px
}

.table th {
    color: var(--muted);
    font-weight: 700
}

.badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: #ecfdf3;
    color: #027a48
}

.badge.warn {
    background: #fff7e6;
    color: #b54708
}

.btn {
    border: 0;
    border-radius: 10px;
    padding: 11px 16px;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    cursor: pointer
}

.btn.secondary {
    background: #fff;
    color: var(--navy);
    border: 1px solid var(--line)
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 24px
}

.two {
    grid-template-columns: 1fr 1fr
}

.three {
    grid-template-columns: repeat(3, 1fr)
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px
}

.field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 7px
}

.input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font: inherit
}

.member-card {
    background: linear-gradient(135deg, #173f67, #2f80ed);
    color: #fff;
    border-radius: 24px;
    padding: 28px;
    min-height: 220px;
    position: relative;
    overflow: hidden
}

.member-card:after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border: 30px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    right: -65px;
    top: -55px
}

.member-card .mc-logo {
    font-weight: 800;
    letter-spacing: 1px
}

.member-card h2 {
    margin: 45px 0 2px
}

.member-card small {
    color: #dcecff
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr
}

.login-brand {
    background: linear-gradient(135deg, var(--navy), var(--navy2));
    color: #fff;
    padding: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center
}

.login-brand h1 {
    font-size: 54px;
    line-height: 1;
    margin: 25px 0
}

.login-box {
    display: grid;
    place-items: center;
    padding: 30px
}

.login-card {
    width: min(430px, 100%);
    padding: 35px
}

.login-card h2 {
    margin-top: 0
}

.login-card .field {
    margin: 15px 0
}

.login-card .btn {
    width: 100%;
    margin-top: 8px
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(16, 42, 67, .45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 3000
}

.modal-backdrop.open {
    display: flex
}

.modal {
    width: min(640px, 100%);
    max-height: 92vh;
    overflow: auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 28px 80px rgba(16, 42, 67, .22)
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: var(--card);
    z-index: 1
}

.modal-head h2 {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 4px;
    color: var(--text)
}

.modal-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px
}

.modal-close {
    border: 0;
    background: #f2f4f7;
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 22px;
    cursor: pointer;
    line-height: 1
}

.modal-body {
    padding: 24px
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 22px;
    flex-wrap: wrap
}

textarea.input {
    resize: vertical;
    min-height: 88px
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch
}

.bookings-table {
    min-width: 960px
}

.bookings-table td {
    vertical-align: top;
    max-width: 180px;
    word-break: break-word
}

@media(max-width:1050px) {
    .app {
        grid-template-columns: 82px 1fr
    }

    .sidebar {
        padding: 20px 10px
    }

    .brand span,
    .nav a span:not(.icon),
    .nav-logout span:not(.icon),
    .nav-label {
        display: none
    }

    .brand {
        justify-content: center
    }

    .nav a,
    .nav-logout {
        justify-content: center
    }

    .stats {
        grid-template-columns: repeat(2, 1fr)
    }

    .dashboard-grid {
        grid-template-columns: 1fr
    }

    .login-wrap {
        grid-template-columns: 1fr
    }

    .login-brand {
        display: none
    }
}

@media(max-width:700px) {
    body.member-drawer-open {
        overflow: hidden
    }

    .app {
        display: block
    }

    .sidebar {
        display: none
    }

    .sidebar.open {
        display: flex;
        position: fixed;
        left: 0;
        top: 0;
        z-index: 20;
        width: min(270px, 88vw);
        height: 100vh;
        max-height: 100dvh;
        box-shadow: 18px 0 45px rgba(0, 0, 0, .22)
    }

    .sidebar.open .brand span {
        display: block
    }

    .sidebar.open .nav-label {
        display: block
    }

    .sidebar.open .nav a span:not(.icon),
    .sidebar.open .nav-logout span:not(.icon) {
        display: inline
    }

    .sidebar.open .nav a,
    .sidebar.open .nav-logout {
        justify-content: flex-start
    }

    .mobile-backdrop.open {
        display: block
    }

    .mobile-toggle {
        display: block;
        cursor: pointer;
        padding: 4px 8px
    }

    .top {
        padding: 0 18px;
        gap: 12px
    }

    .search {
        display: none
    }

    .profile div:not(.avatar) {
        display: none
    }

    .content {
        padding: 22px 16px
    }

    .stats,
    .quick,
    .two,
    .three {
        grid-template-columns: 1fr
    }

    .page-head {
        display: block
    }

    .page-head .btn {
        margin-top: 15px
    }

    .form-grid {
        grid-template-columns: 1fr
    }

    .title {
        font-size: 25px
    }
}

.customs-flex1 {
    flex-direction: column;
    padding: 0;
    align-items: flex-start;
    gap: 0;
}

.customs-flex1 .brand {
    padding: 0;
}

.customs-flex1 .brand img {
    max-width: 330px;
}

.customs-flex1 img {
    filter: brightness(0) invert(1);
}