:root {
    --app-primary: #0b5cab;
    --app-primary-strong: #083f75;
    --app-accent: #0f9f8f;
    --app-warning: #ba7b11;
    --app-success: #1f7d5c;
    --app-text: #142334;
    --app-muted: #5f7387;
    --app-border: #d7e3ef;
    --app-surface: #ffffff;
    --app-bg: #f3f7fb;
    --app-shadow: 0 12px 30px rgba(11, 56, 102, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    margin: 0;
    background: linear-gradient(180deg, #f8fbff 0%, #edf3f9 55%, #e8eef6 100%);
    color: var(--app-text);
    min-height: 100vh;
}

.app-bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}

.app-bg-orb-a {
    width: 320px;
    height: 320px;
    background: #7ec3ff;
    top: -110px;
    left: -80px;
}

.app-bg-orb-b {
    width: 300px;
    height: 300px;
    background: #76e3d4;
    right: -100px;
    bottom: -80px;
}

.app-container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
}

.app-navbar {
    background: linear-gradient(110deg, #062a4e 0%, #0a4c8b 58%, #0f79b3 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

.brand-dot {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.brand-text-wrap {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
}

.brand-subtitle {
    font-size: 0.73rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-pills-wrap {
    gap: 0.2rem;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: 10px;
    padding: 0.5rem 0.7rem;
    transition: all 0.15s ease;
}

.navbar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.navbar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.24);
}

.nav-meta {
    padding-left: 0.75rem;
}

.condo-chip {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-weight: 600;
}

.role-chip {
    background: #eef6ff;
    color: #0b3e6d;
    border: 1px solid #c9def5;
    font-size: 0.71rem;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.logout-btn {
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-weight: 600;
}

.app-main {
    padding: 1.25rem 0 5.8rem;
}

.app-alert {
    border: none;
    border-left: 4px solid currentColor;
    box-shadow: 0 6px 16px rgba(16, 47, 79, 0.1);
    border-radius: 0.75rem;
}

h2, h3 {
    letter-spacing: -0.01em;
}

.card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 0.95rem;
    box-shadow: var(--app-shadow);
}

.card-header {
    background: #f9fcff;
    border-bottom: 1px solid #e4edf6;
    font-weight: 700;
}

.stat-card {
    border: 1px solid #d8e5f2;
    box-shadow: 0 10px 24px rgba(10, 64, 113, 0.1);
}

.stat-card .display-6 {
    letter-spacing: -0.02em;
}

.table {
    font-size: 0.93rem;
}

.table > :not(caption) > * > * {
    padding-top: 0.78rem;
    padding-bottom: 0.78rem;
}

.table thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4b6076;
    border-bottom-width: 1px;
}

.table tbody tr:hover {
    background-color: #f4f9ff;
}

.form-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: #35485a;
}

.form-control,
.form-select,
.btn,
.ts-wrapper.single .ts-control {
    border-radius: 0.65rem;
}

.form-control,
.form-select,
.ts-wrapper.single .ts-control {
    border-color: #cddaea;
    min-height: 42px;
}

.input-group-text {
    background: #f2f7fd;
    border-color: #cddaea;
    color: #35516e;
}

.form-control:focus,
.form-select:focus,
.ts-wrapper.focus .ts-control {
    border-color: #5ca1e7;
    box-shadow: 0 0 0 0.22rem rgba(15, 108, 196, 0.17);
}

.ts-wrapper .ts-control {
    padding: 0.45rem 0.65rem;
}

.btn-primary {
    background: linear-gradient(90deg, #0b59a5 0%, #1579d1 100%);
    border: none;
    font-weight: 600;
}

.btn-primary:hover {
    filter: brightness(0.95);
}

.restriction-card {
    border: 1px solid #cfe0f2;
    border-radius: 0.85rem;
    background: linear-gradient(180deg, #fefefe 0%, #f5faff 100%);
}

.badge.text-bg-warning {
    color: #553401 !important;
    background-color: #fde4b4 !important;
}

.mobile-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 46, 82, 0.97);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
    z-index: 1045;
}

.mobile-dock-link {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    border-radius: 10px;
    padding: 0.4rem 0.2rem;
    font-size: 0.69rem;
    font-weight: 600;
}

.mobile-dock-link i {
    font-size: 1.05rem;
}

.mobile-dock-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

.auth-page {
    background: linear-gradient(140deg, #06284a 0%, #0d4f8b 60%, #1189b5 100%);
    min-height: 100vh;
    color: #102235;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}

.auth-wrapper {
    width: min(980px, 100%);
    border-radius: 1rem;
    overflow: hidden;
}

.auth-brand-panel {
    background: linear-gradient(180deg, #0b4d89 0%, #0d7fa5 100%);
    color: #fff;
    padding: 2.2rem;
    align-items: center;
}

.auth-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.2);
    display: grid;
    place-items: center;
    font-size: 1.35rem;
}

.auth-card {
    width: 100%;
}

@media (max-width: 991px) {
    .app-main {
        padding-top: 0.95rem;
    }

    .navbar .nav-link {
        padding: 0.55rem 0.7rem;
    }

    .nav-meta {
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        margin-top: 0.7rem;
        padding-top: 0.8rem;
        padding-left: 0;
    }

    .brand-subtitle {
        max-width: 150px;
    }
}

@media (min-width: 992px) {
    .app-main {
        padding-bottom: 2rem;
    }
}

@media (max-width: 767px) {
    .display-6 {
        font-size: 1.65rem;
    }

    .table {
        font-size: 0.88rem;
    }

    .auth-shell {
        padding: 0.9rem;
    }
}
