/* RemoteControl PRO — UI v2 (roxo · azul · branco) */
:root {
    --bg: #0b0e14;
    --bg-elev: #121722;
    --bg-card: #161b26;
    --border: #252d3d;
    --text: #f8fafc;
    --muted: #94a3b8;
    --purple: #8b5cf6;
    --purple-dim: #7c3aed;
    --blue: #3b82f6;
    --blue-dim: #2563eb;
    --white: #ffffff;
    --green: #22c55e;
    --amber: #f59e0b;
    --error: #f87171;
    --radius: 12px;
    --radius-sm: 8px;
    /* Sombras suaves (profundidade sem contorno) */
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.38), 0 2px 10px rgba(0, 0, 0, 0.2);
    --shadow-card-hover: 0 16px 48px rgba(0, 0, 0, 0.45), 0 4px 14px rgba(0, 0, 0, 0.28),
        0 12px 40px rgba(139, 92, 246, 0.08);
    --shadow-chrome: 0 2px 14px rgba(0, 0, 0, 0.32), 0 1px 3px rgba(0, 0, 0, 0.18);
    --shadow-sidebar-edge: 8px 0 32px rgba(0, 0, 0, 0.42);
    --shadow-topbar: 0 6px 28px rgba(0, 0, 0, 0.28);
    --glow-purple: 0 0 24px rgba(139, 92, 246, 0.35);
    --glow-blue: 0 0 24px rgba(59, 130, 246, 0.35);
    --font: "Inter", system-ui, -apple-system, sans-serif;
    --sidebar-w: 272px;
    --space-section: 1.25rem;
    --space-card-pad: 1.25rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body.app-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    background:
        radial-gradient(ellipse 55% 48% at 0% 0%, rgba(139, 92, 246, 0.1), transparent 58%),
        radial-gradient(ellipse 50% 42% at 100% 0%, rgba(59, 130, 246, 0.09), transparent 55%),
        radial-gradient(ellipse 45% 40% at 0% 100%, rgba(139, 92, 246, 0.06), transparent 52%),
        radial-gradient(ellipse 42% 38% at 100% 100%, rgba(59, 130, 246, 0.07), transparent 50%),
        var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.login-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ——— Sidebar ——— */
.sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, #080b11 0%, #0b0e14 45%, #0d1118 100%);
    border-right: none;
    box-shadow: var(--shadow-sidebar-edge);
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0 1rem;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 20;
    transition: transform 0.22s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem 0.85rem;
    padding: 0 1.25rem 1.5rem;
    border-bottom: none;
    margin-bottom: var(--space-section);
}

.sidebar-brand-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1 1 auto;
}

.sidebar-brand-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 42%;
}

.sidebar-brand-logo img {
    max-height: 52px;
    max-width: 140px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: right center;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.sidebar-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--blue) 100%);
    color: var(--white);
    font-weight: 800;
    font-size: 1.15rem;
    box-shadow: var(--glow-purple);
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.sidebar-title {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-tag {
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(59, 130, 246, 0.22));
    color: #c4b5fd;
    border: none;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.12);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0 0.85rem;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--muted);
    text-decoration: none;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 500;
    border: none;
    transition: color 0.15s, background 0.15s, box-shadow 0.15s;
}

.nav-link .nav-ico {
    display: flex;
    opacity: 0.85;
}

.nav-link:hover {
    color: var(--text);
    background: rgba(139, 92, 246, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.nav-link.is-active {
    color: var(--white);
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.35) 0%, rgba(59, 130, 246, 0.18) 100%);
    box-shadow: inset 3px 0 0 var(--purple), 0 4px 18px rgba(139, 92, 246, 0.22);
}

/* ——— User dock (rodapé direito, fora da sidebar) ——— */
.user-dock {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 40;
    pointer-events: none;
}

.user-dock-card {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 10.5rem;
    max-width: min(16rem, calc(100vw - 1.5rem));
    padding: 0.65rem 0.75rem 0.7rem;
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92) 0%, rgba(11, 14, 20, 0.94) 100%);
    border: 1px solid rgba(139, 92, 246, 0.18);
    box-shadow: var(--shadow-card), 0 0 28px rgba(139, 92, 246, 0.12);
    backdrop-filter: blur(14px);
}

.user-dock-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-dock-row--head {
    gap: 0.55rem;
}

.user-dock-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    color: var(--white);
    font-weight: 700;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.35);
}

