﻿:root {
    --login-bg-start: #0b1020;
    --login-bg-end: #101a35;
    --login-accent: #ef4444;
    --login-accent-soft: #f87171;
    --login-text-main: #f8fafc;
    --login-text-soft: #a5b4fc;
    --login-card: rgba(15, 23, 42, 0.82);
    --login-stroke: rgba(248, 250, 252, 0.1);
    --login-input: rgba(30, 41, 59, 0.72);

    --dash-bg: #ffffff;
    --dash-surface: #ffffff;
    --dash-border: #dbe2ea;
    --dash-text-main: #0f172a;
    --dash-text-soft: #64748b;
    --dash-sidebar-bg: #111217;
    --dash-sidebar-muted: #c2c6d0;
    --dash-sidebar-active: #1f1216;
    --dash-accent: #d7263d;
    --dash-accent-strong: #9f1239;
    --dash-blue: #1d4ed8;
    --dash-blue-strong: #1e3a8a;
    --dash-accent-soft: #fff1f2;
    --dash-accent-border: #fecdd3;
    --dash-blue-soft: #dbeafe;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Space Grotesk", sans-serif;
    color: var(--login-text-main);
    background:
        radial-gradient(circle at 15% 20%, rgba(239, 68, 68, 0.25), transparent 45%),
        radial-gradient(circle at 85% 10%, rgba(56, 189, 248, 0.18), transparent 35%),
        linear-gradient(140deg, var(--login-bg-start), var(--login-bg-end));
}

.scene {
    min-height: 100vh;
    padding: 32px 18px;
    display: grid;
    place-items: center;
}

.card {
    background: var(--login-card);
    border: 1px solid var(--login-stroke);
    border-radius: 22px;
    backdrop-filter: blur(14px);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}

.login-card {
    width: min(460px, 100%);
    padding: 28px;
}

.brand {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    width: clamp(92px, 24vw, 130px);
    margin: 0 auto 10px;
    display: block;
}

h1 {
    margin: 0;
    font-size: 1.5rem;
}

.brand p {
    margin-top: 8px;
    color: var(--login-text-soft);
}

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

label {
    font-size: 0.92rem;
    font-weight: 500;
}

