* {
    box-sizing: border-box;
}

:root {
    --bg-0: #090719;
    --bg-1: #16103a;
    --bg-2: #25105b;
    --panel: rgba(14, 11, 35, 0.9);
    --panel-strong: #151032;
    --border: rgba(196, 181, 253, 0.22);
    --text: #f3efff;
    --muted: #bcb2df;
    --brand: #7c3aed;
    --brand-2: #06b6d4;
    --danger: #fb7185;
    --shadow: 0 26px 90px rgba(0, 0, 0, 0.36);
    --surface: rgba(28, 20, 66, 0.74);
    --accent-warm: #f43f9b;
}

html, body {
    min-height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 0%, rgba(124, 58, 237, 0.42), transparent 32%),
        radial-gradient(circle at 88% 10%, rgba(6, 182, 212, 0.28), transparent 30%),
        radial-gradient(circle at 58% 100%, rgba(244, 63, 155, 0.18), transparent 32%),
        linear-gradient(145deg, var(--bg-0) 0%, var(--bg-1) 48%, var(--bg-2) 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(196, 181, 253, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 78%);
}

.sidebar-toggle {
    position: fixed;
    opacity: 0;
    pointer-events: none;
}

.app-shell {
    display: grid;
    grid-template-columns: clamp(250px, 20vw, 292px) minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 16px;
    border-right: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(12, 9, 31, 0.98), rgba(25, 16, 59, 0.95)),
        radial-gradient(circle at top left, rgba(124, 58, 237, 0.34), transparent 42%),
        radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.16), transparent 34%);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.18);
    z-index: 50;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 18px;
    border-bottom: 1px solid rgba(196, 181, 253, 0.18);
}

.sidebar__brand strong,
.sidebar__brand span {
    display: block;
}

.sidebar__brand strong {
    font-size: 1rem;
}

.sidebar__brand span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.82rem;
}

.sidebar__nav {
    display: grid;
    gap: 10px;
}

.sidebar__link {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 11px;
    min-height: 62px;
    padding: 10px 11px;
    border: 1px solid rgba(196, 181, 253, 0.16);
    border-radius: 18px;
    color: #dbe7ff;
    text-decoration: none;
    background:
        linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(16, 13, 40, 0.42));
    overflow: hidden;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

button.sidebar__link {
    font: inherit;
    text-align: left;
    width: 100%;
}

.sidebar__install-link {
    cursor: pointer;
}

.sidebar__link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.32), rgba(6, 182, 212, 0.18));
    opacity: 0;
    transition: opacity 0.18s ease;
}

.sidebar__link:hover {
    transform: translateX(3px);
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.sidebar__link:hover::before,
.sidebar__link.is-active::before {
    opacity: 1;
}

.sidebar__link.is-active {
    border-color: rgba(6, 182, 212, 0.54);
    box-shadow:
        0 14px 32px rgba(124, 58, 237, 0.22),
        inset 4px 0 0 var(--brand-2);
}

.sidebar__icon,
.sidebar__copy,
.sidebar__chevron {
    position: relative;
    z-index: 1;
}

.sidebar__icon {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(196, 181, 253, 0.24);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(124, 58, 237, 0.18);
    color: #cffafe;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
}

.sidebar__link.is-active .sidebar__icon {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: white;
    border-color: rgba(255, 255, 255, 0.18);
}

.sidebar__copy span,
.sidebar__copy small {
    display: block;
}

.sidebar__copy span {
    font-weight: 800;
}

.sidebar__copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.76rem;
}