.user-dock-role {
    font-weight: 600;
    font-size: 0.86rem;
    color: var(--text);
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dock-row--status {
    font-size: 0.75rem;
    color: var(--muted);
    gap: 0.35rem;
    padding-left: 0.1rem;
}

.user-dock-online {
    font-size: 0.7rem;
    line-height: 1;
}

.user-dock-logout-form {
    margin: 0.15rem 0 0;
    padding: 0;
}

.user-dock-logout {
    width: 100%;
    margin: 0;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(22, 27, 38, 0.75);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        color 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.user-dock-logout:hover {
    color: #fecaca;
    background: rgba(127, 29, 29, 0.55);
    border-color: rgba(248, 113, 113, 0.55);
    box-shadow: 0 0 18px rgba(248, 113, 113, 0.25);
}

/* ——— Main layout ——— */
.main-wrap {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-width: 0;
    background:
        radial-gradient(ellipse 78% 52% at 50% -18%, rgba(139, 92, 246, 0.13), transparent 52%),
        radial-gradient(ellipse 58% 42% at 100% 0%, rgba(59, 130, 246, 0.11), transparent 48%),
        radial-gradient(ellipse 48% 40% at 0% 85%, rgba(139, 92, 246, 0.06), transparent 55%),
        radial-gradient(ellipse 44% 36% at 100% 92%, rgba(59, 130, 246, 0.07), transparent 52%),
        var(--bg);
}

.main-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.6rem;
    background: rgba(11, 14, 20, 0.78);
    border-bottom: none;
    box-shadow: var(--shadow-topbar);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 15;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.topbar-greet {
    min-width: 0;
}

.topbar-title {
    margin: 0;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.topbar-title .wave {
    display: inline-block;
}

.topbar-sub {
    margin: 0.15rem 0 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.topbar-expiry {
    margin: 0.5rem 0 0;
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    padding: 0.38rem 0.72rem;
    border-radius: var(--radius-sm);
    background: rgba(22, 27, 38, 0.58);
    box-shadow: var(--shadow-chrome);
    font-size: 0.78rem;
    line-height: 1.35;
    max-width: 100%;
}

.topbar-expiry-label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.66rem;
    color: var(--muted);
}

.topbar-expiry-value {
    font-weight: 600;
    font-size: 0.84rem;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.topbar-expiry--soon .topbar-expiry-value {
    color: var(--amber);
}

.topbar-expiry--past .topbar-expiry-value {
    color: var(--error);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.topbar-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: none;
    background: rgba(22, 27, 38, 0.88);
    box-shadow: var(--shadow-chrome);
    max-width: 220px;
}

.topbar-search-ico {
    display: flex;
    color: var(--muted);
}

.topbar-search {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
}

.topbar-search::placeholder {
    color: var(--muted);
}

:where(
    a,
    button,
    input,
    select,
    textarea,
    [role="button"],
    [tabindex]:not([tabindex="-1"])
):focus-visible {
    outline: 2px solid rgba(139, 92, 246, 0.9);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.topbar-notify {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    border: none;
    background: rgba(22, 27, 38, 0.88);
    box-shadow: var(--shadow-chrome);
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, box-shadow 0.15s;
}

.topbar-notify:hover {
    color: var(--text);
    box-shadow: var(--shadow-chrome), var(--glow-purple);
}

.topbar-notify-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.topbar-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(59, 130, 246, 0.35));
    border: none;
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.25), var(--shadow-chrome);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--white);
}

.sidebar-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(22, 27, 38, 0.88);
    box-shadow: var(--shadow-chrome);
    color: var(--text);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}

.main-content {
    padding: 1.65rem 1.6rem calc(1.75rem + 5.25rem);
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
}

.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.35rem 1.6rem 1.5rem;
    margin-top: 0.5rem;
    border-top: none;
    color: var(--muted);
    font-size: 0.78rem;
}

.app-footer-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-footer-ver {
    opacity: 0.85;
}

.app-footer-pro {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    color: var(--white);
}

/* ——— Page ——— */
.page-head {
    margin-bottom: 1.5rem;
}

.page-title-lg {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.muted {
    color: var(--muted);
    margin: 0;
}

.muted.small {
    font-size: 0.82rem;
}

/* ——— Dashboard metrics ——— */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.15rem;
    margin-bottom: 1.35rem;
}

.metric-card {
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius);
    padding: var(--space-card-pad) 1.25rem;
    box-shadow: var(--shadow-card);
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 100% 0%, rgba(139, 92, 246, 0.12), transparent 55%);
    pointer-events: none;
}

.metric-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.metric-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.metric-icon--purple {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    border: none;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.15);
}

.metric-icon--blue {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: none;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.14);
}

.metric-icon--green {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
    border: none;
    box-shadow: 0 2px 10px rgba(34, 197, 94, 0.12);
}

.metric-icon--amber {
    background: rgba(245, 158, 11, 0.18);
    color: #fcd34d;
    border: none;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.12);
}

.metric-trend {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 500;
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--white), #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.metric-card--purple .metric-value {
    background: linear-gradient(135deg, #e9d5ff, var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
}

.metric-card--blue .metric-value {
    background: linear-gradient(135deg, #dbeafe, var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
}

.metric-card--green .metric-value {
    background: linear-gradient(135deg, #dcfce7, var(--green));
    -webkit-background-clip: text;
    background-clip: text;
}

.metric-card--amber .metric-value {
    background: linear-gradient(135deg, #fef3c7, var(--amber));
    -webkit-background-clip: text;
    background-clip: text;
}

.metric-label {
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 0.25rem;
}

.sparkline {
    height: 36px;
    margin-top: 0.65rem;
    border-radius: 8px;
    opacity: 0.85;
}

.sparkline--purple {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.22), rgba(59, 130, 246, 0.14));
    box-shadow: inset 0 -8px 16px rgba(139, 92, 246, 0.12);
}

.sparkline--blue {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.22), rgba(139, 92, 246, 0.1));
    box-shadow: inset 0 -8px 16px rgba(59, 130, 246, 0.12);
}

.sparkline--green {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.22), rgba(59, 130, 246, 0.08));
    box-shadow: inset 0 -8px 16px rgba(34, 197, 94, 0.1);
}

.sparkline--amber {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.24), rgba(139, 92, 246, 0.1));
    box-shadow: inset 0 -8px 16px rgba(245, 158, 11, 0.1);
}

/* ——— Dashboard panels ——— */
.dash-grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
    gap: 1.15rem;
    margin-bottom: 1.35rem;
}

.dash-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
    margin-bottom: 1.35rem;
}

.panel {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius);
    padding: var(--space-card-pad) 1.25rem;
    box-shadow: var(--shadow-card);
}

.panel h3 {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.panel-title-only {
    margin: 0 0 0.85rem;
    font-size: 1rem;
}

.panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin-bottom: 0.85rem;
}

.panel-head h3 {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.panel-legend {
    font-size: 0.72rem;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-p {
    background: var(--purple);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.55);
}

.dot-b {
    background: var(--blue);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.55);
}

.chart-svg-wrap {
    width: 100%;
}

.chart-svg {
    width: 100%;
    height: auto;
    min-height: 160px;
    display: block;
}

.chart-x-labels {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0.25rem 0;
    font-size: 0.68rem;
    color: var(--muted);
    text-transform: capitalize;
}

