:root {
    --background: #f4f6f8;
    --surface: #ffffff;
    --sidebar: #101828;
    --sidebar-soft: #1d2939;
    --text: #101828;
    --muted: #667085;
    --border: #e4e7ec;
    --primary: #175cd3;
    --primary-hover: #1849a9;
    --success: #027a48;
    --success-soft: #ecfdf3;
    --danger: #b42318;
    --danger-soft: #fef3f2;
    --warning: #b54708;
    --warning-soft: #fffaeb;
    --offline: #475467;
    --offline-soft: #f2f4f7;
    --shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

.app-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 250px;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    background: var(--sidebar);
    color: #ffffff;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 28px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #ffffff;
    color: var(--sidebar);
    font-size: 22px;
    font-weight: 800;
}

.brand-name {
    font-size: 17px;
    font-weight: 750;
    letter-spacing: 0.08em;
}

.brand-subtitle {
    margin-top: 3px;
    color: #98a2b3;
    font-size: 12px;
}

.sidebar-menu {
    display: grid;
    gap: 6px;
}

.menu-item {
    padding: 11px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    color: #d0d5dd;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.menu-item:hover,
.menu-item.active {
    background: var(--sidebar-soft);
    color: #ffffff;
}

.menu-icon {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    padding: 18px 8px 4px;
    border-top: 1px solid #344054;
    color: #98a2b3;
    font-size: 11px;
    line-height: 1.7;
}

.main-content {
    grid-column: 2;
    min-width: 0;
    padding: 30px;
}

.topbar {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.topbar h1 {
    margin: 0 0 6px;
    font-size: 28px;
    letter-spacing: -0.03em;
}

.topbar p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.server-indicator {
    padding: 9px 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #abefc6;
    border-radius: 999px;
    background: var(--success-soft);
    color: var(--success);
    font-size: 13px;
    font-weight: 650;
}

.server-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #12b76a;
    box-shadow: 0 0 0 4px rgba(18, 183, 106, 0.14);
}

.summary-grid {
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.summary-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.summary-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.summary-value {
    margin-top: 10px;
    font-size: 30px;
    font-weight: 750;
    letter-spacing: -0.04em;
}

.online-text {
    color: var(--success);
}

.blocked-text {
    color: var(--danger);
}

.panel {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-header {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--border);
}

.panel-header h2 {
    margin: 0 0 5px;
    font-size: 18px;
}

.panel-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 1450px;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    font-size: 13px;
}

th {
    background: #f9fafb;
    color: #475467;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

tbody tr:hover {
    background: #fcfcfd;
}

.device-code,
.computer-name {
    font-weight: 700;
}

.small-text {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.badge {
    width: fit-content;
    min-width: 72px;
    padding: 5px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge-online,
.badge-active {
    background: var(--success-soft);
    color: var(--success);
}

.badge-offline {
    background: var(--offline-soft);
    color: var(--offline);
}

.badge-blocked {
    background: var(--danger-soft);
    color: var(--danger);
}

.badge-pending {
    background: var(--warning-soft);
    color: var(--warning);
}

.form-control {
    width: 150px;
    min-height: 36px;
    padding: 8px 9px;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    background: #ffffff;
    color: var(--text);
    outline: none;
    font-size: 12px;
}

.form-control:focus {
    border-color: #84adff;
    box-shadow: 0 0 0 3px rgba(47, 144, 250, 0.12);
}

.form-control.compact {
    width: 105px;
    margin-top: 8px;
}

.message-input {
    min-width: 180px;
    min-height: 62px;
    resize: vertical;
}

.check-row {
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.button {
    min-height: 36px;
    padding: 8px 13px;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.button-primary {
    background: var(--primary);
    color: #ffffff;
}

.button-primary:hover {
    background: var(--primary-hover);
}

.button-secondary {
    border: 1px solid #d0d5dd;
    background: #ffffff;
    color: #344054;
}

.button-secondary:hover {
    background: #f9fafb;
}

.notification {
    margin: 16px 22px 0;
    padding: 12px 14px;
    border: 1px solid #abefc6;
    border-radius: 8px;
    background: var(--success-soft);
    color: var(--success);
    font-size: 13px;
    font-weight: 600;
}

.notification.error {
    border-color: #fecdca;
    background: var(--danger-soft);
    color: var(--danger);
}

.notification.hidden {
    display: none;
}

.empty-state {
    padding: 50px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 1050px) {
    .app-layout {
        display: block;
    }

    .sidebar {
        position: static;
        width: 100%;
        min-height: auto;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        padding: 20px;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-status-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.status-info-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f9fafb;
}

.status-info-value {
    margin-top: 10px;
    font-size: 25px;
    font-weight: 750;
}

.status-info-version {
    margin-top: 12px;
    color: var(--primary);
    font-size: 18px;
    font-weight: 750;
}

.status-info-online {
    margin-top: 12px;
    color: var(--success);
    font-size: 18px;
    font-weight: 750;
}

@media (max-width: 1050px) {
    .dashboard-status-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .dashboard-status-grid {
        grid-template-columns: 1fr;
    }
}