:root{
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color:#172033;
    background:#f3f6fa;
}

*{
    box-sizing:border-box;
}

body{
    margin:0;
    background:#f3f6fa;
}

button,
input,
textarea{
    font:inherit;
}

.hidden{
    display:none !important;
}

.login-view{
    min-height:100vh;

    display:grid;
    place-items:center;

    padding:24px;

    background:
      radial-gradient(
        circle at 15% 10%,
        rgba(19,164,196,.15),
        transparent 30%
      ),
      linear-gradient(
        135deg,
        #07192d,
        #0d3155
      );
}

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

    padding:38px;

    border-radius:22px;

    background:#fff;

    box-shadow:
        0 32px 90px
        rgba(0,0,0,.22);
}

.login-logo{
    width:190px;
    max-height:60px;
    object-fit:contain;
    object-position:left center;
    margin-bottom:25px;
}

.login-kicker,
.eyebrow,
.top-kicker{
    color:#0b8fb4;

    font-size:11px;
    font-weight:800;
    letter-spacing:1px;
}

.login-card h1{
    margin:7px 0 8px;

    color:#102b49;

    font-size:29px;
}

.login-card p{
    margin:0 0 28px;

    color:#69778a;

    line-height:1.55;
}

label{
    display:block;

    margin-bottom:16px;

    color:#344054;

    font-size:13px;
    font-weight:650;
}

input,
textarea{
    width:100%;

    margin-top:7px;

    padding:12px 13px;

    border:1px solid #d8e0e9;
    border-radius:10px;

    background:#fff;

    color:#172033;

    outline:none;
}

input:focus,
textarea:focus{
    border-color:#2983c1;

    box-shadow:
        0 0 0 3px
        rgba(41,131,193,.10);
}

button{
    cursor:pointer;
}

.primary,
.secondary,
.danger,
.warning{
    min-height:40px;

    padding:0 15px;

    border-radius:10px;

    font-weight:700;
}

.primary{
    border:0;

    color:#fff;

    background:
        linear-gradient(
            135deg,
            #155aa1,
            #059cbd
        );
}

.secondary{
    border:1px solid #d8e0e8;

    background:#fff;
    color:#34475d;
}

.warning{
    border:1px solid #e4b756;

    background:#fff8e8;
    color:#895f12;
}

.danger{
    border:1px solid #efb4b4;

    background:#fff1f1;
    color:#a33131;
}

.full{
    width:100%;
}

.error{
    min-height:20px;

    margin-bottom:12px;

    color:#b33a3a;

    font-size:13px;
}

.app{
    min-height:100vh;

    display:grid;

    grid-template-columns:
        245px
        minmax(0,1fr);
}

.sidebar{
    position:fixed;

    inset:
        0 auto 0 0;

    width:245px;

    display:flex;
    flex-direction:column;

    padding:23px 17px;

    background:
        linear-gradient(
            180deg,
            #0a2139,
            #0a2c4b
        );

    color:#fff;
}

.brand{
    padding:4px 8px 25px;

    border-bottom:
        1px solid
        rgba(255,255,255,.10);
}

.brand img{
    width:165px;
    max-height:48px;
    object-fit:contain;
    object-position:left center;

    filter:
        brightness(0)
        invert(1);
}

.brand span{
    display:block;

    margin-top:10px;

    color:#90afc9;

    font-size:11px;
    font-weight:800;
    letter-spacing:1px;

    text-transform:uppercase;
}

nav{
    display:grid;

    gap:6px;

    margin-top:22px;
}

.nav{
    width:100%;

    padding:11px 13px;

    border:0;
    border-radius:10px;

    text-align:left;

    color:#bcd0e1;
    background:transparent;

    font-weight:650;
}

.nav:hover,
.nav.active{
    color:#fff;

    background:
        rgba(255,255,255,.10);
}

.sidebar-footer{
    margin-top:auto;

    padding:18px 9px 4px;

    border-top:
        1px solid
        rgba(255,255,255,.10);
}

.sidebar-footer small{
    display:block;

    color:#7194b3;
}

.sidebar-footer strong{
    display:block;

    margin-top:5px;

    font-size:12px;
}

main{
    grid-column:2;

    min-width:0;
}

.topbar{
    position:sticky;
    top:0;
    z-index:10;

    min-height:72px;

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

    gap:20px;

    padding:0 29px;

    border-bottom:
        1px solid #e4e9ef;

    background:
        rgba(255,255,255,.96);

    backdrop-filter:
        blur(12px);
}

.topbar strong{
    display:block;

    margin-top:3px;

    color:#193653;
}

.top-user{
    display:flex;
    align-items:center;
    gap:16px;

    text-align:right;
}

.top-user span{
    display:block;

    margin-top:2px;

    color:#7a8796;

    font-size:12px;
}

.page{
    padding:29px;
}

.hero,
.panel,
.user-card{
    border:
        1px solid #e2e8ef;

    border-radius:18px;

    background:#fff;

    box-shadow:
        0 9px 30px
        rgba(15,23,42,.035);
}

.hero{
    padding:28px;

    background:
        radial-gradient(
            circle at 100% 0,
            rgba(14,164,199,.12),
            transparent 34%
        ),
        #fff;
}

.hero h1,
.page-heading h1{
    margin:7px 0 7px;

    color:#132e4a;

    letter-spacing:-.5px;
}

.hero p,
.page-heading p{
    margin:0;

    color:#6e7b8d;
}

.stats{
    display:grid;

    grid-template-columns:
        repeat(3,minmax(0,1fr));

    gap:17px;

    margin-top:20px;
}