.server-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.server-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.5rem;
    margin: 0 -0.35rem;
    border-radius: var(--radius-sm);
    border-bottom: none;
    font-size: 0.88rem;
}

.server-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.server-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.server-dot--ok {
    background: var(--green);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.55);
}

.server-dot--warn {
    background: var(--amber);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}

.server-name {
    flex: 1;
    min-width: 0;
}

.server-pct {
    color: var(--muted);
    font-size: 0.78rem;
}

.top-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.top-item {
    display: grid;
    grid-template-columns: 1fr minmax(80px, auto) auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.5rem 0.35rem;
    margin: 0 -0.2rem;
    border-radius: var(--radius-sm);
    border-bottom: none;
    font-size: 0.86rem;
}

.top-item:hover {
    background: rgba(255, 255, 255, 0.035);
}

.top-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-bar-wrap {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.top-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--purple), var(--blue));
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.35);
}

.top-count {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    font-size: 0.82rem;
}

.donut-wrap {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0.5rem auto 1rem;
}

.donut {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, var(--bg-card) 58%, transparent 59%),
        conic-gradient(
            var(--purple) 0deg 216deg,
            var(--blue) 216deg 306deg,
            var(--green) 306deg 342deg,
            var(--amber) 342deg 360deg
        );
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35), 0 8px 32px rgba(139, 92, 246, 0.15);
}

.donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.donut-center strong {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.donut-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.78rem;
    color: var(--muted);
}

.donut-legend li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.25rem 0;
}

.lg {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.lg-p {
    background: var(--purple);
}

.lg-b {
    background: var(--blue);
}

.lg-g {
    background: var(--green);
}

.lg-a {
    background: var(--amber);
}

.donut-note {
    margin: 0.75rem 0 0;
}

.panel-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 180px;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.shortcut {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.9rem;
    border-radius: var(--radius-sm);
    border: none;
    box-shadow: var(--shadow-chrome);
    text-decoration: none;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 600;
    transition: transform 0.12s, box-shadow 0.15s;
}

.shortcut:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card), var(--glow-purple);
}

.shortcut-ico {
    display: flex;
    color: inherit;
    opacity: 0.95;
}

.sc-purple {
    background: rgba(139, 92, 246, 0.14);
    color: #ddd6fe;
}

.sc-blue {
    background: rgba(59, 130, 246, 0.14);
    color: #bfdbfe;
}

.sc-green {
    background: rgba(34, 197, 94, 0.12);
    color: #bbf7d0;
}

.sc-amber {
    background: rgba(245, 158, 11, 0.12);
    color: #fde68a;
}

.dash-actions {
    margin-bottom: 0.5rem;
}

/* ——— Cards & buttons (global) ——— */
.card {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius);
    padding: var(--space-card-pad);
    box-shadow: var(--shadow-card);
}

.card h3 {
    margin: 0 0 1rem;
    font-size: 1.05rem;
}

.card-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-head-row h3 {
    margin: 0;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: transform 0.1s, box-shadow 0.15s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--purple), var(--blue));
    color: var(--white);
    box-shadow: 0 6px 22px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 8px 28px rgba(59, 130, 246, 0.45);
}

.btn-secondary {
    background: rgba(22, 27, 38, 0.92);
    color: var(--text);
    box-shadow: var(--shadow-chrome);
}

.btn-secondary:hover {
    color: #e2e8f0;
    box-shadow: var(--shadow-chrome), 0 0 20px rgba(139, 92, 246, 0.12);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    box-shadow: none;
}

.btn-ghost:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: var(--shadow-chrome);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
}

.btn-success {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    margin-right: 5px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    background: var(--green);
    color: #fff;
}

.btn-warning {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
    background: var(--amber);
    color: #0f172a;
    margin-right: 5px;
}

.btn-danger {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    background: #ef4444;
    color: #fff;
}

.badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.28rem 0.55rem;
    border-radius: 6px;
    background: rgba(139, 92, 246, 0.22);
    color: #c4b5fd;
    border: none;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.12);
}

.alert {
    padding: 0.95rem 1.05rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(248, 113, 113, 0.12);
    border: none;
    box-shadow: 0 4px 18px rgba(248, 113, 113, 0.12);
    color: #fecaca;
}

.alert-success {
    background: rgba(34, 197, 94, 0.12);
    border: none;
    box-shadow: 0 4px 18px rgba(34, 197, 94, 0.1);
    color: #bbf7d0;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.field-span {
    grid-column: 1 / -1;
}

.field span {
    font-size: 0.8rem;
    color: var(--muted);
}

.field input,
.field select,
.field textarea {
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    border: none;
    background: rgba(18, 23, 34, 0.92);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), var(--shadow-chrome);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(139, 92, 246, 0.22),
        0 4px 16px rgba(139, 92, 246, 0.12);
}

.field textarea {
    resize: vertical;
    min-height: 96px;
    font-family: inherit;
}

/* ——— Login (fullscreen bg + glassmorphism) ——— */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-color: #050811;
    background-image: url("../img/login-bg.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transform: scale(1.01);
}

@media (prefers-reduced-motion: reduce) {
    .login-bg {
        transform: none;
    }
}

.login-vignette {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 100% 90% at 50% 45%, rgba(5, 8, 17, 0.22) 0%, rgba(5, 8, 17, 0.52) 55%, rgba(5, 8, 17, 0.82) 100%),
        linear-gradient(to top, rgba(5, 8, 17, 0.48) 0%, transparent 40%);
}

.login-page {
    --login-page-pad: clamp(1rem, 4vw, 2rem);
    position: relative;
    z-index: 2;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: max(var(--login-page-pad), env(safe-area-inset-top, 0px));
    padding-right: max(var(--login-page-pad), env(safe-area-inset-right, 0px));
    padding-bottom: max(var(--login-page-pad), env(safe-area-inset-bottom, 0px));
    padding-left: max(var(--login-page-pad), env(safe-area-inset-left, 0px));
}

