* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #1f2933;
}

a {
    color: #1467c9;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}


/* TOP BAR */

.topbar {
    height: 60px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #17202a;
    color: #ffffff;
}

.brand {
    font-size: 17px;
    font-weight: bold;
}

.topbar a {
    color: #ffffff;
}

.separator {
    margin: 0 8px;
}


/* TENANT */

.tenant-banner {
    min-height: 46px;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #e7edf4;
    border-bottom: 1px solid #ccd5df;
}

.tenant-code {
    margin-left: 8px;
    font-size: 12px;
    color: #687683;
}


/* APPLICATION */

.app-layout {
    display: flex;
    min-height: calc(100vh - 106px);
}


/* SIDEBAR */

.sidebar {
    width: 235px;
    flex-shrink: 0;
    padding: 20px 12px;
    background: #ffffff;
    border-right: 1px solid #dce1e5;
}

.sidebar nav > a {
    display: block;
    padding: 11px 14px;
    margin-bottom: 4px;
    border-radius: 5px;
    color: #283541;
}

.sidebar nav > a:hover {
    background: #f0f4f8;
    text-decoration: none;
}

.sidebar nav > a.active {
    background: #e4effd;
    color: #0d58a7;
    font-weight: bold;
}

.menu-section {
    margin: 28px 12px 10px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    color: #89939d;
}

.menu-disabled {
    padding: 10px 14px;
    color: #9ba4ad;
}

.menu-disabled span {
    display: block;
    margin-top: 2px;
    font-size: 10px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 35px 30px;
}

.tenant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 360px));
    gap: 20px;
    margin-top: 25px;
}

.tenant-card {
    background: #ffffff;
    padding: 24px;
    border: 1px solid #dce1e5;
    border-radius: 7px;
}

.tenant-card h2 {
    margin-top: 0;
}




/* MAIN */

.main-content {
    flex: 1;
    min-width: 0;
    padding: 30px;
}

.main-content h1 {
    margin-top: 0;
}

.page-description {
    color: #697680;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}


/* CARDS */

.dashboard-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(190px, 1fr));
    gap: 20px;
    margin: 28px 0;
}

.stat-card {
    padding: 24px;
    background: #ffffff;
    border: 1px solid #dce1e5;
    border-radius: 7px;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
}

.stat-label {
    margin-top: 6px;
    color: #697680;
}

.panel {
    padding: 24px;
    background: #ffffff;
    border: 1px solid #dce1e5;
    border-radius: 7px;
}

.form-panel {
    max-width: 750px;
}


/* TABLES */

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

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

.data-table th {
    padding: 12px 10px;
    text-align: left;
    font-size: 13px;
    color: #63707c;
    border-bottom: 2px solid #e1e5e9;
}

.data-table td {
    padding: 13px 10px;
    border-bottom: 1px solid #e7ebef;
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.actions {
    text-align: right;
}


/* FORMS */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 11px 12px;
    font-size: 15px;
    border: 1px solid #c7d0d8;
    border-radius: 5px;
    background: #ffffff;
}

.checkbox-group label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 28px;
}


/* BUTTONS */

.btn {
    display: inline-block;
    padding: 10px 16px;
    font-size: 14px;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: #1467c9;
    color: #ffffff;
}

.btn-secondary {
    background: #e8edf2;
    color: #283541;
}

.btn-full {
    width: 100%;
}


/* MESSAGES */

.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.alert-danger {
    background: #fdeceb;
    border: 1px solid #e5aaa5;
}

.alert-warning {
    background: #fff5d9;
    border: 1px solid #e4ca79;
}

.info-box {
    margin: 20px 0;
    padding: 12px 15px;
    background: #edf4fc;
    border: 1px solid #cadcf2;
    border-radius: 5px;
}

.empty-state {
    padding: 30px;
    text-align: center;
    color: #77838e;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    background: #e6edf4;
}

.badge-success {
    background: #def2e4;
    color: #236936;
}

.badge-disabled {
    background: #eceff1;
    color: #697680;
}

.muted {
    color: #9aa3ab;
}


/* LOGIN */

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: 35px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .10);
}

.login-logo {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
}

.subtitle {
    color: #697680;
}


/* FOOTER */

.footer {
    padding: 15px 24px;
    font-size: 12px;
    color: #808b95;
    border-top: 1px solid #dce1e5;
    background: #ffffff;
}


/* MOBILE */

@media (max-width: 800px) {

    .app-layout {
        display: block;
    }

    .sidebar {
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid #dce1e5;
    }

    .page-header {
        display: block;
    }

    .page-header .btn {
        margin-top: 10px;
    }

}

.form-section {
    margin-bottom: 20px;
}

.form-section h2 {
    margin-top: 0;
}

.form-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));
    gap: 0 20px;
}

.filter-grid {
    display: grid;
    grid-template-columns:
        minmax(250px, 2fr)
        repeat(3, minmax(160px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
}

.search-panel {
    margin-bottom: 20px;
}

.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
}

.field-note {
    margin-top: 10px;
    font-size: 13px;
    color: #77838e;
}

code {
    font-family:
        Consolas,
        Monaco,
        monospace;
}

@media (max-width: 900px) {

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

}