input[type="email"],
input[type="password"] {
    border: 1px solid transparent;
    background: var(--login-input);
    color: var(--login-text-main);
    border-radius: 12px;
    padding: 13px 14px;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

input::placeholder {
    color: rgba(241, 245, 249, 0.45);
}

input:focus {
    border-color: var(--login-accent-soft);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.form-row {
    margin: 4px 0 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.remember input {
    accent-color: var(--login-accent);
}

.ghost-link {
    color: #93c5fd;
    text-decoration: none;
    font-size: 0.9rem;
}

.ghost-link:hover {
    text-decoration: underline;
}

button {
    margin-top: 2px;
    border: 0;
    border-radius: 12px;
    padding: 13px 16px;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    background: linear-gradient(120deg, var(--login-accent), #dc2626);
    cursor: pointer;
    transition: transform 180ms ease, filter 180ms ease;
}

button:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.hint {
    margin: 14px 0 0;
    text-align: center;
    font-size: 0.84rem;
    color: rgba(226, 232, 240, 0.8);
}

.hint code {
    color: #fda4af;
}

.notice {
    margin: 14px 0 0;
    text-align: center;
    font-size: 0.92rem;
}

.notice-error {
    color: #fecaca;
}

.notice-info {
    color: #bae6fd;
}

.dashboard-body {
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: var(--dash-text-main);
}

.dashboard-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 252px 1fr;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background:
        linear-gradient(164deg, #0e1a36 0%, #10274e 58%, #183f87 100%);
    color: #f8fafc;
    border-right: 1px solid rgba(99, 136, 228, 0.34);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
    padding: 18px 10px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 14px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.14);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.sidebar-title {
    margin: 0;
    font-weight: 700;
    color: #ffffff;
}

.sidebar-subtitle {
    margin: 2px 0 0;
    color: var(--dash-sidebar-muted);
    font-size: 0.82rem;
}

.nav-list {
    display: grid;
    gap: 7px;
    padding: 0 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #d4dbe6;
    border-radius: 11px;
    padding: 9px 10px;
    border: 1px solid transparent;
    font-size: 0.92rem;
    font-weight: 600;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.nav-icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    border: 1px solid rgba(203, 213, 225, 0.22);
    background: rgba(15, 23, 42, 0.28);
    color: #c6d4ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-icon svg {
    width: 15px;
    height: 15px;
}

.nav-label {
    line-height: 1;
    letter-spacing: 0.01em;
}

.nav-item:hover {
    background: rgba(148, 163, 184, 0.16);
    border-color: rgba(148, 163, 184, 0.28);
    color: #f8fbff;
}

.nav-item:hover .nav-icon {
    border-color: rgba(191, 219, 254, 0.45);
    background: rgba(30, 58, 138, 0.35);
}

.nav-item.active {
    background: linear-gradient(108deg, rgba(29, 78, 216, 0.34), rgba(215, 38, 61, 0.24));
    color: #ffffff;
    border-color: rgba(80, 147, 255, 0.74);
    box-shadow: inset 3px 0 0 rgba(96, 165, 250, 0.96);
}

.nav-item.active .nav-icon {
    border-color: rgba(191, 219, 254, 0.62);
    background: linear-gradient(130deg, rgba(29, 78, 216, 0.4), rgba(215, 38, 61, 0.3));
    color: #ffffff;
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid rgba(226, 232, 240, 0.14);
    padding: 12px 8px 0;
}

.sidebar-footer p {
    margin: 0;
    color: var(--dash-sidebar-muted);
    font-size: 0.83rem;
}

.sidebar-footer strong {
    display: block;
    margin-top: 4px;
    font-size: 0.9rem;
    color: #ffffff;
    word-break: break-word;
}

.logout-form {
    margin-top: 12px;
}

.logout-btn {
    width: 100%;
    margin-top: 0;
    background: linear-gradient(120deg, rgba(29, 78, 216, 0.34), rgba(215, 38, 61, 0.16));
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    font-size: 0.92rem;
}

.logout-btn:hover {
    transform: none;
    filter: brightness(1.04);
}

.dashboard-main {
    padding: 28px;
    display: grid;
    align-content: start;
    gap: 16px;
}

.dashboard-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.dashboard-header h1 {
    margin: 0;
    color: var(--dash-text-main);
    font-size: clamp(1.5rem, 2.2vw, 2rem);
}

.dashboard-header p {
    margin: 6px 0 0;
    color: var(--dash-text-soft);
}

.header-filters {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
    align-items: end;
    gap: 10px;
}

.filter-field {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.filter-field-multi {
    align-content: end;
}

.filter-field > span {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.filter-field select {
    width: 100%;
    height: 40px;
    border-radius: 9px;
    border: 1px solid #d4dce8;
    background: #ffffff;
    color: #1e293b;
    padding: 0 12px;
    font: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.filter-field select:focus {
    outline: 2px solid rgba(29, 78, 216, 0.14);
    border-color: rgba(215, 38, 61, 0.55);
}

.multi-filter {
    position: relative;
    min-width: 0;
    border: 1px solid #d4dce8;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.multi-filter summary {
    list-style: none;
    cursor: pointer;
    height: 40px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 600;
}

.multi-filter summary::-webkit-details-marker {
    display: none;
}

.multi-filter summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(45deg) translateY(-1px);
    transition: transform 160ms ease, border-color 160ms ease;
}

.multi-count {
    margin-left: auto;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
}

.multi-filter[open] {
    border-color: rgba(215, 38, 61, 0.52);
    box-shadow: 0 12px 24px rgba(30, 58, 138, 0.13);
}

.multi-filter[open] summary::after {
    border-color: var(--dash-blue-strong);
    transform: rotate(-135deg) translate(-1px, 2px);
}

.multi-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 7;
    background: #ffffff;
    border: 1px solid #d4dce8;
    border-radius: 10px;
    padding: 8px;
    display: grid;
    gap: 4px;
    max-height: 230px;
    overflow-y: auto;
}

.multi-option {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-size: 0.88rem;
    border-radius: 8px;
    padding: 6px 7px;
}

.multi-option:hover {
    background: #f8fafc;
}

.multi-option input[type="checkbox"] {
    accent-color: #d7263d;
}

.multi-option input[type="checkbox"]:checked + span {
    color: #1e3a8a;
    font-weight: 700;
}

.filter-action {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.filter-btn {
    margin-top: 0;
    height: 40px;
    width: auto;
    min-width: 110px;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 0.9rem;
    letter-spacing: 0;
    background: linear-gradient(110deg, #1d4ed8 0%, #1e40af 68%, #c1121f 100%);
}

.filter-btn:hover {
    transform: none;
    filter: brightness(1.06);
}

.surface {
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric-card {
    padding: 16px;
}

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

.metric-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.metric-icon svg {
    width: 17px;
    height: 17px;
}

.metric-icon.users {
    color: #334155;
}

.metric-icon.sales {
    color: #9f1239;
}

.metric-icon.projection {
    color: #1e3a8a;
}

.metric-icon.revenue {
    color: #0369a1;
}

.metric-icon.month {
    color: #475569;
}

.metric-label {
    margin: 0;
    color: var(--dash-text-soft);
    font-size: 0.9rem;
}

.metric-card h2 {
    margin: 8px 0 6px;
    color: var(--dash-text-main);
    font-size: clamp(1.36rem, 1.9vw, 1.8rem);
    line-height: 1.1;
}

.metric-trend {
    font-size: 0.8rem;
}

.metric-trend.positive {
    color: #1e3a8a;
}

.metric-trend.neutral {
    color: #64748b;
}

.insights-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}

.chart-panel {
    padding: 16px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.panel-head-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-head h3 {
    margin: 0;
    color: var(--dash-text-main);
    font-size: 1rem;
}

.panel-head p {
    margin: 4px 0 0;
    color: var(--dash-text-soft);
    font-size: 0.84rem;
}

.chart-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 3px;
    background: #f9fafb;
}

.chart-mode-btn {
    border: 0;
    background: transparent;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0;
    padding: 6px 8px;
    border-radius: 6px;
    margin: 0;
}

.chart-mode-btn.active {
    background: linear-gradient(110deg, rgba(29, 78, 216, 0.2), rgba(215, 38, 61, 0.08));
    color: #1f2a5b;
    border: 1px solid #c8d6f5;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.chart-mode-btn:hover {
    transform: none;
    filter: none;
}

.chip {
    font-size: 0.78rem;
    padding: 6px 8px;
    border: 1px solid #c8d6f5;
    border-radius: 999px;
    color: #1f2a5b;
    background: linear-gradient(110deg, rgba(29, 78, 216, 0.16), rgba(215, 38, 61, 0.06));
}

.chart-wrap {
    position: relative;
    height: 290px;
}

.goal-block {
    margin-top: 8px;
}

.goal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--dash-text-soft);
    font-size: 0.88rem;
    margin-bottom: 8px;
}

.goal-head strong {
    color: var(--dash-text-main);
    font-size: 0.96rem;
}

.goal-track {
    width: 100%;
    height: 9px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.goal-fill {
    display: block;
    width: var(--goal, 0%);
    height: 100%;
    background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 72%, #d7263d 100%);
    border-radius: inherit;
    animation: fill-up 1200ms ease;
}

.quick-panel {
    padding: 16px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.quick-card {
    border: 1px solid #e8eef6;
    background: #fbfdff;
    border-radius: 10px;
    padding: 10px 11px;
    display: grid;
    gap: 5px;
}

.quick-card span {
    color: #64748b;
    font-size: 0.78rem;
}

.quick-card strong {
    color: #0f172a;
    font-size: 1.05rem;
}

.quick-breakdown {
    border: 1px solid #e8eef6;
    border-radius: 10px;
    padding: 11px;
    background: #ffffff;
}

.quick-breakdown h4 {
    margin: 0 0 8px;
    color: #1e293b;
    font-size: 0.83rem;
    font-weight: 700;
}

.split-row {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.split-row:last-child {
    margin-bottom: 0;
}

.split-row > span {
    color: #475569;
    font-size: 0.82rem;
    font-weight: 600;
}

.split-row > strong {
    color: #0f172a;
    font-size: 0.84rem;
}

.split-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.split-fill {
    display: block;
    width: var(--fill, 0%);
    height: 100%;
    border-radius: inherit;
}

.split-fill-pix {
    background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 76%, #d7263d 100%);
}

.split-fill-card {
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 72%, #be123c 100%);
}

.quick-projection-band {
    margin-top: 10px;
    border: 1px solid #dbe5f7;
    border-radius: 10px;
    background: linear-gradient(110deg, rgba(29, 78, 216, 0.14), rgba(215, 38, 61, 0.05));
    padding: 10px 11px;
    display: grid;
    gap: 4px;
}

.quick-projection-band span {
    color: #475569;
    font-size: 0.8rem;
}

.quick-projection-band strong {
    color: #0f172a;
    font-size: 0.95rem;
}

.report-panel {
    padding: 16px;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.report-kpi {
    border: 1px solid #e8eef5;
    border-radius: 10px;
    background: #fbfdff;
    padding: 12px;
    display: grid;
    gap: 6px;
}

.report-kpi p {
    margin: 0;
    color: #64748b;
    font-size: 0.84rem;
}

.report-kpi h4 {
    margin: 4px 0 0;
    color: #0f172a;
    font-size: 1.35rem;
}

.report-meter {
    width: 100%;
    height: 7px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.report-meter span {
    display: block;
    width: min(var(--fill, 0%), 100%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 74%, #d7263d 100%);
}

.report-kpi span {
    color: #475569;
    font-size: 0.82rem;
}

.country-block {
    border-top: 1px solid #edf2f7;
    padding-top: 12px;
}

.country-block h4 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 0.98rem;
}

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

.country-item {
    border: 1px solid #e8eef6;
    border-radius: 10px;
    background: #fbfdff;
    padding: 10px 11px;
    display: grid;
    gap: 7px;
}

.country-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.country-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.country-flag {
    font-size: 1.2rem;
    line-height: 1;
}

.country-main strong {
    display: block;
    color: #0f172a;
    font-size: 0.9rem;
}

.country-main span {
    display: block;
    color: #64748b;
    font-size: 0.8rem;
}

.country-share {
    color: #1e3a8a;
    font-size: 0.9rem;
}

.country-progress {
    width: 100%;
    height: 7px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.country-progress span {
    display: block;
    height: 100%;
    width: min(var(--fill, 0%), 100%);
    border-radius: inherit;
    background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 80%, #d7263d 100%);
}

.country-empty {
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
}

.products-filters {
    grid-template-columns: repeat(2, minmax(170px, 1fr)) auto;
}

.products-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.catalog-panel {
    padding: 16px;
}

.products-table-wrap,
.plans-table-wrap {
    overflow-x: auto;
}

.products-table,
.plans-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.products-table th,
.products-table td,
.plans-table th,
.plans-table td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #edf2f7;
    color: #334155;
    vertical-align: middle;
}

.products-table thead th,
.plans-table thead th {
    color: #64748b;
    font-weight: 600;
}

.table-subcode {
    display: block;
    margin-top: 3px;
    color: #94a3b8;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 2px 8px;
    font-size: 0.76rem;
    font-weight: 700;
}

.badge-red {
    color: #7f1d1d;
    background: #fff1f2;
    border-color: #fecdd3;
}

.badge-deluxe {
    color: #1e3a8a;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.subscriptions-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.subscriptions-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 12px;
}

.subs-status-panel,
.subs-recent-panel,
.plans-panel {
    padding: 16px;
}

.status-row {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
}

.status-row:last-child {
    margin-bottom: 0;
}

.status-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #334155;
}

.status-top strong {
    color: #0f172a;
}

.status-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.status-fill {
    display: block;
    width: min(var(--fill, 0%), 100%);
    height: 100%;
    border-radius: inherit;
}

.status-fill.tone-good {
    background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 85%);
}

.status-fill.tone-bad {
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 85%);
}

.status-fill.tone-neutral {
    background: linear-gradient(90deg, #334155 0%, #64748b 85%);
}

.recent-list {
    display: grid;
    gap: 8px;
}

.recent-item {
    border: 1px solid #e8eef6;
    border-radius: 10px;
    background: #fbfdff;
    padding: 10px 11px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.recent-item strong {
    color: #0f172a;
    display: block;
    font-size: 0.9rem;
}

.recent-item span {
    color: #64748b;
    font-size: 0.8rem;
}

.recent-right {
    text-align: right;
}

.table-meter {
    width: 100%;
    max-width: 100px;
    height: 6px;
    margin: 0 0 4px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.table-meter span {
    display: block;
    width: min(var(--fill, 0%), 100%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 85%);
}

.subscriptions-filters {
    grid-template-columns: repeat(2, minmax(170px, 1fr)) auto;
}

.subscriptions-hero-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 12px;
}

.subs-highlight,
.subs-finance {
    padding: 16px;
}

.subs-highlight-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.subs-highlight-head h3,
.subs-finance h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
}

.subs-highlight-body {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
}

.rate-ring {
    --pct: 0;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: conic-gradient(#2563eb 0 calc(var(--pct) * 1%), #dbe8ff calc(var(--pct) * 1%) 100%);
    display: grid;
    place-items: center;
    padding: 10px;
}

.rate-ring > div {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 6px;
}

.rate-ring strong {
    display: block;
    color: #0f172a;
    font-size: 1.18rem;
    line-height: 1.1;
}

.rate-ring span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 600;
}

.subs-kpi-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.subs-kpi-item {
    border: 1px solid #e8eef6;
    border-radius: 10px;
    background: #fbfdff;
    padding: 10px;
}

.subs-kpi-item span {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
}

.subs-kpi-item strong {
    display: block;
    margin-top: 4px;
    color: #0f172a;
    font-size: 1.14rem;
}

.subs-finance-main {
    margin: 8px 0 4px;
    color: #0f172a;
    font-size: clamp(1.8rem, 2.4vw, 2.2rem);
    line-height: 1.05;
    font-weight: 700;
}

.subs-finance-caption {
    margin: 0 0 12px;
    color: #64748b;
    font-size: 0.85rem;
}

.subs-finance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.subs-finance-item {
    border: 1px solid #e8eef6;
    border-radius: 10px;
    background: #fbfdff;
    padding: 9px 10px;
}

.subs-finance-item span {
    display: block;
    color: #64748b;
    font-size: 0.76rem;
}

.subs-finance-item strong {
    display: block;
    margin-top: 3px;
    color: #0f172a;
    font-size: 1rem;
}

.status-row {
    border: 1px solid #e8eef6;
    border-radius: 10px;
    background: #fbfdff;
    padding: 10px;
    gap: 7px;
}

.status-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #334155;
}

.status-main strong {
    color: #0f172a;
}

.status-foot {
    color: #64748b;
    font-size: 0.78rem;
}

.recent-timeline {
    display: grid;
    gap: 8px;
}

.recent-timeline-item {
    border: 1px solid #e8eef6;
    border-radius: 10px;
    background: #fbfdff;
    padding: 10px 11px;
    display: grid;
    grid-template-columns: 12px 1fr auto;
    gap: 10px;
    align-items: center;
}

.timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 100%);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.recent-content strong {
    color: #0f172a;
    display: block;
    font-size: 0.9rem;
}

.recent-content span {
    color: #64748b;
    font-size: 0.8rem;
}

.plan-health-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.plan-health-card {
    border: 1px solid #e8eef6;
    border-radius: 12px;
    background: #fbfdff;
    padding: 12px;
    display: grid;
    gap: 10px;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.plan-health-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(30, 58, 138, 0.09);
}

.plan-health-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.plan-health-head h4 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 1rem;
}

.plan-health-mrr {
    text-align: right;
}

.plan-health-mrr span {
    display: block;
    color: #64748b;
    font-size: 0.74rem;
}

.plan-health-mrr strong {
    display: block;
    color: #0f172a;
    font-size: 0.95rem;
    margin-top: 3px;
}

.plan-health-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.plan-health-metrics span {
    display: block;
    color: #64748b;
    font-size: 0.74rem;
}

.plan-health-metrics strong {
    display: block;
    margin-top: 2px;
    color: #0f172a;
    font-size: 0.98rem;
}

.plan-bar-group {
    display: grid;
    gap: 4px;
}

.plan-bar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 0.78rem;
}

.plan-bar-head strong {
    color: #0f172a;
}

.plan-bar-group .table-meter {
    max-width: none;
    height: 8px;
    margin: 0;
}

.plan-meter-active span {
    background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 85%);
}

.plan-meter-churn span {
    background: linear-gradient(90deg, #dc2626 0%, #f97316 85%);
}

.empty-state {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 0.9rem;
}

.subpage-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #dbe4ef;
    background: #ffffff;
    border-radius: 10px;
    padding: 4px;
    width: fit-content;
}

.subpage-link {
    text-decoration: none;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 7px 10px;
    border-radius: 7px;
    border: 1px solid transparent;
}

.subpage-link.active {
    color: #1e3a8a;
    border-color: #bfdbfe;
    background: linear-gradient(110deg, rgba(29, 78, 216, 0.16), rgba(215, 38, 61, 0.06));
}

.filter-input {
    width: 100%;
    height: 40px;
    border-radius: 9px;
    border: 1px solid #d4dce8;
    background: #ffffff;
    color: #1e293b;
    padding: 0 12px;
    font: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.filter-input:focus {
    outline: 2px solid rgba(29, 78, 216, 0.14);
    border-color: rgba(215, 38, 61, 0.55);
}

.customers-filters {
    grid-template-columns: repeat(4, minmax(160px, 1fr)) auto;
}

.customer-kpis {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.customers-table-panel {
    padding: 16px;
}

.customers-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 10px;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #dbe5f7;
    background: #f8fbff;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 9px;
}

.customers-table-wrap {
    overflow: auto;
    max-height: 66vh;
    border: 1px solid #e5edf6;
    border-radius: 12px;
}

.customers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.customers-table th,
.customers-table td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #edf2f7;
    color: #334155;
    vertical-align: middle;
}

.customers-table thead th {
    color: #64748b;
    font-weight: 600;
    position: sticky;
    top: 0;
    background: #f8fbff;
    z-index: 2;
}

.customers-table .num {
    text-align: right;
    white-space: nowrap;
}

.th-rank {
    width: 44px;
    text-align: center;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    border: 1px solid #dbe5f7;
    color: #1e3a8a;
    background: #eff6ff;
    font-size: 0.75rem;
    font-weight: 700;
}

.customer-row td {
    transition: background-color 160ms ease;
}

.customer-row:hover td {
    background: #f9fbff;
}

.customer-row.is-open td {
    background: #f3f8ff;
}

.strong-money {
    color: #1e3a8a;
    font-weight: 700;
}

.muted-inline {
    color: #64748b;
    font-size: 0.78rem;
}

.customer-ident {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 260px;
}

.customer-flag {
    font-size: 1.1rem;
    line-height: 1;
}

.customer-ident strong {
    display: block;
    color: #0f172a;
}

.customer-ident span {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.76rem;
    font-weight: 700;
}

.status-badge.tone-good {
    color: #0f5132;
    background: #ecfdf3;
    border-color: #bbf7d0;
}

.status-badge.tone-bad {
    color: #7f1d1d;
    background: #fff1f2;
    border-color: #fecdd3;
}

.status-badge.tone-neutral {
    color: #334155;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.share-col {
    min-width: 118px;
}

.share-col strong {
    display: block;
    color: #0f172a;
    font-size: 0.82rem;
    margin-bottom: 4px;
}

.share-mini-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.share-mini-track span {
    display: block;
    height: 100%;
    width: max(8px, calc(var(--fill, 0) * 1%));
    max-width: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 84%);
}

.row-action-btn {
    border: 1px solid #dbe5f7;
    background: #f8fbff;
    color: #1e3a8a;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 0.78rem;
    font-weight: 700;
    margin: 0;
    cursor: pointer;
}

.row-action-btn:hover {
    transform: none;
    filter: brightness(1.02);
    background: #edf4ff;
}

.customer-detail-row td {
    background: #f8fbff;
    padding: 0 8px 12px;
}

.customer-detail-card {
    border: 1px solid #dbe5f7;
    border-radius: 10px;
    background: #ffffff;
    padding: 10px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.detail-col span {
    display: block;
    color: #64748b;
    font-size: 0.76rem;
    margin-bottom: 3px;
}

.detail-col strong {
    color: #0f172a;
    font-size: 0.84rem;
}

.page-notice {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.87rem;
}

.page-notice-success {
    border-color: #bbf7d0;
    background: #ecfdf3;
    color: #0f5132;
}

.page-notice-error {
    border-color: #fecaca;
    background: #fff1f2;
    color: #9f1239;
}

.users-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.users-grid {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 12px;
}

.users-create-card,
.users-list-card {
    padding: 16px;
}

.users-create-form {
    display: grid;
    gap: 10px;
}

.users-create-form label,
.users-edit-grid label {
    display: grid;
    gap: 4px;
}

.users-create-form label > span,
.users-edit-grid label > span {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.users-create-form input,
.users-create-form select,
.users-edit-grid input,
.users-edit-grid select {
    width: 100%;
    min-height: 40px;
    border-radius: 9px;
    border: 1px solid #d4dce8;
    background: #ffffff;
    color: #1e293b;
    padding: 9px 12px;
    font: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.users-create-form input:focus,
.users-create-form select:focus,
.users-edit-grid input:focus,
.users-edit-grid select:focus {
    outline: 2px solid rgba(29, 78, 216, 0.14);
    border-color: rgba(215, 38, 61, 0.55);
}

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

.user-item {
    border: 1px solid #dbe5f1;
    border-radius: 10px;
    background: #f9fbff;
    padding: 10px;
    display: grid;
    gap: 8px;
}

.users-edit-form {
    display: grid;
    gap: 8px;
}

.users-edit-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.user-item-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.user-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.user-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    border: 1px solid #d5dff0;
    background: #ffffff;
    color: #334155;
    font-size: 0.75rem;
    padding: 0 8px;
}

.users-delete-form {
    display: flex;
    justify-content: flex-end;
}

.danger-btn {
    margin: 0;
    min-height: 36px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #9f1239;
    padding: 0 12px;
    font-size: 0.83rem;
    font-weight: 700;
}

.danger-btn:hover {
    transform: none;
    filter: brightness(1.03);
}

.danger-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

@keyframes fill-up {
    from {
        width: 0;
    }
}

@media (max-width: 1180px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .subscriptions-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .subscriptions-hero-grid {
        grid-template-columns: 1fr;
    }

    .subs-highlight-body {
        grid-template-columns: 1fr;
    }

    .rate-ring {
        width: 120px;
        height: 120px;
    }

    .plan-health-grid {
        grid-template-columns: 1fr;
    }

    .customer-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .customer-detail-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .users-edit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 880px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .nav-list {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }

    .dashboard-main {
        padding: 16px;
    }

    .dashboard-header {
        gap: 10px;
    }

    .header-filters {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .header-filters .filter-field {
        min-width: 0;
    }

    .header-filters .multi-filter {
        min-width: 0;
    }

    .header-filters .filter-action {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .header-filters .filter-btn {
        width: 100%;
    }

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

    .products-filters {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .products-filters .filter-action {
        grid-column: 1 / -1;
    }

    .subscriptions-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .subscriptions-filters {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .subscriptions-filters .filter-action {
        grid-column: 1 / -1;
    }

    .customers-filters {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .customers-filters .filter-action {
        grid-column: 1 / -1;
    }

    .customer-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hide-md {
        display: none;
    }

    .users-edit-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .login-card {
        padding: 22px;
    }

    h1 {
        font-size: 1.3rem;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }

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

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

    .header-filters .filter-action {
        grid-column: auto;
    }

    .chart-wrap {
        height: 230px;
    }

    .panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .panel-head-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

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

    .split-row {
        grid-template-columns: 52px 1fr;
    }

    .split-row > strong {
        grid-column: 1 / -1;
    }

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

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

    .products-filters .filter-action {
        grid-column: auto;
    }

    .subscriptions-kpis {
        grid-template-columns: 1fr;
    }

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

    .subscriptions-filters .filter-action {
        grid-column: auto;
    }

    .subs-kpi-list,
    .subs-finance-grid,
    .plan-health-metrics {
        grid-template-columns: 1fr;
    }

    .recent-timeline-item {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .timeline-dot {
        display: none;
    }

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

    .customers-filters .filter-action {
        grid-column: auto;
    }

    .customer-kpis {
        grid-template-columns: 1fr;
    }

    .hide-sm {
        display: none;
    }

    .customer-detail-card {
        grid-template-columns: 1fr;
    }

    .users-kpis {
        grid-template-columns: 1fr;
    }

    .user-item-foot {
        flex-direction: column;
        align-items: flex-start;
    }

    .users-delete-form {
        justify-content: flex-start;
    }

    .recent-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .recent-right {
        text-align: left;
    }

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

.db-alert {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #9f1239;
    font-size: 0.87rem;
}

/* Users Admin - Modern Refresh */
.users-page-main {
    gap: 18px;
}

.users-page-header {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 14px;
}

.users-page-tools {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.users-search-box {
    display: grid;
    gap: 4px;
    min-width: 250px;
}

.users-search-box > span {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.users-search-box input {
    height: 40px;
    border-radius: 10px;
    border: 1px solid #d4dce8;
    background: #ffffff;
    color: #0f172a;
    padding: 0 12px;
    font: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.users-search-box input:focus {
    outline: 2px solid rgba(29, 78, 216, 0.14);
    border-color: rgba(215, 38, 61, 0.55);
}

.users-ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: 130px;
    border-radius: 10px;
    border: 1px solid #dbe2ea;
    background: #ffffff;
    color: #0f172a;
    text-decoration: none;
    font-size: 0.87rem;
    font-weight: 700;
    padding: 0 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.users-ghost-btn:hover {
    border-color: #bfd0e7;
    background: #f8fbff;
}

.users-kpis-modern {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.users-kpi-card {
    position: relative;
    overflow: hidden;
}

.users-kpi-card::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(29, 78, 216, 0.14), transparent 70%);
    pointer-events: none;
}

.users-kpi-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.users-kpi-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #dbe5f2;
    background: #f8fbff;
    color: #1e3a8a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.users-kpi-icon.good {
    color: #0f5132;
    background: #ecfdf3;
    border-color: #bbf7d0;
}

.users-kpi-icon.bad {
    color: #9f1239;
    background: #fff1f2;
    border-color: #fecdd3;
}

.users-modern-layout {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.users-create-panel,
.users-list-panel {
    padding: 16px;
}

.users-create-panel {
    position: sticky;
    top: 20px;
}

.users-panel-head {
    margin-bottom: 8px;
}

.users-create-form-modern {
    display: grid;
    gap: 10px;
}

.users-create-form-modern label,
.user-modern-grid label {
    display: grid;
    gap: 4px;
}

.users-create-form-modern label > span,
.user-modern-grid label > span {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.users-create-form-modern input,
.users-create-form-modern select,
.user-modern-grid input,
.user-modern-grid select {
    width: 100%;
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid #d4dce8;
    background: #ffffff;
    color: #1e293b;
    padding: 9px 12px;
    font: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.users-create-form-modern input:focus,
.users-create-form-modern select:focus,
.user-modern-grid input:focus,
.user-modern-grid select:focus {
    outline: 2px solid rgba(29, 78, 216, 0.14);
    border-color: rgba(215, 38, 61, 0.55);
}

.users-create-btn {
    width: 100%;
}

.users-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.users-list-head h3 {
    margin: 0;
    font-size: 1.08rem;
}

.users-list-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.86rem;
}

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

.user-modern-card {
    border: 1px solid #dbe5f1;
    border-radius: 12px;
    background: #f9fbff;
    overflow: hidden;
}

.user-modern-card[open] {
    border-color: #c4d4ee;
    box-shadow: 0 10px 20px rgba(30, 58, 138, 0.08);
}

.user-modern-summary {
    list-style: none;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
}

.user-modern-summary::-webkit-details-marker {
    display: none;
}

.user-modern-ident {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: linear-gradient(130deg, rgba(29, 78, 216, 0.18), rgba(215, 38, 61, 0.2));
    border: 1px solid #cddaf0;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.94rem;
    font-weight: 700;
}

.user-modern-ident strong {
    display: block;
    color: #0f172a;
    font-size: 0.96rem;
}

.user-modern-ident span {
    display: block;
    color: #64748b;
    font-size: 0.82rem;
    margin-top: 2px;
    word-break: break-word;
}

.user-modern-summary-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.user-modern-body {
    border-top: 1px solid #dbe5f1;
    padding: 12px;
    display: grid;
    gap: 10px;
    background: #ffffff;
}

.user-modern-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.user-modern-form {
    display: grid;
    gap: 10px;
}

.user-modern-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.user-modern-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.users-save-btn {
    min-width: 150px;
}

.users-delete-inline {
    margin: 0;
}

.users-delete-inline .danger-btn {
    min-width: 96px;
}

@media (max-width: 1180px) {
    .users-modern-layout {
        grid-template-columns: 1fr;
    }

    .users-create-panel {
        position: static;
    }

    .user-modern-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 880px) {
    .users-page-header {
        grid-template-columns: 1fr;
    }

    .users-page-tools {
        width: 100%;
        justify-content: space-between;
    }

    .users-search-box {
        min-width: 0;
        flex: 1;
    }

    .users-kpis-modern {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .users-page-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .users-ghost-btn {
        width: 100%;
    }

    .users-kpis-modern {
        grid-template-columns: 1fr;
    }

    .user-modern-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-modern-summary-right {
        width: 100%;
        justify-content: flex-start;
    }

    .user-modern-grid {
        grid-template-columns: 1fr;
    }

    .user-modern-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .users-save-btn,
    .users-delete-inline .danger-btn {
        width: 100%;
    }
}