.login-glass {
    width: 100%;
    max-width: 420px;
    padding: clamp(1.5rem, 4vw, 2.25rem);
    border-radius: 16px;
    border: none;
    /* Sem backdrop-filter: painel mais opaco para legibilidade (WCAG / browsers antigos). */
    background: rgba(15, 23, 42, 0.86);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.5),
        0 4px 20px rgba(0, 0, 0, 0.28),
        0 0 40px rgba(139, 92, 246, 0.08);
}

@supports ((-webkit-backdrop-filter: blur(12px)) or (backdrop-filter: blur(12px))) {
    .login-glass {
        background: rgba(15, 23, 42, 0.4);
        -webkit-backdrop-filter: blur(18px) saturate(160%);
        backdrop-filter: blur(18px) saturate(160%);
    }
}

@media (prefers-reduced-transparency: reduce) {
    .login-glass {
        background: rgba(15, 23, 42, 0.94);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}

.login-brand {
    text-align: center;
    margin-bottom: 1.35rem;
}

.login-brand .sidebar-logo {
    margin: 0 auto 1rem;
}

.login-brand h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.2rem, 3vw, 1.45rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f8fafc;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.login-tagline {
    margin: 0;
    font-size: 0.85rem;
    color: #cbd5e1;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.login-alert {
    margin-bottom: 1rem;
}

.login-page .login-alert.alert-error {
    background: rgba(127, 29, 29, 0.42);
    box-shadow: 0 4px 20px rgba(127, 29, 29, 0.25);
    color: #fee2e2;
}

.login-form-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0.25rem;
}

.login-field {
    gap: 0.4rem;
}

.login-field-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #f1f5f9;
}

.login-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: none;
    background: rgba(30, 41, 59, 0.92);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), 0 2px 12px rgba(0, 0, 0, 0.2);
    color: #f8fafc;
    font-family: inherit;
    font-size: 0.95rem;
    transition: box-shadow 0.15s, background 0.15s;
}

@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
    .login-input {
        background: rgba(255, 255, 255, 0.08);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }
}

@media (prefers-reduced-transparency: reduce) {
    .login-input {
        background: rgba(30, 41, 59, 0.96);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}

.login-input::placeholder {
    color: #94a3b8;
}

.login-input:focus {
    outline: none;
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.3),
        0 0 0 3px rgba(139, 92, 246, 0.25),
        0 6px 24px rgba(59, 130, 246, 0.15);
    background: rgba(255, 255, 255, 0.11);
}

@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
    .login-input:focus {
        background: rgba(255, 255, 255, 0.12);
    }
}

@media (prefers-reduced-transparency: reduce) {
    .login-input:focus {
        background: rgba(51, 65, 85, 0.98);
    }
}

.login-submit {
    margin-top: 0.35rem;
}

.login-brand-logo {
    display: block;
    max-height: 72px;
    max-width: min(280px, 100%);
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto 1rem;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.5));
}

.login-brand-fallback {
    margin: 0 auto 1rem;
}

@media (max-width: 480px) {
    .login-glass {
        padding: 1.35rem 1.15rem;
        border-radius: 14px;
    }
}

.field.field-checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.5rem;
}

.field-checkbox input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.field-checkbox span {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.4;
}

.branding-preview-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.branding-preview-img {
    max-height: 52px;
    max-width: 200px;
    object-fit: contain;
    border-radius: 8px;
    border: none;
    padding: 0.4rem;
    background: rgba(0, 0, 0, 0.22);
    box-shadow: var(--shadow-chrome);
}

.profile-card--branding {
    grid-column: 1 / -1;
    max-width: 720px;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 0.5rem;
}

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

.data-table th,
.data-table td {
    padding: 0.82rem 0.7rem;
    text-align: left;
    border-bottom: none;
}

.data-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.025);
}

.data-table tbody tr:hover td {
    background: rgba(139, 92, 246, 0.06);
}

.data-table th {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-bottom: 0.65rem;
}

.id-cell {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.22rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.actions-cell {
    white-space: normal;
}

.actions-cell .btn-sm {
    margin-bottom: 0.35rem;
    margin-right: 0.35rem;
}

.table-wrap--resellers {
    margin-top: 0.75rem;
}

.data-table--resellers .data-table__actions {
    min-width: 280px;
    vertical-align: top;
}

.reseller-cell-name {
    font-weight: 600;
}

.reseller-cell-email {
    margin-top: 0.2rem;
}

.reseller-quota {
    font-variant-numeric: tabular-nums;
}

.reseller-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.reseller-badge--ok {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
    border: none;
    box-shadow: 0 2px 10px rgba(34, 197, 94, 0.1);
}

.reseller-badge--blocked {
    background: rgba(248, 113, 113, 0.14);
    color: #fecaca;
    border: none;
    box-shadow: 0 2px 10px rgba(248, 113, 113, 0.1);
}

.reseller-badge--expired {
    background: rgba(245, 158, 11, 0.14);
    color: #fcd34d;
    border: none;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.1);
}

.reseller-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.5rem;
}

.reseller-actions--legacy {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
}

.reseller-export-link {
    display: inline-block;
    margin-top: 0.35rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
}

.reseller-export-link:hover {
    color: var(--purple);
    text-decoration: underline;
}

.btn-reseller-excluir {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 50%, #b91c1c 100%);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.5);
    box-shadow:
        0 0 20px rgba(248, 113, 113, 0.35),
        0 4px 14px rgba(0, 0, 0, 0.35);
    font-weight: 600;
}

.btn-reseller-excluir:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow:
        0 0 26px rgba(248, 113, 113, 0.45),
        0 4px 16px rgba(0, 0, 0, 0.38);
}

.btn-reseller-excluir:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-reseller-excluir-confirm {
    box-shadow: 0 0 18px rgba(248, 113, 113, 0.3);
}

