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

:root {
    --blue-dark: #071541;
    --blue-dark-2: #041033;
    --blue: #0f5bea;
    --blue-light: #edf4ff;
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #14213d;
    --muted: #7c879d;
    --border: #e6ebf2;
    --green: #1dbf73;
    --yellow: #e8a800;
    --orange: #ff7a1a;
    --red: #ef3c4f;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    padding: 30px 20px;
    color: #fff;
    background:
        radial-gradient(circle at 20% 10%, rgba(35, 97, 255, .28), transparent 28%),
        linear-gradient(180deg, var(--blue-dark) 0%, var(--blue-dark-2) 100%);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 34px;
}

.brand-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 30px;
    color: #1e6cff;
    background: rgba(22, 84, 255, .12);
    border: 1px solid rgba(40, 111, 255, .28);
}

.brand strong {
    font-size: 31px;
    line-height: 1;
    display: inline-block;
}

.brand span {
    color: #2c75ff;
    font-size: 13px;
    font-weight: bold;
    margin-left: 4px;
}

.brand small {
    display: block;
    color: #2c75ff;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    margin-top: 3px;
}

.user-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #165cf4;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
}

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

.user-box span {
    display: block;
    margin-top: 3px;
    color: #4e8cff;
    font-size: 13px;
}

.menu-title {
    color: #7687b2;
    font-size: 11px;
    letter-spacing: .8px;
    margin-bottom: 12px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar nav a {
    color: #fff;
    text-decoration: none;
    padding: 14px 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    transition: .2s ease;
}

.sidebar nav a:hover {
    background: rgba(28, 92, 232, .22);
}

.sidebar nav a.active {
    background: linear-gradient(90deg, #155cf0, #0f56e4);
    box-shadow: 0 8px 18px rgba(5, 63, 195, .25);
}

.billing-box {
    margin-top: auto;
    border: 1px solid rgba(61, 119, 255, .35);
    background: rgba(14, 68, 170, .18);
    border-radius: 12px;
    padding: 16px;
}

.billing-box strong {
    display: block;
    font-size: 14px;
    margin-bottom: 12px;
}

.billing-box span,
.billing-box small {
    display: block;
    font-size: 12px;
    color: #dbe7ff;
    margin-top: 6px;
}

.content {
    margin-left: 280px;
    min-height: 100vh;
    padding: 28px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

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

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

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-actions button {
    border: 0;
    background: transparent;
    color: #53627c;
    cursor: pointer;
    padding: 9px 10px;
    border-radius: 8px;
}

.top-actions button:hover {
    background: #fff;
}

.stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.stat-card {
    background: var(--card);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 5px 18px rgba(29, 54, 95, .07);
    display: flex;
    gap: 14px;
    min-height: 132px;
    align-items: flex-start;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    font-weight: bold;
    flex: 0 0 44px;
}

.stat-icon.green {
    background: #eaf9f1;
    color: var(--green);
}

.stat-icon.yellow {
    background: #fff7df;
    color: var(--yellow);
}

.stat-icon.orange {
    background: #fff0e2;
    color: var(--orange);
}

.stat-icon.red {
    background: #ffe9eb;
    color: var(--red);
}

.stat-icon.blue {
    background: #e8f0ff;
    color: var(--blue);
}

.stat-card strong {
    display: block;
    font-size: 27px;
    margin-bottom: 7px;
}

.stat-card span {
    display: block;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 12px;
}

.stat-card small {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.green-text { color: var(--green); }
.yellow-text { color: var(--yellow); }
.orange-text { color: var(--orange); }
.red-text { color: var(--red); }

.device-panel {
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(29, 54, 95, .07);
    overflow: hidden;
}

.panel-header {
    padding: 20px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.panel-header h2 {
    font-size: 19px;
    margin-bottom: 4px;
    color: #0e3fa8;
}

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

.panel-header > div:last-child {
    display: flex;
    gap: 10px;
}

.btn-primary,
.btn-secondary {
    border-radius: 8px;
    padding: 11px 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
}

.btn-primary {
    border: 1px solid var(--blue);
    background: var(--blue);
    color: #fff;
}

.btn-secondary {
    border: 1px solid #cbd4e2;
    background: #fff;
    color: #43516a;
}

.filters {
    padding: 16px 22px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.search {
    position: relative;
}

.search input,
.filters select {
    width: 100%;
    height: 42px;
    border: 1px solid #d9e0eb;
    border-radius: 8px;
    background: #fff;
    padding: 0 13px;
    color: #59657a;
    outline: none;
}

.search span {
    position: absolute;
    right: 14px;
    top: 11px;
    color: #8793a7;
}

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

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

thead {
    background: #f8fafd;
}

th {
    padding: 14px 13px;
    color: #49566d;
    text-align: left;
    font-size: 12px;
    font-weight: bold;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 15px 13px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    white-space: nowrap;
}

tbody tr:hover {
    background: #fbfdff;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: bold;
}

.badge.active {
    background: #eaf9f1;
    color: #15965c;
}

.badge.no-renew {
    background: #fff2e6;
    color: #df6b10;
}

.badge.delete {
    background: #ffe9ec;
    color: #d62f44;
}

.more {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    color: #68758b;
}

.legend {
    display: flex;
    gap: 20px;
    padding: 14px 22px 18px;
    color: #657188;
    font-size: 11px;
    flex-wrap: wrap;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 14px;
}

.quick-actions > div {
    background: #fff;
    border-radius: 12px;
    padding: 17px;
    box-shadow: 0 5px 18px rgba(29, 54, 95, .06);
    cursor: pointer;
    min-height: 88px;
}

.quick-actions strong {
    display: block;
    color: #1555d8;
    font-size: 13px;
    margin-bottom: 9px;
}

.quick-actions span {
    color: var(--muted);
    font-size: 11px;
}

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

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

@media (max-width: 900px) {
    .sidebar {
        width: 220px;
    }

    .content {
        margin-left: 220px;
        padding: 18px;
    }

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

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

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

.brand-logo {
    display: block;
    width: 210px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.brand {
    margin-bottom: 32px;
}