.stat{
    padding:20px;

    border:
        1px solid #e2e8ef;

    border-radius:15px;

    background:#fff;
}

.stat span{
    color:#758295;

    font-size:12px;
}

.stat strong{
    display:block;

    margin-top:7px;

    color:#173b60;

    font-size:27px;
}

.page-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;

    gap:20px;

    margin-bottom:20px;
}

.panel{
    overflow:hidden;
}

.table-wrap{
    overflow:auto;
}

table{
    width:100%;

    border-collapse:collapse;

    background:#fff;
}

th,
td{
    padding:
        14px 16px;

    border-bottom:
        1px solid #edf0f4;

    text-align:left;
    white-space:nowrap;
}

th{
    color:#68778a;

    background:#f9fafc;

    font-size:11px;
    letter-spacing:.5px;

    text-transform:uppercase;
}

td{
    font-size:13px;
}

.badge{
    display:inline-flex;

    padding:
        5px 9px;

    border-radius:999px;

    background:#edf5fb;
    color:#21628f;

    font-size:11px;
    font-weight:800;
}

.badge.active{
    background:#eaf9f1;
    color:#267455;
}

.badge.disabled{
    background:#fff0f0;
    color:#a03f3f;
}

.text-button{
    padding:0;

    border:0;

    color:#1670ad;
    background:none;

    font-weight:700;
}

.user-grid{
    display:grid;

    grid-template-columns:
        repeat(2,minmax(0,1fr));

    gap:17px;
}

.user-card{
    padding:21px;
}

.user-card-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;

    gap:15px;
}

.user-card h3{
    margin:0;

    color:#173754;
}

.user-card .username{
    margin-top:4px;

    color:#758295;

    font-size:12px;
}

.user-meta{
    display:grid;

    grid-template-columns:
        repeat(2,minmax(0,1fr));

    gap:10px;

    margin-top:18px;
}

.meta{
    padding:11px 12px;

    border:
        1px solid #e8ecf1;

    border-radius:10px;

    background:#fafbfd;
}

.meta span{
    display:block;

    color:#8490a0;

    font-size:10px;

    text-transform:uppercase;
}

.meta strong{
    display:block;

    margin-top:4px;

    color:#34475c;

    font-size:12px;

    word-break:break-word;
}

.user-actions{
    display:flex;
    flex-wrap:wrap;

    gap:8px;

    margin-top:18px;
}

.modal{
    position:fixed;
    inset:0;
    z-index:100;

    display:grid;
    place-items:center;

    padding:20px;

    background:
        rgba(6,20,34,.58);
}

.modal-card{
    width:min(560px,100%);
    max-height:90vh;
    overflow:auto;

    padding:24px;

    border-radius:18px;

    background:#fff;

    box-shadow:
        0 35px 100px
        rgba(0,0,0,.28);
}

.modal-head{
    display:flex;
    justify-content:space-between;

    gap:20px;

    margin-bottom:20px;
}

.modal-head h2{
    margin:5px 0 0;

    color:#173653;
}

.icon-button{
    width:37px;
    height:37px;

    border:
        1px solid #dde4eb;

    border-radius:9px;

    background:#fff;

    color:#667585;

    font-size:20px;
}

.modal-actions{
    display:flex;
    justify-content:flex-end;

    gap:9px;

    margin-top:20px;
}

.password-box{
    margin:15px 0;

    padding:17px;

    border:
        1px dashed #87b8d5;

    border-radius:12px;

    background:#f2f9fd;

    color:#123e5c;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Consolas,
        monospace;

    font-size:18px;
    font-weight:800;

    text-align:center;

    word-break:break-all;
}

.notice{
    padding:13px 14px;

    border-radius:10px;

    background:#fff8e8;

    color:#805d1c;

    font-size:13px;

    line-height:1.5;
}

.toast{
    position:fixed;
    right:22px;
    bottom:22px;
    z-index:200;

    max-width:390px;

    padding:13px 16px;

    border-radius:11px;

    color:#fff;
    background:#173b5b;

    box-shadow:
        0 12px 35px
        rgba(0,0,0,.18);
}

@media(max-width:900px){

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

    .sidebar{
        position:static;

        width:auto;
        min-height:auto;
    }

    main{
        grid-column:1;
    }

    .stats,
    .user-grid{
        grid-template-columns:1fr;
    }
}


/* ==========================================================
   A1.12E-C2-C
   Tenant table desktop polish
   ========================================================== */

#page-tenants .table-wrap {
    width:100%;
    overflow-x:auto;
}

#page-tenants table {
    width:100%;
}

@media (min-width:901px) {

    #page-tenants table {
        width:100%;
        min-width:0;
        table-layout:fixed;
    }

    #page-tenants th,
    #page-tenants td {
        white-space:normal;
        overflow-wrap:break-word;
        word-break:normal;
    }

    #page-tenants th:nth-child(1),
    #page-tenants td:nth-child(1) {
        width:13%;
    }

    #page-tenants th:nth-child(2),
    #page-tenants td:nth-child(2) {
        width:32%;
    }

    #page-tenants th:nth-child(3),
    #page-tenants td:nth-child(3) {
        width:12%;
    }

    #page-tenants th:nth-child(4),
    #page-tenants td:nth-child(4) {
        width:9%;
        text-align:center;
    }

    #page-tenants th:nth-child(5),
    #page-tenants td:nth-child(5) {
        width:21%;
        text-align:center;
    }

    #page-tenants th:nth-child(6),
    #page-tenants td:nth-child(6) {
        width:13%;
        text-align:right;
    }

}

@media (max-width:900px) {

    #page-tenants table {
        min-width:760px;
    }

}