.modal-delete-reseller-card {
    box-shadow: var(--shadow-card), var(--glow-purple), 0 0 0 1px rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.resellers-toast {
    position: fixed;
    bottom: 1.35rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 120;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(22, 101, 52, 0.95), rgba(15, 23, 42, 0.96));
    border: 1px solid rgba(52, 211, 153, 0.45);
    color: #ecfdf5;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow-card), 0 0 28px rgba(52, 211, 153, 0.25);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    max-width: min(420px, calc(100% - 2rem));
    text-align: center;
}

.resellers-toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.resellers-toast.resellers-toast--error {
    background: linear-gradient(145deg, rgba(127, 29, 29, 0.96), rgba(15, 23, 42, 0.96));
    border-color: rgba(248, 113, 113, 0.55);
    color: #fecaca;
    box-shadow: var(--shadow-card), 0 0 28px rgba(248, 113, 113, 0.22);
}

.reseller-action-form {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}

.reseller-renew-select {
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    border: none;
    background: rgba(18, 23, 34, 0.92);
    box-shadow: var(--shadow-chrome);
    color: var(--text);
    max-width: 7.5rem;
}

.client-form-card--quota-full {
    opacity: 0.92;
}

.client-form-card--quota-full .btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.client-quota-blocked .client-quota-upgrade {
    color: var(--muted);
    line-height: 1.45;
}

.reveal-target {
    display: inline-block;
    margin-left: 0.35rem;
    font-family: ui-monospace, monospace;
    color: #c4b5fd;
}

/* ——— Clientes / TV Box ——— */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.client-form-card {
    margin-bottom: 1.75rem;
}

.clients-list-section {
    margin-top: 0.5rem;
}

.clients-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.25rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.clients-section-head-main {
    flex: 1 1 220px;
    min-width: 0;
}

.clients-section-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.clients-section-meta {
    margin: 0.25rem 0 0;
    line-height: 1.35;
}

.clients-per-page-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    border: none;
    background: rgba(22, 27, 38, 0.72);
    box-shadow: var(--shadow-chrome);
}

.clients-per-page-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.clients-per-page-select {
    font-size: 0.82rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    border: none;
    background: rgba(18, 23, 34, 0.95);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
    min-width: 4rem;
}

.clients-per-page-hint {
    font-size: 0.68rem;
}

.clients-toolbar-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem 1rem;
    flex: 1 1 280px;
    min-width: 0;
}

.clients-per-page-form--toolbar {
    flex: 0 0 auto;
}

.clients-search-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 200px;
    min-width: 0;
    max-width: 320px;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(22, 27, 38, 0.72);
    box-shadow: var(--shadow-chrome);
}

.clients-search-ico {
    display: flex;
    color: var(--muted);
    flex-shrink: 0;
}

.clients-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
}

.clients-search-input::placeholder {
    color: var(--muted);
}

.resellers-list-head {
    align-items: center;
    margin-bottom: 1rem;
}

.resellers-list-head h3 {
    margin: 0;
}

.resellers-toolbar-form {
    flex: 0 1 300px;
    min-width: 0;
    margin: 0;
}

@media (max-width: 640px) {
    .clients-toolbar-form {
        flex-direction: column;
        align-items: stretch;
    }

    .clients-search-field {
        max-width: none;
    }
}

.clients-count-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.38rem 0.68rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.2);
    border: none;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.12);
    color: #93c5fd;
}

.card-empty {
    text-align: center;
    padding: 2rem 1.25rem;
}

.client-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 1rem;
}

.client-cards--dense {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 0.65rem;
    align-items: stretch;
}

.client-card {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius);
    padding: 1.2rem 1.25rem 1.25rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    position: relative;
    transition: box-shadow 0.15s;
}

.client-card--compact {
    padding: 0.65rem 0.75rem 0.72rem;
    gap: 0.45rem;
    border-radius: 10px;
}

.client-card:hover {
    box-shadow: var(--shadow-card-hover);
}

.client-card--compact:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.42), 0 4px 14px rgba(0, 0, 0, 0.22),
        0 0 24px rgba(139, 92, 246, 0.1);
}

.client-card--compact .client-card-top {
    gap: 0.35rem;
}

.client-card--compact .client-status {
    font-size: 0.65rem;
    padding: 0.28rem 0.45rem;
}

.client-card--compact .client-status-select {
    font-size: 0.65rem;
    padding: 0.28rem 0.4rem;
    max-width: 132px;
}

.client-card--compact .client-name {
    font-size: 0.88rem;
    line-height: 1.2;
}

.client-card--compact .client-owner {
    font-size: 0.72rem !important;
}

.client-card--compact .client-id-row {
    padding: 0.42rem 0.52rem;
}

.client-card--compact .client-id-label {
    font-size: 0.6rem;
    margin-bottom: 0.22rem;
}

.client-card--compact .client-id-main {
    font-size: 1.02rem;
    letter-spacing: 0.03em;
}

.client-card--compact .client-pass-row {
    gap: 0.35rem 0.5rem;
}

.client-card--compact .client-pass-label {
    font-size: 0.62rem;
    width: auto;
    margin-right: 0.35rem;
}

.client-card--compact .client-pass-values {
    flex: 1 1 100px;
}

.client-card--compact .pass-mask {
    font-size: 0.82rem;
}

.client-card--compact .btn-sm {
    padding: 0.28rem 0.45rem;
    font-size: 0.72rem;
}

.client-card--compact .client-actions {
    padding-top: 0.45rem;
    margin-top: 0.15rem;
    gap: 0.35rem;
}

.client-card--compact .btn-connect {
    padding: 0.42rem 0.65rem;
    font-size: 0.8rem;
    min-width: 0;
}

.clients-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: var(--radius-sm);
    border: none;
    background: rgba(22, 27, 38, 0.62);
    box-shadow: var(--shadow-chrome);
}

