* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --navy: #172554;
    --blue: #2563eb;
    --text: #17202a;
    --muted: #6b7280;
    --border: #e5e7eb;
    --background: #f5f7fb;
    --white: #ffffff;
    --green: #16a34a;
    --red: #dc2626;
    --orange: #ea580c;
}

body {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--background);
    color: var(--text);
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}


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

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


/* =========================
   SIDEBAR
========================= */

.sidebar {
    width: 250px;
    background: var(--navy);
    color: white;

    display: flex;
    flex-direction: column;

    padding: 28px 18px;

    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 0 10px;
    margin-bottom: 40px;
}

.brand-icon {
    width: 38px;
    height: 38px;

    border-radius: 10px;

    background: white;
    color: var(--navy);

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

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

.brand strong {
    display: block;
    font-size: 15px;
}

.brand span {
    display: block;
    font-size: 12px;
    opacity: 0.6;
    margin-top: 2px;
}


/* Navigation */

nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    width: 100%;

    border: none;
    background: transparent;

    color: rgba(255, 255, 255, 0.65);

    text-align: left;

    padding: 12px 14px;

    border-radius: 10px;

    display: flex;
    align-items: center;
    gap: 12px;

    font-size: 14px;
}

.nav-item span {
    width: 20px;
    text-align: center;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    font-weight: 600;
}


/* Sidebar bottom */

.sidebar-bottom {
    margin-top: auto;

    padding: 15px 10px;

    color: rgba(255, 255, 255, 0.4);

    font-size: 11px;
}

.sidebar-bottom small {
    display: block;
    margin-top: 5px;
}


/* =========================
   MAIN
========================= */

.main {
    margin-left: 250px;

    width: calc(100% - 250px);

    padding: 35px 45px;
}


/* =========================
   TOPBAR
========================= */

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

    margin-bottom: 30px;
}

.topbar h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.topbar p {
    color: var(--muted);
    font-size: 14px;
}

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

.user-avatar {
    width: 38px;
    height: 38px;

    border-radius: 50%;

    background: #dbeafe;
    color: var(--blue);

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

    font-weight: 700;
}

.user strong {
    display: block;
    font-size: 13px;
}

.user span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 2px;
}


/* =========================
   SEARCH
========================= */

.search-section {
    margin-bottom: 28px;
}

.search-box {
    background: white;

    border: 1px solid var(--border);

    border-radius: 12px;

    height: 52px;

    display: flex;
    align-items: center;

    padding: 5px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.search-icon {
    font-size: 24px;
    color: var(--muted);

    padding-left: 14px;
    padding-right: 10px;
}

.search-box input {
    flex: 1;

    border: none;
    outline: none;

    font-size: 14px;

    color: var(--text);
}

.search-box input::placeholder {
    color: #9ca3af;
}

.search-box button {
    border: none;

    background: var(--navy);
    color: white;

    border-radius: 8px;

    padding: 10px 18px;

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

.search-box button:hover {
    background: #1e3a8a;
}


/* =========================
   STATISTICS
========================= */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 16px;

    margin-bottom: 35px;
}

.stat-card {
    background: white;

    border: 1px solid var(--border);

    border-radius: 14px;

    padding: 20px;

    display: flex;
    align-items: center;

    gap: 14px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.stat-icon {
    width: 44px;
    height: 44px;

    border-radius: 10px;

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

    font-size: 18px;
    font-weight: 700;
}

.stat-icon.total {
    background: #eff6ff;
    color: #2563eb;
}

.stat-icon.active {
    background: #ecfdf5;
    color: #16a34a;
}

.stat-icon.inactive {
    background: #fff7ed;
    color: #ea580c;
}

.stat-icon.expired {
    background: #fef2f2;
    color: #dc2626;
}

.stat-card span {
    display: block;

    color: var(--muted);

    font-size: 12px;

    margin-bottom: 5px;
}

.stat-card strong {
    font-size: 23px;
}


/* =========================
   SECTIONS
========================= */

.section {
    margin-bottom: 35px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 15px;
}

.section-header h2 {
    font-size: 18px;

    margin-bottom: 4px;
}

.section-header p {
    color: var(--muted);
    font-size: 12px;
}


/* =========================
   QUICK ACTIONS
========================= */

.actions-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 14px;
}

.action-card {
    background: white;

    border: 1px solid var(--border);

    border-radius: 12px;

    padding: 18px;

    text-align: left;

    display: flex;
    align-items: center;

    gap: 12px;

    transition: 0.2s;
}

.action-card:hover {
    border-color: #bfdbfe;

    transform: translateY(-2px);

    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.06);
}

.action-icon {
    width: 38px;
    height: 38px;

    border-radius: 9px;

    background: #f1f5f9;

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

    font-size: 16px;
}

.action-card strong {
    display: block;

    font-size: 13px;

    margin-bottom: 4px;
}

.action-card span {
    display: block;

    color: var(--muted);

    font-size: 11px;
}


/* =========================
   EQUIPMENT LIST
========================= */

.equipment-list {
    display: flex;
    flex-direction: column;

    gap: 10px;
}

.equipment-card {
    background: white;

    border: 1px solid var(--border);

    border-radius: 12px;

    padding: 16px 18px;

    display: flex;
    align-items: center;

    gap: 14px;

    transition: 0.2s;
}

.equipment-card:hover {
    border-color: #bfdbfe;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.04);
}

.equipment-status {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    font-size: 0;
}

.active-status {
    background: var(--green);
}

.inactive-status {
    background: var(--red);
}

.equipment-info {
    flex: 1;
}

.equipment-info strong {
    display: block;

    font-size: 14px;

    margin-bottom: 4px;
}

.equipment-info span {
    color: var(--muted);

    font-size: 12px;
}

.equipment-meta {
    text-align: right;
}

.equipment-meta span {
    display: block;

    color: var(--muted);

    font-size: 10px;

    margin-bottom: 4px;
}

.equipment-meta strong {
    font-size: 12px;
}

.details-button {
    border: none;

    background: transparent;

    color: var(--blue);

    font-size: 12px;

    font-weight: 600;
}

.view-all {
    border: none;

    background: transparent;

    color: var(--blue);

    font-size: 12px;

    font-weight: 600;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 1000px) {

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

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

}


@media (max-width: 700px) {

    .sidebar {
        display: none;
    }

    .main {
        margin-left: 0;

        width: 100%;

        padding: 22px 16px;
    }

    .topbar {
        align-items: flex-start;
    }

    .user {
        display: none;
    }

    .topbar h1 {
        font-size: 24px;
    }

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

        gap: 10px;
    }

    .stat-card {
        padding: 14px;

        gap: 10px;
    }

    .stat-icon {
        width: 38px;
        height: 38px;
    }

    .stat-card strong {
        font-size: 19px;
    }

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

    .equipment-card {
        padding: 14px;
    }

    .equipment-meta {
        display: none;
    }

    .details-button {
        font-size: 11px;
    }

}