.sidebar__chevron {
    color: #67e8f9;
    font-size: 1.35rem;
    opacity: 0.55;
    transform: translateX(-2px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.sidebar__link:hover .sidebar__chevron,
.sidebar__link.is-active .sidebar__chevron {
    opacity: 1;
    transform: translateX(0);
}

.sidebar__footer {
    margin-top: auto;
    padding: 14px 12px;
    border: 1px solid rgba(196, 181, 253, 0.22);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(6, 182, 212, 0.12)),
        rgba(8, 15, 27, 0.58);
}

.sidebar__footer span,
.sidebar__footer a {
    display: block;
}

.sidebar__footer span {
    color: var(--muted);
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.sidebar__footer a {
    margin-top: 8px;
    color: #bfdbfe;
    font-weight: 800;
    text-decoration: none;
}

.app-main {
    min-width: 0;
    width: 100%;
    padding: clamp(14px, 2vw, 24px);
}

.menu-button {
    display: none;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

.sidebar-backdrop {
    display: none;
}

.panel-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.page-wrap {
    width: min(100%, 1280px);
    margin: 0 auto;
    padding: clamp(14px, 2vw, 24px);
}

.app-shell .page-wrap {
    width: 100%;
    max-width: 1360px;
    padding: 0;
}

.panel-card {
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.panel-card--narrow {
    width: min(100%, 440px);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: clamp(15px, 2vw, 20px) clamp(16px, 2vw, 24px);
    margin-bottom: 18px;
    background:
        linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(6, 182, 212, 0.1)),
        rgba(14, 11, 35, 0.86);
}

.topbar__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    flex-wrap: wrap;
}

.install-app-button {
    border: 1px solid rgba(6, 182, 212, 0.42);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.92), rgba(6, 182, 212, 0.78));
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    min-height: 42px;
    padding: 0 16px;
    box-shadow: 0 14px 34px rgba(124, 58, 237, 0.28);
}

.install-app-button[hidden] {
    display: none;
}

.install-app-button--floating {
    bottom: 18px;
    position: fixed;
    right: 18px;
    z-index: 40;
}

.install-app-button--sidebar {
    margin-top: 10px;
    width: 100%;
}

.panel-header {
    padding: 24px 28px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand__mark {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
    display: grid;
    place-items: center;
    font-weight: 800;
    color: white;
    letter-spacing: 0;
}

.brand__title {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    font-weight: 700;
    margin: 0;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.brand__subtitle {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: clamp(0.78rem, 1.5vw, 0.92rem);
    overflow-wrap: anywhere;
}

.panel-body {
    padding: 28px;
}

.login-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: stretch;
}

.hero {
    background:
        linear-gradient(180deg, rgba(15, 26, 43, 0.92), rgba(10, 17, 31, 0.96)),
        radial-gradient(circle at top right, rgba(91, 140, 255, 0.2), transparent 35%);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
    min-height: 100%;
}

.hero h1 {
    margin: 0 0 12px;
    font-size: clamp(1.8rem, 2.5vw, 2.8rem);
    line-height: 1.05;
}

.hero p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.login-form {
    background: rgba(8, 15, 27, 0.55);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.92rem;
    color: #dbe7ff;
    font-weight: 600;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: rgba(8, 15, 27, 0.78);
    color: var(--text);
    padding: 13px 14px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: rgba(91, 140, 255, 0.7);
    box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.14);
}

.field textarea {
    min-height: 120px;
    resize: vertical;
}

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

.update-form .field:nth-child(3),
.update-form .field:nth-child(4),
.update-form button {
    grid-column: 1 / -1;
}

.btn-primary,
.btn-secondary,
.nav-btn,
.btn-warn,
.btn-danger,
.btn-success {
    border: 0;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, opacity 0.18s ease;
    cursor: pointer;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 10px 13px;
}

.btn-primary {
    width: 100%;
    padding: 13px 16px;
    color: white;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 26px rgba(124, 58, 237, 0.3);
}

.btn-fit {
    width: auto;
    min-width: 150px;
}

.btn-primary:hover,
.btn-secondary:hover,
.nav-btn:hover {
    transform: translateY(-1px);
}

.btn-secondary {
    padding: 11px 15px;
    background: rgba(124, 58, 237, 0.14);
    color: var(--text);
    border: 1px solid rgba(196, 181, 253, 0.24);
}

.grid-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    gap: 16px;
}