.clients-pagination--bottom {
    margin-bottom: 0;
    margin-top: 0.85rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    border: none;
    background: rgba(18, 23, 34, 0.88);
    box-shadow: var(--shadow-chrome);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    font-family: inherit;
    transition: box-shadow 0.15s, color 0.15s;
}

.pagination-btn:hover:not(.is-disabled) {
    color: #e2e8f0;
    box-shadow: var(--shadow-chrome), 0 0 18px rgba(139, 92, 246, 0.12);
}

.pagination-btn.is-disabled {
    opacity: 0.38;
    pointer-events: none;
    cursor: not-allowed;
}

.pagination-status {
    font-size: 0.78rem;
    color: var(--muted);
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1 1 auto;
}

.pagination-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.45rem;
    border-radius: 8px;
    border: none;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--muted);
    font-family: inherit;
    background: transparent;
}

a.pagination-num:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-chrome);
}

.pagination-num.is-current {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(59, 130, 246, 0.14));
    color: var(--white);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.2);
}

.pagination-ellipsis {
    padding: 0 0.25rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.client-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.client-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.38rem 0.62rem;
    border-radius: 999px;
    border: none;
}

.client-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.client-status--online {
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.14);
    box-shadow: 0 2px 10px rgba(34, 197, 94, 0.12);
}

.client-status--online .client-status-dot {
    background: var(--green);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.75);
    animation: pulse-dot 1.8s ease-in-out infinite;
}

.client-status--offline {
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.12);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.client-status--offline .client-status-dot {
    background: #64748b;
}

.client-status--unknown {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.1);
}

.client-status--unknown .client-status-dot {
    background: var(--amber);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
}

@keyframes pulse-dot {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.65;
        transform: scale(1.15);
    }
}

.client-status-form {
    margin: 0;
}

.client-status-select {
    font-size: 0.72rem;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    border: none;
    background: rgba(18, 23, 34, 0.92);
    box-shadow: var(--shadow-chrome);
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
    max-width: 160px;
}

.client-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.client-owner {
    margin: 0;
}

.client-id-row {
    padding: 0.7rem 0.8rem;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.3);
    border: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35), 0 2px 12px rgba(139, 92, 246, 0.08);
}

.client-id-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.client-id-main {
    font-size: 1.35rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    color: var(--white);
    font-family: ui-monospace, "Cascadia Code", monospace;
    word-break: break-all;
}

.client-pass-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.client-pass-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    width: 100%;
}

.client-pass-values {
    flex: 1 1 140px;
    min-width: 0;
    display: flex;
    align-items: center;
    min-height: 1.6rem;
}

.pass-mask {
    font-family: ui-monospace, monospace;
    letter-spacing: 0.15em;
    color: var(--muted);
    font-size: 0.95rem;
}

.client-pass-values .reveal-target.pass-plain,
.pass-plain.reveal-target {
    margin-left: 0;
    font-size: 0.92rem;
    word-break: break-all;
}

.client-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.55rem;
    padding-top: 1rem;
    border-top: none;
}

.client-delete-form {
    display: inline;
    margin: 0;
}

.btn-connect {
    flex: 1 1 auto;
    min-width: 120px;
    justify-content: center;
    padding: 0.65rem 1rem;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 6px 22px rgba(34, 197, 94, 0.35);
    transition: transform 0.1s, box-shadow 0.15s;
}

.btn-connect:hover {
    box-shadow: 0 8px 28px rgba(34, 197, 94, 0.45);
}

.client-edit-card {
    max-width: 720px;
}

.profile-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 1.25rem;
    align-items: start;
}

.profile-card h3 {
    margin: 0 0 0.35rem;
}

.profile-card-desc {
    margin: 0 0 1rem;
    line-height: 1.45;
}

.profile-form {
    max-width: 440px;
}

@media (max-width: 1100px) {
    .dash-grid-3 {
        grid-template-columns: 1fr;
    }

    .dash-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.is-open {
        transform: translateX(0);
        box-shadow: 12px 0 48px rgba(0, 0, 0, 0.55);
    }

    .main-wrap {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .topbar-search-wrap {
        display: none;
    }

    .topbar-greet .topbar-sub {
        display: none;
    }
}

@media (max-width: 520px) {
    .metric-grid {
        grid-template-columns: 1fr;
    }

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

    .client-actions,
    .cobranca-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .client-actions .btn-warning,
    .client-actions .btn-danger {
        width: 100%;
        margin-right: 0;
        text-align: center;
    }

    .cobranca-actions .btn,
    .cobranca-actions form {
        width: 100%;
    }

    .cobranca-actions .btn {
        justify-content: center;
    }

    .btn-connect {
        width: 100%;
    }
}

/* ——— Cobrança ——— */
.nav-link--hot:not(.is-active) .nav-hot-mark {
    filter: grayscale(0.2);
}

.cobrancas-head .cobrancas-title {
    margin-bottom: 0.35rem;
}

.cobrancas-head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.cobrancas-btn-central {
    flex-shrink: 0;
    white-space: nowrap;
}

.cobrancas-sub {
    margin: 0;
}

.filtros-cobranca {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filtro-cobranca-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border);
    color: var(--muted);
    background: linear-gradient(145deg, rgba(22, 27, 38, 0.95), rgba(18, 23, 34, 0.88));
    box-shadow: var(--shadow-chrome);
    transition: color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.filtro-cobranca-btn:hover {
    color: var(--text);
    border-color: rgba(139, 92, 246, 0.45);
}

.filtro-cobranca-btn.is-active {
    color: var(--text);
    border-color: rgba(139, 92, 246, 0.65);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(59, 130, 246, 0.18));
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

.cobrancas-search-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.cobrancas-search-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 220px;
    min-width: 0;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.cobrancas-search-ico {
    display: flex;
    opacity: 0.75;
}

.cobrancas-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--text);
    font: inherit;
    outline: none;
}

