*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f4f5fb;
    color: #1f2933;
}

a {
    color: inherit;
    text-decoration: none;
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, #7c3aed, #4f46e5);
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 24px;
}

.login-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 32px 28px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.25);
    text-align: center;
}

.login-logo {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #fff;
    font-weight: 700;
    font-size: 22px;
    margin-bottom: 12px;
}

.login-title {
    margin: 0;
    font-size: 22px;
}

.login-subtitle {
    margin-top: 6px;
    margin-bottom: 24px;
    color: #6b7280;
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.form-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 13px;
    color: #4b5563;
}

.form-input {
    width: 100%;
    padding: 9px 11px;
    border-radius: 9px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    font-size: 14px;
}

.form-input:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 0;
    background: #ffffff;
}

.btn {
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #ffffff;
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 16px 35px rgba(79, 70, 229, 0.40);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.6);
    color: #111827;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.7);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-full {
    width: 100%;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    font-size: 18px;
    color: #4b5563;
}

.btn-icon[disabled] {
    opacity: 0.6;
    cursor: default;
}

.alert {
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 10px;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.login-hint {
    margin: 0;
    font-size: 12px;
    color: #9ca3af;
}

.layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
}

.sidebar {
    background: radial-gradient(circle at top, #7c3aed, #4f46e5);
    color: #e5e7eb;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-logo {
    display: flex;
    justify-content: center;
}

.logo-circle {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #f9fafb;
    color: #7c3aed;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.nav-item {
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.nav-item:hover {
    background: rgba(15, 23, 42, 0.18);
}

.nav-item-disabled {
    opacity: 0.5;
    cursor: default;
}

.sidebar-footer {
    margin-top: auto;
}

.main-content {
    padding: 20px 24px 32px;
}

.main-inner {
    max-width: 1180px;
    margin: 0 auto;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.page-title {
    margin: 0;
    font-size: 22px;
}

.page-subtitle {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #4b5563;
}

.user-name {
    font-weight: 500;
}

.cards-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.card {
    background: #ffffff;
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.company-card {
    background: linear-gradient(135deg, #4c1d95, #7c3aed);
    color: #e5e7eb;
}

.company-name {
    margin: 0 0 6px;
    font-size: 16px;
}

.company-meta {
    margin: 0 0 16px;
    font-size: 13px;
    color: #c4b5fd;
}

.kpi-card {
    text-align: center;
}

.kpi-label {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.kpi-value {
    margin: 8px 0 0;
    font-size: 26px;
    font-weight: 600;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 10px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.grid-product {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
    gap: 18px;
    margin-bottom: 18px;
}

.product-summary {
    background: linear-gradient(135deg, #4c1d95, #7c3aed);
    color: #f9fafb;
}

.product-plan {
    margin: 0 0 6px;
    font-weight: 600;
}

.product-host {
    margin: 0;
    font-size: 14px;
    color: #e5e7eb;
}

.product-status {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.status-label {
    margin-bottom: 8px;
}

.status-meta {
    margin: 2px 0;
    font-size: 13px;
    color: #6b7280;
}

.card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}

.card-title {
    margin: 0;
    font-size: 15px;
}

.card-subtitle {
    margin: 0;
    font-size: 12px;
    color: #9ca3af;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th,
.table td {
    padding: 8px 6px;
    text-align: left;
}

.table thead {
    border-bottom: 1px solid #e5e7eb;
}

.table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
}

.list-item {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.list-title {
    display: block;
    font-weight: 500;
    margin-bottom: 2px;
}

.list-meta {
    color: #9ca3af;
}

.pill {
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}

.pill-success {
    background: #dcfce7;
    color: #16a34a;
}

.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.tab {
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #6b7280;
}

.tab-active {
    background: #eef2ff;
    color: #4f46e5;
}

.definition-list {
    margin: 0;
}

.definition-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #f3f4f6;
}

.definition-row dt {
    font-weight: 500;
    color: #6b7280;
}

.definition-row dd {
    margin: 0;
}

.actions-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.hint-text {
    font-size: 12px;
    color: #9ca3af;
}

.stats-grid {
    margin-top: 6px;
}

.stat-block {
    border-radius: 16px;
    padding: 12px 12px 14px;
    background: #f9fafb;
}

.stat-title {
    margin: 0 0 4px;
    font-size: 13px;
    color: #6b7280;
}

.stat-main {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

.stat-secondary {
    margin: 4px 0 8px;
    font-size: 12px;
    color: #6b7280;
}

.progress {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4f46e5, #8b5cf6);
}

.progress-bar-orange {
    background: linear-gradient(90deg, #fb923c, #f97316);
}

.progress-bar-purple {
    background: linear-gradient(90deg, #a855f7, #ec4899);
}

.stats-card {
    margin-top: 18px;
}

.stats-content {
    display: none;
    margin-top: 12px;
}

.stats-content-active {
    display: block;
}

.stats-main-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tab-chip {
    background: #f9fafb;
    border-radius: 999px;
    border: 1px solid transparent;
}

.tab-chip.tab-active {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.stats-secondary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.stats-secondary-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.date-range-bar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f9fafb;
    border-radius: 999px;
    padding: 4px 6px;
    border: 1px solid #e5e7eb;
}

.date-arrow,
.date-refresh {
    border: none;
    background: transparent;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #6b7280;
}

.date-arrow:hover,
.date-refresh:hover {
    background: #e5e7eb;
}

.date-input {
    border: none;
    background: transparent;
    font-size: 12px;
    padding: 2px 4px;
    width: 110px;
    text-align: center;
    color: #374151;
}

.date-input:focus {
    outline: none;
}

.date-separator {
    font-size: 12px;
    color: #9ca3af;
}

.metric-card {
    border-radius: 18px;
    padding: 14px 14px 16px;
    background: #f9fafb;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.metric-header-simple {
    margin-bottom: 8px;
}

.metric-title {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
}

.metric-kv {
    margin: 0;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #6b7280;
}

.metric-kv strong {
    color: #111827;
}

.metric-brand {
    align-self: flex-start;
    font-weight: 700;
    font-size: 18px;
    color: #9ca3af;
}

.metric-body {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.gauge {
    width: 96px;
    height: 96px;
    border-radius: 999px;
    background: conic-gradient(#4f46e5 0deg, #8b5cf6 200deg, #e5e7eb 200deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.small-gauge {
    width: 72px;
    height: 72px;
}

.gauge-inner {
    width: 72%;
    height: 72%;
    border-radius: inherit;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gauge-value {
    font-size: 14px;
    font-weight: 600;
}

.gauge-label {
    font-size: 11px;
    color: #9ca3af;
}

.metric-chart {
    flex: 1;
    display: flex;
    align-items: center;
}

.line-chart,
.area-chart {
    width: 100%;
    height: 70px;
}

.stats-lower {
    margin-top: 16px;
}

.ram-row,
.io-row {
    justify-content: space-between;
}

.ram-summary p {
    margin: 2px 0;
    font-size: 12px;
}

.general-grid-top {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 1.2fr);
    gap: 14px;
}

.general-grid-bottom {
    margin-top: 14px;
}

.mini-card {
    border-radius: 16px;
    background: #ffffff;
    padding: 12px 14px 14px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.tall-card {
    min-height: 140px;
}

.wide-card {
    width: 100%;
}

.mini-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.mini-title {
    font-size: 13px;
    font-weight: 600;
}

.mini-caption {
    font-size: 12px;
    color: #9ca3af;
}

.usage-bar {
    height: 10px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.usage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.usage-label-row {
    display: flex;
    justify-content: flex-start;
    margin-top: 6px;
}

.usage-percentage {
    font-size: 12px;
    font-weight: 500;
    color: #16a34a;
}

.bandwidth-legend {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 4px;
}

.bandwidth-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bandwidth-bar {
    height: 10px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.bandwidth-fill.in {
    height: 100%;
    background: #bfdbfe;
}

.bandwidth-fill.out {
    height: 100%;
    background: #fed7d7;
}

.bandwidth-values {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 11px;
    color: #6b7280;
}

.mini-chart {
    margin-top: 6px;
}

.network-scale {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 10px;
    color: #9ca3af;
}

.network-legend {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    font-size: 11px;
    color: #6b7280;
}

.network-legend .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
}

.network-legend .dot.total {
    background: #0ea5e9;
}

.network-legend .dot.download {
    background: #22c55e;
}

.network-legend .dot.upload {
    background: #f97316;
}

.module-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 16px;
    margin-top: 10px;
}

.module-layout-full {
    grid-template-columns: minmax(0, 1fr);
}

.module-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.module-nav {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 8px 10px;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.module-nav-active {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4f46e5;
}

.module-content {
    border-radius: 16px;
    background: #ffffff;
    padding: 14px 16px 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.module-card {
    border-radius: 14px;
    background: #f9fafb;
    padding: 12px 14px 16px;
    margin-bottom: 12px;
}

.module-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 500;
}

.module-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.module-label {
    font-size: 12px;
    color: #6b7280;
}

.module-input {
    width: 100%;
    padding: 7px 10px;
    border-radius: 9px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    font-size: 13px;
}

.module-primary {
    margin-top: 6px;
    background: #2563eb;
    color: #ffffff;
    padding-inline: 18px;
}

.module-secondary {
    background: #e5e7eb;
    color: #111827;
}

.module-banner {
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 12px;
}

.warning-banner {
    background: #fef9c3;
    border: 1px solid #facc15;
    color: #854d0e;
}

.os-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.os-card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 10px 10px 12px;
    font-size: 13px;
}

.os-logo {
    font-weight: 600;
    margin-bottom: 8px;
}

.password-card .module-input {
    margin-bottom: 6px;
}

.module-switch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 8px 0;
    font-size: 12px;
}

.module-select-row {
    font-size: 12px;
    margin-bottom: 8px;
}

.tasks-tabs {
    display: inline-flex;
    gap: 6px;
    margin-bottom: 10px;
}

.module-tab {
    border-radius: 999px;
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    font-size: 13px;
}

.module-tab-active {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0369a1;
}

.module-footer-text {
    margin-top: 10px;
    font-size: 11px;
    text-align: center;
    color: #6b7280;
}

.backup-header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.backup-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    margin-bottom: 8px;
}

.backup-select {
    width: 70px;
    display: inline-block;
}

.backup-search {
    width: 140px;
    display: inline-block;
}

.backup-table th,
.backup-table td {
    font-size: 12px;
}

.backup-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    font-size: 11px;
    margin: 10px 0;
}
.toast-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 40;
}

.toast {
    background: #111827;
    color: #f9fafb;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.4);
    opacity: 0.95;
}

@media (max-width: 960px) {
    .layout {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .sidebar-nav .nav-item span {
        display: none;
    }

    .cards-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .grid-2,
    .grid-3,
    .grid-product {
        grid-template-columns: minmax(0, 1fr);
    }

    .general-grid-top {
        grid-template-columns: minmax(0, 1fr);
    }

    .module-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .os-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