.kpi,
.section {
    background:
        linear-gradient(180deg, rgba(28, 20, 66, 0.74), rgba(12, 9, 31, 0.82));
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.kpi {
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.kpi::after {
    content: "";
    position: absolute;
    right: -34px;
    top: -34px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.14);
}

.kpi__label {
    margin: 0 0 10px;
    color: #c9bfff;
    font-size: 0.9rem;
}

.kpi__label--live {
    margin: 8px 0 0;
    color: #86efac;
    font-size: 0.78rem;
}

.kpi__value {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 800;
    letter-spacing: 0;
    color: #ffffff;
}

.section {
    padding: 22px;
    margin-top: 18px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(min(100%, 320px), 0.85fr);
    gap: 18px;
}

.compact-list {
    display: grid;
    gap: 10px;
}

.list-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 14px;
    background: var(--surface);
}

.list-row--online {
    grid-template-columns: minmax(0, 1fr) minmax(160px, auto);
    align-items: start;
}

.online-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 8px;
    color: #cbd5e1;
    font-size: 0.84rem;
}

.list-row__meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    color: var(--muted);
    font-size: 0.86rem;
    flex-wrap: wrap;
}

.empty-state {
    padding: 18px;
    border: 1px dashed rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    color: var(--muted);
    background: rgba(8, 15, 27, 0.32);
}

.kpi--accent {
    background:
        linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(6, 182, 212, 0.18)),
        rgba(8, 15, 27, 0.62);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 14px 16px;
}

.form-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}

.stack {
    display: grid;
    gap: 16px;
}

.muted-small {
    color: var(--muted);
    font-size: 0.82rem;
    margin-top: 4px;
}

.purchase-note {
    max-width: 360px;
    margin-top: 10px;
    padding: 9px 10px;
    border: 1px solid rgba(91, 140, 255, 0.18);
    border-radius: 10px;
    background: rgba(91, 140, 255, 0.08);
    color: #dbeafe;
    font-size: 0.84rem;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
}

.purchase-note span {
    display: inline-block;
    margin-right: 6px;
    color: #93c5fd;
    font-weight: 800;
}

.check-line {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #dbe7ff;
    font-weight: 600;
}

.check-line input {
    width: 18px;
    height: 18px;
}

.section:first-of-type {
    margin-top: 0;
}

.section__title {
    margin: 0 0 16px;
    font-size: 1.05rem;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
    gap: 12px;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 14px 16px;
    border: 1px solid rgba(196, 181, 253, 0.28);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(124, 58, 237, 0.28), rgba(6, 182, 212, 0.16)),
        rgba(8, 15, 27, 0.68);
    color: white;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.nav-btn::after {
    content: "›";
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #cffafe;
    font-size: 1.2rem;
    transition: transform 0.18s ease, background 0.18s ease;
}

.nav-btn:hover::after {
    transform: translateX(2px);
    background: rgba(255, 255, 255, 0.16);
}

.table-wrap {
    overflow-x: auto;
    max-width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: min(760px, calc(100vw - 24px));
}

th, td {
    text-align: left;
    padding: clamp(10px, 1.4vw, 14px) clamp(10px, 1.6vw, 16px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    font-size: clamp(0.82rem, 1.35vw, 0.95rem);
    vertical-align: top;
}

th {
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.06);
    font-weight: 700;
}

.status-active { color: #4ade80; font-weight: 700; }
.status-expired { color: #fb7185; font-weight: 700; }

.alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(251, 113, 133, 0.35);
    background: rgba(251, 113, 133, 0.14);
    color: #fecdd3;
}

.success {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.14);
    color: #bbf7d0;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.toolbar__search {
    display: flex;
    gap: 10px;
    flex: 1 1 420px;
}

.toolbar__search input {
    flex: 1;
}

.badge,
.plano-free,
.plano-basico,
.plano-premium,
.status-active,
.status-inactive,
.status-banned,
.status-expired,
.status-prospect,
.status-pendente,
.status-pago,
.status-cancelado,
.status-expirado {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
}