.cobranca-card {
    background: linear-gradient(155deg, rgba(22, 27, 38, 0.98) 0%, rgba(18, 23, 34, 0.92) 55%, rgba(15, 19, 28, 0.95) 100%);
    border: 1px solid rgba(139, 92, 246, 0.12);
}

.cobranca-card-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.billing-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.billing-badge--past {
    background: rgba(248, 113, 113, 0.18);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.billing-badge--today {
    background: rgba(245, 158, 11, 0.2);
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.billing-badge--ok {
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.billing-badge--none {
    background: rgba(148, 163, 184, 0.15);
    color: var(--muted);
    border: 1px solid var(--border);
}

.cobranca-meta {
    margin: 0.65rem 0 1rem;
    font-size: 0.88rem;
}

.cobranca-meta-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 0.35rem 0.75rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(37, 45, 61, 0.65);
}

.cobranca-meta-row:last-child {
    border-bottom: none;
}

.cobranca-meta dt {
    margin: 0;
    color: var(--muted);
    font-weight: 500;
}

.cobranca-meta dd {
    margin: 0;
    font-weight: 600;
}

.cobranca-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.cobranca-actions--three {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(139, 92, 246, 0.18);
}

.cobranca-actions--three .cobranca-btn-cobrar,
.cobranca-actions--three .cobranca-btn-renovar,
.cobranca-actions--three .cobranca-btn-editar {
    min-width: 6.5rem;
    justify-content: center;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

/* Cobrar — principal (WhatsApp / pagamento) */
.cobranca-btn-cobrar {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 55%, #15803d 100%);
    border: 1px solid rgba(34, 197, 94, 0.65);
    color: #f0fdf4;
    box-shadow: 0 4px 18px rgba(34, 197, 94, 0.28);
}

.cobranca-btn-cobrar:hover:not(:disabled) {
    filter: brightness(1.07);
    box-shadow: 0 6px 22px rgba(34, 197, 94, 0.38);
}

.cobranca-btn-cobrar--disabled,
.cobranca-btn-cobrar:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.35);
    box-shadow: none;
}

/* Renovar */
.cobranca-btn-renovar {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.55), rgba(139, 92, 246, 0.45));
    border: 1px solid rgba(96, 165, 250, 0.45);
    color: var(--text);
}

.cobranca-btn-renovar:hover {
    filter: brightness(1.06);
    box-shadow: var(--glow-blue);
}

/* Editar */
.cobranca-btn-editar {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid var(--border);
    color: var(--muted);
}

.cobranca-btn-editar:hover {
    color: var(--text);
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(148, 163, 184, 0.16);
}

.cobranca-inline-form {
    display: inline;
}

.cobranca-cobrar-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    width: 100%;
    margin-top: 0.25rem;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(139, 92, 246, 0.2);
}

.btn-cobrar {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(139, 92, 246, 0.28));
    border: 1px solid rgba(59, 130, 246, 0.45);
    color: var(--text);
}

.btn-cobrar:hover {
    box-shadow: var(--glow-blue);
}

.btn-wa {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.35), rgba(22, 163, 74, 0.28));
    border: 1px solid rgba(34, 197, 94, 0.45);
    color: #ecfdf5;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-wa:hover {
    filter: brightness(1.08);
}

.btn-wa.is-disabled,
.btn-wa:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.4);
}

.dash-cobranca-alerts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.dash-cob-alert {
    display: inline-flex;
    align-items: baseline;
    gap: 0.45rem;
    padding: 0.65rem 1rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 0.92rem;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, rgba(22, 27, 38, 0.96), rgba(18, 23, 34, 0.9));
    box-shadow: var(--shadow-card);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.dash-cob-alert:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-card-hover);
}

.dash-cob-alert strong {
    font-size: 1.15rem;
    font-weight: 800;
}

.dash-cob-alert--past {
    border-color: rgba(248, 113, 113, 0.45);
    color: #fecaca;
}

.dash-cob-alert--today {
    border-color: rgba(245, 158, 11, 0.5);
    color: #fde68a;
}

.client-billing-section-head {
    margin-top: 0.5rem;
}

.client-billing-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.cobrancas-migrate-hint code {
    font-size: 0.85em;
}

/* ——— Central de Disparos ——— */
.central-disparos-head {
    margin-bottom: 1.25rem;
}

.central-disparos-sub {
    margin: 0.35rem 0 0;
    max-width: 52rem;
}

.central-disparos-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.central-disparos-metric {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    border: 1px solid rgba(139, 92, 246, 0.22);
    box-shadow: var(--shadow-card), 0 0 28px rgba(139, 92, 246, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.central-disparos-metric:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover), var(--glow-purple);
}

.central-disparos-metric-val {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.central-disparos-metric-lbl {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
}

.central-disparos-metric--fail {
    border-color: rgba(248, 113, 113, 0.35);
}

.central-disparos-metric--pend {
    border-color: rgba(245, 158, 11, 0.4);
}

.central-disparos-metric--ok {
    border-color: rgba(52, 211, 153, 0.35);
}

.central-disparos-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.central-disparos-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border);
    color: var(--muted);
    background: linear-gradient(145deg, rgba(22, 27, 38, 0.95), rgba(18, 23, 34, 0.88));
    box-shadow: var(--shadow-chrome);
    transition: color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.central-disparos-tab:hover {
    color: var(--text);
    border-color: rgba(139, 92, 246, 0.45);
}

.central-disparos-tab.is-active {
    color: var(--text);
    border-color: rgba(139, 92, 246, 0.65);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(59, 130, 246, 0.18));
    box-shadow: 0 0 22px rgba(139, 92, 246, 0.2);
}

.central-disparos-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
}

.central-disparos-toolbar-form {
    display: inline;
}

.central-disparos-empty {
    padding: 1.5rem;
}

.central-disparos-table-wrap {
    border: 1px solid rgba(139, 92, 246, 0.14);
    box-shadow: var(--shadow-card), 0 0 32px rgba(139, 92, 246, 0.08);
}

