* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #111111;
    color: #f5f5f5;
}

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

/* ================================
   APP LAYOUT
================================ */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #080808;
    border-right: 1px solid #2c2c2c;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    padding: 24px 18px;
}

.brand {
    margin-bottom: 35px;
}

.brand-title {
    font-size: 20px;
    font-weight: 800;
    color: #d4af37;
}

.brand-subtitle {
    color: #9c9c9c;
    font-size: 13px;
    margin-top: 6px;
}

.nav-section {
    margin-bottom: 25px;
}

.nav-label {
    color: #666;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.nav-link {
    display: block;
    padding: 11px 13px;
    color: #cfcfcf;
    border-radius: 7px;
    margin-bottom: 5px;
    transition: 0.2s;
}

.nav-link:hover {
    background: #171717;
    color: #ffffff;
}

.nav-link.active {
    background: #d4af37;
    color: #111;
    font-weight: bold;
}

.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    padding: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.page-title {
    font-size: 28px;
    font-weight: 800;
}

.page-subtitle {
    margin-top: 5px;
    color: #888;
    font-size: 14px;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: #181818;
    border: 1px solid #2d2d2d;
    border-radius: 10px;
    padding: 18px;
}

.stat-title {
    color: #929292;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.stat-value {
    margin-top: 7px;
    font-size: 30px;
    font-weight: 800;
    color: #d4af37;
}

.panel {
    background: #181818;
    border: 1px solid #2d2d2d;
    border-radius: 10px;
    margin-bottom: 20px;
}

.panel-header {
    padding: 17px 20px;
    border-bottom: 1px solid #2d2d2d;
    font-weight: 700;
    font-size: 17px;
}

.panel-body {
    padding: 20px;
}

/* ================================
   FORMS
================================ */

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full {
    grid-column: 1 / -1;
}

label {
    margin-bottom: 7px;
    color: #c7c7c7;
    font-size: 13px;
    font-weight: 600;
}

input,
select,
textarea {
    background: #0f0f0f;
    border: 1px solid #393939;
    border-radius: 6px;
    color: #fff;
    padding: 11px;
    font-size: 14px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #d4af37;
    outline: none;
}

textarea {
    min-height: 90px;
    resize: vertical;
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 6px;
    padding: 11px 16px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
}

.btn-primary {
    background: #d4af37;
    color: #111;
}

.btn-primary:hover {
    background: #e1c458;
}

.btn-secondary {
    background: #2b2b2b;
    color: #fff;
}

.btn-danger {
    background: #6b1d1d;
    color: white;
}

/* ================================
   TABLE
================================ */

.table-toolbar {
    display: flex;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid #2d2d2d;
}

.table-toolbar input {
    flex: 1;
}

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

th,
td {
    padding: 13px 16px;
    text-align: left;
    border-bottom: 1px solid #292929;
}

th {
    color: #999;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .7px;
}

td {
    color: #ddd;
    font-size: 14px;
}

tr:hover td {
    background: #202020;
}

.member-name {
    font-weight: bold;
    color: #fff;
}

.muted {
    color: #777;
    font-size: 12px;
}

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

.badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-active {
    background: #173821;
    color: #68d888;
}

.badge-inactive {
    background: #3a1a1a;
    color: #e07373;
}

.badge-leave {
    background: #3a3219;
    color: #ead56d;
}

.badge-probationary {
    background: #1d2c45;
    color: #75a9e8;
}

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

.alert-success {
    background: #173821;
    border: 1px solid #285b37;
    color: #82e39c;
}

.alert-error {
    background: #3c1717;
    border: 1px solid #6c2525;
    color: #ef9696;
}

.actions {
    white-space: nowrap;
}

.actions a {
    color: #d4af37;
    font-weight: 700;
}

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

@media (max-width: 1000px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 700px) {

    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
    }

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

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

    .table-toolbar {
        flex-direction: column;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}

.nav-count {
    float: right;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 11px;
    background: #6b1d1d;
    color: #fff;
    font-size: 11px;
    line-height: 22px;
    text-align: center;
    font-weight: 800;
}

.nav-link.active .nav-count {
    background: #111;
    color: #d4af37;
}