.plano-free { background: rgba(148, 163, 184, 0.14); color: #cbd5e1; }
.plano-basico { background: rgba(6, 182, 212, 0.18); color: #a5f3fc; }
.plano-premium { background: rgba(124, 58, 237, 0.24); color: #ddd6fe; }
.status-active { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.status-inactive { background: rgba(250, 204, 21, 0.16); color: #fde68a; }
.status-banned,
.status-expired { background: rgba(251, 113, 133, 0.15); color: #fecdd3; }
.status-prospect,
.status-pendente { background: rgba(250, 204, 21, 0.16); color: #fde68a; }
.status-pago { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.status-cancelado,
.status-expirado { background: rgba(251, 113, 133, 0.15); color: #fecdd3; }

.text-mono {
    font-family: "Cascadia Mono", "Consolas", monospace;
    font-size: 0.82rem;
    color: #a5b4fc;
    word-break: break-all;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    padding: 18px;
}

.modal-card {
    width: min(100%, 460px);
    margin: 6vh auto 0;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 22px;
}

.modal-card h3 {
    margin: 0 0 12px;
}

.modal-card p {
    margin: 0 0 14px;
    color: var(--muted);
}

.modal-card .field {
    margin-bottom: 14px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn-warn {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #be123c);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

@media (max-width: 1200px) {
    .app-shell {
        grid-template-columns: 250px minmax(0, 1fr);
    }

    .sidebar {
        padding: 18px 12px;
    }

    .sidebar__link {
        grid-template-columns: 38px minmax(0, 1fr) 14px;
        min-height: 58px;
        gap: 9px;
    }

    .sidebar__icon {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 900px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(84vw, 320px);
        transform: translateX(-105%);
        transition: transform 0.2s ease;
    }

    .sidebar-toggle:checked ~ .app-shell .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        display: block;
        pointer-events: none;
        opacity: 0;
        background: rgba(0, 0, 0, 0.58);
        backdrop-filter: blur(4px);
        transition: opacity 0.2s ease;
        z-index: 40;
    }

    .sidebar-toggle:checked ~ .app-shell .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .app-main {
        padding: clamp(12px, 2.2vw, 16px);
    }

    .menu-button {
        display: inline-flex;
    }

    .topbar__mark {
        display: none;
    }

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

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

    .topbar {
        position: sticky;
        top: 0;
        z-index: 30;
    }
}

@media (max-width: 640px) {
    .panel-shell {
        padding: 14px;
    }

    .page-wrap {
        padding: 0;
    }

    .app-main {
        padding: 12px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .topbar__meta {
        width: 100%;
        justify-content: space-between;
    }

    .grid-kpis {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr));
        gap: 10px;
    }

    .kpi {
        padding: 15px;
    }

    .kpi__value {
        font-size: 1.65rem;
    }

    .list-row,
    .list-row--online {
        grid-template-columns: 1fr;
    }

    .list-row__meta {
        justify-content: flex-start;
    }

    .toolbar,
    .toolbar__search,
    .form-inline {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .btn-fit,
    .btn-primary,
    .btn-secondary,
    .btn-danger,
    .btn-success,
    .btn-warn {
        width: 100%;
    }

    .panel-body,
    .panel-header {
        padding-left: 18px;
        padding-right: 18px;
    }

    .toolbar__search {
        flex-basis: 100%;
    }

    .hero,
    .login-form,
    .section,
    .kpi {
        border-radius: 16px;
    }

    .section {
        padding: 16px;
    }

    table {
        min-width: 680px;
    }
}

@media (max-width: 420px) {
    .app-main {
        padding: 8px;
    }

    .topbar {
        border-radius: 18px;
        margin-bottom: 12px;
    }

    .brand {
        gap: 10px;
    }

    .brand__mark {
        width: 40px;
        height: 40px;
        font-size: 0.86rem;
    }

    .menu-button {
        min-height: 36px;
        padding: 8px 10px;
    }

    .section {
        padding: 14px;
        margin-top: 12px;
    }

    .kpi {
        padding: 13px;
    }

    .kpi__label {
        font-size: 0.78rem;
    }

    .kpi__value {
        font-size: 1.45rem;
    }

    .sidebar {
        width: min(92vw, 320px);
    }

    .sidebar__link {
        min-height: 56px;
    }

    table {
        min-width: 620px;
    }
}

.input-compact {
    width: 100%;
    min-width: 150px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: rgba(8, 15, 27, 0.78);
    color: var(--text);
    padding: 11px 12px;
    outline: none;
}

.input-compact:focus {
    border-color: rgba(91, 140, 255, 0.7);
    box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.14);
}

.form-inline {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