.central-disparos-status {
    font-weight: 600;
    white-space: nowrap;
}

/* ——— Clientes SaaS (tabela profissional) ——— */
.saas-glass-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.94) 0%, rgba(18, 23, 34, 0.9) 55%, rgba(11, 14, 20, 0.92) 100%);
    border: 1px solid rgba(139, 92, 246, 0.14);
    border-radius: var(--radius);
    padding: var(--space-card-pad);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
}

.clients-saas-head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.clients-saas-top-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-saas-glow {
    background: linear-gradient(135deg, var(--purple-dim) 0%, var(--blue-dim) 100%);
    border: none;
    box-shadow: var(--glow-purple), 0 4px 16px rgba(0, 0, 0, 0.35);
}

.btn-saas-glow:hover {
    filter: brightness(1.06);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    z-index: 60;
}

.modal-new-client {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 70;
}

.modal-new-client.is-open {
    display: flex;
}

.modal-new-client-card {
    width: min(980px, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
}

.modal-backdrop--delete {
    z-index: 80;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.modal-backdrop--delete.is-open {
    opacity: 1;
    pointer-events: auto;
}

.modal-delete-client {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 85;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.28s ease;
}

.modal-delete-client.is-open {
    opacity: 1;
    pointer-events: auto;
}

.modal-delete-client-card {
    width: min(440px, 100%);
    padding: 1.35rem 1.4rem 1.25rem;
    transform: scale(0.94) translateY(10px);
    opacity: 0;
    transition:
        transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.28s ease;
    box-shadow: var(--shadow-card), 0 0 0 1px rgba(248, 113, 113, 0.12);
}

.modal-delete-client.is-open .modal-delete-client-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-delete-client-title {
    margin: 0 0 0.65rem;
    font-size: 1.15rem;
    font-weight: 600;
}

.modal-delete-client-msg {
    margin: 0 0 0.5rem;
    line-height: 1.45;
}

.modal-delete-client-hint {
    margin: 0 0 1.15rem;
}

.modal-delete-client-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
}

.btn-delete-client {
    font-size: 0.82rem;
}

.clients-saas-section {
    margin-top: var(--space-section);
}

.clients-saas-meta {
    margin: 0 0 0.75rem;
}

.clients-saas-filters {
    margin-bottom: 1rem;
    padding: 1rem;
}

.clients-saas-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.65rem 1rem;
    align-items: end;
}

.clients-saas-filter-field span {
    display: block;
    margin-bottom: 0.25rem;
}

.clients-saas-filter-field input,
.clients-saas-filter-field select {
    width: 100%;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font: inherit;
}

.clients-saas-filters-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.saas-table-wrap {
    display: block;
    margin-bottom: 1rem;
    padding: 0;
    overflow: hidden;
    border-radius: var(--radius);
}

.saas-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.saas-clients-table {
    width: 100%;
    min-width: 1160px;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.saas-clients-table thead {
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.12), rgba(15, 23, 42, 0.3));
    border-bottom: 1px solid var(--border);
}

.saas-clients-table th,
.saas-clients-table td {
    padding: 0.65rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(37, 45, 61, 0.65);
    vertical-align: middle;
    white-space: nowrap;
}

.saas-clients-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.12), rgba(15, 23, 42, 0.96));
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.saas-clients-table tbody tr:hover {
    background: rgba(139, 92, 246, 0.06);
}

.saas-clients-table tbody tr {
    transition: background-color 0.14s ease;
}

.saas-th-actions {
    min-width: 270px;
}

.saas-cell-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.saas-cell-sub {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.remote-access-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.saas-cell-remote {
    margin-top: 0.2rem;
}

.saas-pass-mask {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.saas-actions-cluster {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    align-items: center;
}

.saas-td-actions .btn {
    min-width: 88px;
    height: 32px;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    line-height: 1;
}

/* Cobrança com mesma densidade visual da tabela de clientes */
.tabela-cobranca th:nth-child(1),
.tabela-cobranca td:nth-child(1) {
    min-width: 220px;
}

.tabela-cobranca th:nth-child(2),
.tabela-cobranca td:nth-child(2) {
    min-width: 150px;
}

.tabela-cobranca th:nth-child(3),
.tabela-cobranca td:nth-child(3),
.tabela-cobranca th:nth-child(4),
.tabela-cobranca td:nth-child(4) {
    min-width: 120px;
}

.tabela-cobranca th:nth-child(5),
.tabela-cobranca td:nth-child(5),
.tabela-cobranca th:nth-child(6),
.tabela-cobranca td:nth-child(6) {
    min-width: 130px;
}

.tabela-cobranca .saas-th-actions,
.tabela-cobranca .saas-td-actions {
    min-width: 290px;
}

.tabela-cobranca .saas-actions-cluster .btn {
    min-width: 88px;
}

.saas-inline-form {
    display: inline;
}

.saas-status-mini {
    margin-top: 0.45rem;
}

.saas-op-select {
    font-size: 0.72rem;
    padding: 0.2rem 0.35rem;
    border-radius: 6px;
    max-width: 100%;
}

.saas-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.saas-badge--past {
    background: rgba(248, 113, 113, 0.18);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.saas-badge--warn {
    background: rgba(245, 158, 11, 0.2);
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.saas-badge--ok {
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.saas-badge--none {
    background: rgba(148, 163, 184, 0.12);
    color: var(--muted);
    border: 1px solid var(--border);
}

.saas-code-sample {
    font-size: 0.78rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border);
    overflow-x: auto;
}

.tutorial-preview-video {
    width: 200px;
    max-width: 100%;
    border-radius: 8px;
    background: #000;
}

.tutorial-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
    gap: 1rem;
}

.tutorial-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.tutorial-new-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.tutorial-main-video {
    border-radius: 10px;
    background: #000;
}

@media (max-width: 959px) {
    .clients-saas-filters-grid {
        grid-template-columns: 1fr;
    }
}
