/* Mobilizza Premium Design System — Global Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Colors */
    --color-bg: #0d0f14;
    --color-surface: #161922;
    --color-surface-2: #1e2330;
    --color-border: #2a3045;
    --color-accent: #25d366;
    --color-accent-2: #128c7e;
    --color-accent-glow: rgba(37,211,102,0.18);
    --color-danger: #ef4444;
    --color-danger-bg: rgba(239, 68, 68, 0.12);
    --color-warn: #f59e0b;
    --color-warn-bg: rgba(245, 158, 11, 0.12);
    --color-success-bg: rgba(37, 211, 102, 0.12);
    --color-accent-hover-bg: rgba(37, 211, 102, 0.08);
    --color-text: #e8eaf0;
    --color-muted: #6b7280;
    --color-white: #ffffff;
    
    /* Spacing & Sizes */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-pill: 9999px;

    /* Shadows & Effects */
    --shadow-card: 0 8px 30px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 20px var(--color-accent-glow);
    --transition-global: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Typography Scale (Compact) */
    --fs-section: 0.68rem;     /* Section labels */
    --fs-xs: 0.75rem; 
    --fs-sm: 0.81rem;
    --fs-base: 0.93rem;
    --fs-lg: 1.1rem;
    --fs-xl: 1.35rem;
    --fs-2xl: 2rem;            /* Stat values */

    /* Typography Weights */
    --fw-light: 300;
    --fw-normal: 500;          /* Body usage */
    --fw-semibold: 600;        /* Label usage */
    --fw-bold: 700;            /* Heading usage */
    --fw-black: 800;           /* Title/Stat usage */

    /* 📝 Animations */
    --slideIn: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    --fadeInScale: fadeInScale 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
    --pulseSuccess: pulseSuccess 2s ease-in-out infinite;
}

/* Global Setup */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: var(--fs-base);
    font-weight: var(--fw-normal); /* 500 - Body */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

html,
body,
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(37, 211, 102, 0.28) rgba(255, 255, 255, 0.04);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(37, 211, 102, 0.42), rgba(18, 140, 126, 0.5));
    border: 2px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(37, 211, 102, 0.58), rgba(18, 140, 126, 0.64));
    background-clip: padding-box;
}

h1, h2, h3 { color: var(--color-white); font-weight: var(--fw-black); } /* 800 - Titles */
h4, h5, h6 { color: var(--color-white); font-weight: var(--fw-bold); }  /* 700 - Titles */

/* 🏛️ Layout Structure */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    display: flex; flex-direction: column;
    z-index: 100;
    transition: width var(--transition-global);
    position: relative;
}

/* ⚡ Collapsed State */
.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-label {
    display: none;
}

.sidebar.collapsed .sidebar-header,
.sidebar.collapsed .sidebar-nav,
.sidebar.collapsed .sidebar-footer {
    align-items: center;
}

.sidebar.collapsed .logo {
    justify-content: center;
    gap: 0;
}

.sidebar.collapsed .nav-item {
    padding: 0.75rem;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto;
}

/* 🗯️ Tooltips for Collapsed Sidebar */
.sidebar.collapsed .nav-item {
    position: relative;
}

.sidebar.collapsed .nav-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    margin-left: 1rem;
    padding: 0.5rem 0.8rem;
    background: var(--color-surface-2);
    color: var(--color-white);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-global);
    z-index: 1000;
    box-shadow: var(--shadow-card);
}

.sidebar.collapsed .nav-item:hover::after {
    opacity: 1;
    transform: translateX(5px);
}

.sidebar-header { padding: 1.5rem; border-bottom: 1px solid var(--color-border); display: flex; flex-direction: column; }
.sidebar-nav { flex: 1; padding: 1rem; display: flex; flex-direction: column; gap: 0.25rem; }

.nav-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1rem; border-radius: var(--radius-md);
    color: var(--color-muted); font-weight: var(--fw-normal); font-size: var(--fs-sm);
    transition: var(--transition-global);
    cursor: pointer;
}

/* 🔍 Stat Cards */
.stat-label { font-size: var(--fs-section); color: var(--color-muted); text-transform: uppercase; font-weight: var(--fw-semibold); margin-bottom: 0.5rem; letter-spacing: 0.05em; }
.stat-value { font-size: var(--fs-2xl); font-weight: var(--fw-black); color: var(--color-white); letter-spacing: -0.02em; }

/* 🏷️ Labels */
.auth-label { font-weight: var(--fw-semibold); } /* 600 - Labels */

/* 🚀 Premium Background (for Auth Pages) */
.premium-bg {
    position: fixed; inset: 0; background: var(--color-bg); z-index: -1; overflow: hidden;
}
.premium-bg::before {
    content: ''; position: absolute; inset: 0;
    background-image: 
        linear-gradient(var(--color-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
    background-size: 48px 48px; opacity: 0.1;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 100%);
}
.premium-bg::after {
    content: ''; position: absolute; top: -30%; left: 50%; transform: translateX(-50%);
    width: 1000px; height: 1000px;
    background: radial-gradient(circle, color-mix(in srgb, var(--color-accent) 5%, transparent) 0%, transparent 70%);
}

/* 🔗 Links */
a { text-decoration: none; color: inherit; }

/* 🎯 Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    box-shadow: var(--shadow-glow);
    flex-shrink: 0;
}

.logo-icon .lucide { width: 20px; height: 20px; }

.logo-text {
    font-size: var(--fs-lg);
    font-weight: var(--fw-black);
    color: var(--color-white);
}

/* 🧭 Nav Items */
.nav-item:hover {
    color: var(--color-white);
    background: var(--color-surface-2);
}

.nav-item.active {
    color: var(--color-accent);
    background: var(--color-accent-glow);
}

.nav-item .lucide {
    flex-shrink: 0;
}

.nav-divider {
    height: 1px;
    background: var(--color-border);
    margin: 0.75rem 0;
}

/* 🦶 Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sidebar-presence {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(37, 211, 102, 0.14);
    background: linear-gradient(180deg, rgba(30, 35, 48, 0.96), rgba(22, 25, 34, 0.98));
    border-radius: var(--radius-md);
    padding: 0.9rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 30px rgba(0, 0, 0, 0.22);
}

.sidebar-presence__glow {
    position: absolute;
    inset: auto -20% -45% auto;
    width: 90px;
    height: 90px;
    background: radial-gradient(circle, rgba(37, 211, 102, 0.16), rgba(37, 211, 102, 0));
    pointer-events: none;
}

.sidebar-presence__identity {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-presence__avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-sm);
    font-weight: var(--fw-black);
    color: var(--color-white);
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.22), rgba(18, 140, 126, 0.28));
    border: 1px solid rgba(37, 211, 102, 0.2);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
    flex-shrink: 0;
    transition: transform var(--transition-global), box-shadow var(--transition-global), border-color var(--transition-global);
}

.sidebar-presence__meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.sidebar-presence__label {
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.sidebar-presence__title {
    font-size: var(--fs-sm);
    color: var(--color-white);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-presence__user {
    font-size: var(--fs-xs);
    color: var(--color-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-presence__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.45rem;
}

.sidebar-presence:hover .sidebar-presence__avatar {
    transform: translateY(-1px) scale(1.04);
    border-color: rgba(37, 211, 102, 0.32);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset, 0 10px 26px rgba(37, 211, 102, 0.12);
}

.sidebar-presence:hover .sidebar-presence__glow {
    opacity: 1;
    transform: scale(1.08);
}

.sidebar-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 24px;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    color: var(--color-text);
    font-size: 0.68rem;
    letter-spacing: 0.02em;
}

.sidebar-chip__dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 10px currentColor;
}

.sidebar-chip--online {
    color: var(--color-accent);
    background: rgba(37, 211, 102, 0.08);
    border-color: rgba(37, 211, 102, 0.16);
}

.sidebar-chip--offline {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.14);
}

.sidebar-chip--plan {
    color: var(--color-white);
    background: linear-gradient(180deg, rgba(37, 211, 102, 0.08), rgba(18, 140, 126, 0.08));
    border-color: rgba(37, 211, 102, 0.14);
}

.sidebar-footer .nav-item.logout:hover {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
}

.sidebar.collapsed .sidebar-presence {
    padding: 0.65rem;
}

.sidebar.collapsed .sidebar-presence__meta {
    display: none;
}

.sidebar.collapsed .sidebar-presence__identity {
    justify-content: center;
}

/* 📐 Main Content */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(42, 48, 69, 0.9);
    background: linear-gradient(180deg, rgba(22, 25, 34, 0.96), rgba(22, 25, 34, 0.84));
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.page-title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-black);
    color: var(--color-white);
    margin: 0;
    letter-spacing: -0.03em;
}

.top-bar-menu {
    flex-shrink: 0;
}

.top-bar-context {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.top-bar-context__eyebrow {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-muted);
}

.top-bar-context__main {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
}

.top-bar-context__subtitle {
    font-size: var(--fs-sm);
    color: var(--color-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-bar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.top-bar-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 36px;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.035);
    color: var(--color-text);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.02em;
}

.top-bar-pill .lucide {
    width: 14px;
    height: 14px;
}

.top-bar-pill__dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 10px currentColor;
}

.top-bar-pill--online {
    color: var(--color-accent);
    border-color: rgba(37, 211, 102, 0.16);
    background: rgba(37, 211, 102, 0.08);
}

.top-bar-pill--offline {
    color: var(--color-danger);
    border-color: rgba(239, 68, 68, 0.14);
    background: rgba(239, 68, 68, 0.08);
}

.top-bar-pill--plan {
    color: var(--color-white);
    border-color: rgba(37, 211, 102, 0.14);
    background: linear-gradient(180deg, rgba(37, 211, 102, 0.08), rgba(18, 140, 126, 0.08));
}

.top-bar-pill--landing {
    color: var(--color-muted);
    border-color: var(--color-border);
    text-decoration: none;
    transition: color var(--transition-global), border-color var(--transition-global);
    gap: 0.35rem;
}

.top-bar-pill--landing:hover {
    color: var(--color-accent);
    border-color: rgba(37, 211, 102, 0.35);
}

.top-bar-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 42px;
    padding: 0.45rem 0.55rem 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, rgba(30, 35, 48, 0.92), rgba(22, 25, 34, 0.92));
    transition: var(--transition-global);
}

.top-bar-shortcut:hover {
    border-color: rgba(37, 211, 102, 0.18);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.top-bar-shortcut__meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top-bar-shortcut__meta strong {
    font-size: var(--fs-xs);
    color: var(--color-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.top-bar-shortcut__label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
}

.top-bar-shortcut__action {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(37, 211, 102, 0.08);
    color: var(--color-accent);
    flex-shrink: 0;
}

.icon-btn {
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-muted);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-global);
}

.icon-btn:hover {
    color: var(--color-white);
    background: var(--color-surface-2);
    border-color: var(--color-accent);
}

.content-area {
    flex: 1;
    padding: 2rem;
}

/* 🃏 Cards */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: var(--transition-global);
}

.card:hover {
    border-color: rgba(37, 211, 102, 0.2);
    box-shadow: var(--shadow-card);
}

/* 📊 Stat Grid */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    opacity: 0;
    transform: translateX(-100%);
    transition: all 0.4s ease;
}

.stat-card:hover::before {
    opacity: 1;
    transform: translateX(100%);
}

.stat-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

/* 🏷️ Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.02em;
}

.badge-success {
    background: var(--color-accent-glow);
    color: var(--color-accent);
    border: 1px solid rgba(37, 211, 102, 0.25);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-warn {
    background: rgba(245, 158, 11, 0.12);
    color: var(--color-warn);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

/* 🔘 Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-global);
    line-height: 1;
}

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

.btn-primary {
    background: var(--color-accent);
    color: var(--color-bg);
    border-color: var(--color-accent);
}

.btn-primary:hover:not(:disabled) {
    background: #1fb855;
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--color-surface-2);
    color: var(--color-muted);
    border-color: var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
    color: var(--color-white);
    border-color: var(--color-accent);
}

/* 📱 Responsive */
@media (max-width: 1024px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        transition: left var(--transition-global);
        z-index: 200;
    }

    .sidebar.show {
        left: 0;
    }

    .sidebar.collapsed {
        width: 260px;
    }

    .sidebar.collapsed .logo-text,
    .sidebar.collapsed .nav-label,
    .sidebar.collapsed .sidebar-presence__meta {
        display: initial;
    }

    .sidebar.collapsed .sidebar-header,
    .sidebar.collapsed .sidebar-nav,
    .sidebar.collapsed .sidebar-footer,
    .sidebar.collapsed .sidebar-presence__identity {
        align-items: stretch;
    }

    .sidebar.collapsed .logo {
        justify-content: flex-start;
        gap: 0.75rem;
    }

    .sidebar.collapsed .nav-item {
        padding: 0.75rem 1rem;
        justify-content: flex-start;
        width: auto;
        height: auto;
        margin: 0;
    }

    .sidebar.collapsed .nav-item::after {
        display: none;
    }

    .content-area {
        padding: 1.25rem;
    }

    .top-bar {
        padding: 0.9rem 1.25rem;
        align-items: flex-start;
        flex-direction: column;
    }

    .top-bar-left,
    .top-bar-right {
        width: 100%;
    }

    .top-bar-context__main {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .top-bar-context__subtitle {
        white-space: normal;
    }

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

@media (max-width: 480px) {
    .top-bar {
        padding: 0.75rem 1rem;
    }

    .content-area {
        padding: 1rem;
    }

    .top-bar-shortcut {
        width: 100%;
        justify-content: space-between;
    }
}

/* Utilities */
.lucide { width: 18px; height: 18px; stroke-width: 2px; }
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-muted); }

/* ── Modal (Global) ── */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
    backdrop-filter: blur(3px);
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal {
    background: var(--color-surface); padding: 2.25rem; border-radius: var(--radius-lg);
    width: 90%; max-width: 400px; position: relative; box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    transform: translateY(20px) scale(0.95); transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.show .modal { transform: translateY(0) scale(1); }
.modal-close {
    position: absolute; top: 1.25rem; right: 1.25rem; background: none; border: none; cursor: pointer; color: var(--color-muted);
    padding: 0.25rem; border-radius: 4px; transition: var(--transition-global);
}
.modal-close:hover { background: var(--color-surface-2); color: var(--color-text); }

/* ── Devices Tab ── */
.instance-add-form { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.5rem; }
.devices-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-top: 1.5rem; }
.device-card { background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; transition: var(--transition-global); }
.device-card:hover { border-color: var(--color-accent); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.device-card-header { display: flex; justify-content: space-between; align-items: flex-start; }
.device-name { margin:0; font-size: var(--fs-base); font-weight: 700; color: var(--color-white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-actions { display: flex; gap: 0.75rem; }
.device-actions .btn { flex: 1; min-height: 40px; }
.device-actions .btn-danger { flex: 0 0 40px; color: var(--color-danger); background: rgba(239,68,68,0.1); border-color: transparent; }
.device-actions .btn-danger:hover { background: var(--color-danger); color: white; }

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulseSuccess {
    0%, 100% { box-shadow: 0 0 0 0 var(--color-accent-glow); }
    50% { box-shadow: 0 0 0 8px rgba(37, 211, 102, 0); }
}

/* ── Dashboard Enhancements ── */

.stat-card-stagger {
    opacity: 0;
    animation: fadeInScale 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) var(--stagger-delay, 0s) both;
}

.stat-card--connected {
    position: relative;
}

.stat-card--connected::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: var(--color-accent);
    border-radius: 999px;
    box-shadow: 0 0 12px var(--color-accent), 0 0 24px var(--color-accent-glow);
    animation: glowPulse 2.5s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.4; width: 60%; }
    50% { opacity: 1; width: 80%; }
}

.wa-status {
    font-size: var(--fs-lg) !important;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wa-status--connected {
    color: var(--color-accent);
}

.wa-status--disconnected {
    color: var(--color-danger);
}

.wa-pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-accent);
    animation: pulseDot 2s ease-in-out infinite;
}

.wa-dot-danger {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--color-danger);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-danger);
}

@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 0 var(--color-accent-glow); transform: scale(1); }
    50% { box-shadow: 0 0 0 6px rgba(37, 211, 102, 0); transform: scale(1.15); }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-top: 0;
}

.dashboard-chart-card {
    min-height: 320px;
}

.dashboard-period-group {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    padding: 0.25rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.chart-period-btn {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    color: var(--color-muted);
    min-height: 34px;
    padding: 0.45rem 0.8rem;
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: var(--transition-global);
}

.chart-period-btn:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.05);
}

.chart-period-btn.is-active {
    color: var(--color-text);
    border-color: rgba(37, 211, 102, 0.2);
    background: linear-gradient(180deg, rgba(37, 211, 102, 0.16), rgba(18, 140, 126, 0.12));
    box-shadow: inset 0 0 0 1px rgba(37, 211, 102, 0.14), 0 6px 16px rgba(0, 0, 0, 0.18);
}

.chart-container {
    position: relative;
    height: 220px;
    width: 100%;
}

.growth-rankings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.growth-ranking-col {
    display: flex;
    flex-direction: column;
}

.growth-ranking-title {
    font-size: var(--fs-sm);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.growth-ranking-title--gain {
    color: var(--color-accent);
}

.growth-ranking-title--loss {
    color: var(--color-danger);
}

.growth-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.growth-ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: var(--color-surface-2);
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: var(--transition-global);
}

.growth-ranking-item:hover {
    border-color: var(--color-border);
    transform: translateX(4px);
}

.growth-ranking-name {
    font-size: var(--fs-xs);
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.sparkline-canvas {
    flex-shrink: 0;
}

.growth-ranking-empty {
    font-size: var(--fs-xs);
    color: var(--color-muted);
    padding: 0.5rem 0;
}

.empty-chart-state {
    text-align: center;
    padding: 3rem 0;
}

.info-box {
    background: var(--color-bg);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    font-family: monospace;
    font-size: var(--fs-xs);
    color: var(--color-accent);
    overflow-x: auto;
}

/* ── Dashboard Responsive ── */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .growth-rankings {
        grid-template-columns: 1fr;
    }
    .dashboard-period-group {
        justify-content: flex-start;
    }
}

/* ── Reports Page ── */
.reports-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.report-section {
    margin-bottom: 2.5rem;
}

.report-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.report-section__title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    color: var(--color-white);
    margin: 0;
    letter-spacing: -0.02em;
}

.report-section__subtitle {
    font-size: var(--fs-xs);
    color: var(--color-muted);
    margin: 0;
}

.report-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.report-card-icon .lucide {
    width: 20px;
    height: 20px;
}

.report-card-icon--accent {
    background: var(--color-success-bg);
    color: var(--color-accent);
}

.report-card-icon--muted {
    background: rgba(107, 114, 128, 0.12);
    color: var(--color-muted);
}

.report-card-icon--warn {
    background: var(--color-warn-bg);
    color: var(--color-warn);
}

.territorial-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.territorial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.territorial-list__item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.territorial-list__label {
    font-size: var(--fs-xs);
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.territorial-list__value {
    font-size: var(--fs-xs);
    color: var(--color-accent);
    font-weight: var(--fw-semibold);
    flex-shrink: 0;
}

.chart-card {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.card-title {
    font-size: var(--fs-sm);
    margin: 0 0 1rem;
    color: var(--color-white);
    font-weight: var(--fw-bold);
}

.empty-hint {
    font-size: var(--fs-xs);
    color: var(--color-muted);
    margin: 0;
}

.empty-hint--spaced {
    margin-top: 1rem;
}

.loader-lg {
    width: 32px;
    height: 32px;
    margin: 0 auto;
}

.field-input {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: inherit;
    font-size: var(--fs-xs);
    padding: 0.5rem 0.75rem;
    outline: none;
    transition: var(--transition-global);
}

.field-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.radar-action-icon {
    width: 14px;
    height: 14px;
}

.territory-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-label {
    font-size: 12px;
    font-weight: var(--fw-semibold);
    color: var(--color-text);
}

.labels-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.radar-action-full {
    width: 100%;
    justify-content: center;
}

.radar-empty-state,
.radar-loading-state {
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.label-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 12px;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.label-chip__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.radar-label-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radar-label-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.radar-label-remove {
    background: none;
    border: none;
    color: var(--color-muted);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0.125rem;
    border-radius: 4px;
    transition: var(--transition-global);
}

.radar-label-remove:hover {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.12);
}

.participants-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1rem;
    align-items: start;
}

.participants-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.participant-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    border-radius: var(--radius-md);
    padding: 0.75rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
}

.participant-row:hover {
    border-color: rgba(37, 211, 102, 0.2);
    transform: translateY(-1px);
}

.participant-row.selected {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.25);
}

.participant-main {
    min-width: 0;
    flex: 1;
}

.participant-title {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
    margin-bottom: 0.2rem;
}

.participant-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.participant-name-editable {
    cursor: pointer;
    position: relative;
    padding-right: 18px;
}

.participant-name-editable:hover {
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
}

.participant-name-editable .edit-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: var(--color-muted);
}

.participant-row:hover .participant-name-editable .edit-icon {
    opacity: 1;
}

.participant-name-input {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-surface-tertiary);
    border: 1px solid var(--color-accent);
    border-radius: 4px;
    padding: 1px 6px;
    width: 100%;
    min-width: 120px;
    outline: none;
}

.participant-name-input:focus {
    border-color: var(--color-accent-hover);
    box-shadow: 0 0 0 2px rgba(0, 168, 132, 0.2);
}

.participant-subtitle {
    font-size: 11px;
    color: var(--color-muted);
}

.participant-badge {
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    font-size: 10px;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.participant-badge.is-admin {
    color: var(--color-warning);
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.2);
}

.participant-badge.is-leader {
    color: var(--color-accent);
    background: var(--color-accent-glow);
    border-color: rgba(37, 211, 102, 0.24);
}

.participant-action-btn {
    background: none;
    border: none;
    color: var(--color-accent);
    cursor: pointer;
    font-size: 11px;
    font-weight: var(--fw-semibold);
    white-space: nowrap;
    padding: 0;
}

.participant-action-btn.is-danger {
    color: var(--color-danger);
}

.participant-readonly {
    font-size: 11px;
    color: var(--color-muted);
    white-space: nowrap;
}

.contact-profile-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    position: sticky;
    top: 0;
}

.contact-profile-empty {
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.5;
}

.contact-profile-header h4 {
    margin: 0;
    font-size: 15px;
    color: var(--color-text);
}

.contact-profile-subtitle {
    margin-top: 0.25rem;
    font-size: 12px;
    color: var(--color-muted);
}

.contact-profile-stats {
    margin: 1rem 0;
}

.info-value-sm {
    font-size: 12px;
    line-height: 1.4;
    word-break: break-word;
}

.contact-profile-form {
    margin-bottom: 1rem;
}

.contact-notes {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    font: inherit;
}

.contact-section-title {
    margin-bottom: 0.75rem;
}

.radar-modal {
    max-width: 420px;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
}

.radar-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.radar-modal-title {
    margin: 0;
    font-size: 14px;
    font-weight: var(--fw-semibold);
    letter-spacing: -0.3px;
    color: var(--color-text);
}

.radar-modal-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 320px;
    overflow-y: auto;
}

.radar-modal-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
    transition: var(--transition-global);
}

.radar-modal-option:hover {
    border-color: rgba(37, 211, 102, 0.24);
    background: rgba(37, 211, 102, 0.06);
}

.radar-modal-option-meta {
    font-size: 11px;
    color: var(--color-muted);
}

.radar-modal-option-label {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

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

.radar-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 13px;
    z-index: 99999;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.radar-toast.is-success {
    background: var(--color-accent);
    color: var(--color-bg);
}

.radar-toast.is-error {
    background: var(--color-danger);
}

.group-details-participant-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.group-details-participant-admin-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

.group-details-participants-layout {
    margin-top: 0.5rem;
}

.group-details-contact-profile-panel {
    min-width: 0;
}

.group-details-location-search {
    display: flex;
    gap: 0.75rem;
}

.group-location-suggestions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.group-location-suggestion {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.75rem;
    text-align: left;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--color-text);
    cursor: pointer;
    transition: var(--transition-global);
}

.group-location-suggestion:hover {
    border-color: rgba(37, 211, 102, 0.24);
    background: rgba(37, 211, 102, 0.06);
}

.group-location-suggestion__title {
    font-size: 12px;
    font-weight: var(--fw-semibold);
}

.group-location-suggestion__meta {
    font-size: 11px;
    color: var(--color-muted);
}

.lucide-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ── Reports Responsive ── */
@media (max-width: 1024px) {
    .territorial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .chart-container {
        height: 180px;
    }
    .territorial-mini-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .territorial-grid {
        grid-template-columns: 1fr;
    }
    .reports-container {
        padding: 1.25rem;
    }
    .participants-layout {
        grid-template-columns: 1fr;
    }
    .group-details-location-search {
        flex-direction: column;
    }
}

/* ── Settings / Admin shared modal ── */
.settings-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 10, 18, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 1200;
}
.settings-modal-overlay.is-open { display: flex; }
.settings-modal-card {
    width: min(100%, 520px);
    background: var(--color-surface-1, #111827);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg, 16px);
    box-shadow: 0 24px 80px rgba(0,0,0,0.45);
}
.settings-modal-header,
.settings-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
}
.settings-modal-header { border-bottom: 1px solid var(--color-border); }
.settings-modal-footer { border-top: 1px solid var(--color-border); justify-content: flex-end; }
.settings-modal-body { padding: 1.25rem; }
.settings-modal-title { margin: 0 0 0.25rem; font-size: var(--fs-base); font-weight: 700; }
.settings-modal-desc { margin: 0; font-size: var(--fs-sm); color: var(--color-muted); }

/* ── Settings / Admin form fields ── */
.settings-fields { display: flex; flex-direction: column; gap: 1rem; }
.settings-field  { display: flex; flex-direction: column; gap: 0.4rem; }
.field-hint { font-size: var(--fs-xs); color: var(--color-muted); margin-top: 0.2rem; }

/* ── Settings / Admin alerts (HTMX feedback) ── */
.settings-alert {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1rem; border-radius: var(--radius-md);
    font-size: var(--fs-sm); font-weight: 500;
}
.settings-alert--success { background: rgba(37,211,102,0.12); color: var(--color-accent); }
.settings-alert--danger  { background: rgba(239,68,68,0.12);  color: #ef4444; }

@media (max-width: 640px) {
    .settings-modal-footer { flex-direction: column-reverse; align-items: stretch; }
}

/* ── Settings section components (shared with admin pages) ── */
.settings-section-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--color-border);
}
.settings-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: var(--radius-md);
    background: rgba(37,211,102,0.12);
    color: var(--color-accent);
    display: flex; align-items: center; justify-content: center;
}
.settings-icon i { width: 20px; height: 20px; }
.settings-icon--amber  { background: rgba(251,191,36,0.12);  color: #fbbf24; }
.settings-icon--blue   { background: rgba(96,165,250,0.12);  color: #60a5fa; }
.settings-icon--green  { background: rgba(37,211,102,0.12);  color: var(--color-accent); }
.settings-icon--purple { background: rgba(139,92,246,0.12);  color: #8b5cf6; }
.settings-section-title { font-size: var(--fs-base); font-weight: 700; margin: 0 0 0.2rem; }
.settings-section-desc  { font-size: var(--fs-sm); color: var(--color-muted); margin: 0; }
.settings-body { padding: 1.25rem 1.5rem 1.5rem; }

/* ── Toggle switch ── */
.toggle-switch       { position: relative; display: inline-flex; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-track {
    width: 42px; height: 24px;
    background: var(--color-border);
    border-radius: 999px;
    transition: background .2s;
    position: relative;
}
.toggle-track::after {
    content: ''; position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    background: #fff; border-radius: 50%;
    transition: transform .2s;
}
.toggle-switch input:checked + .toggle-track { background: var(--color-accent); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(18px); }

/* ── Admin shared table ── */
.users-table-wrap { overflow-x: auto; }
.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}
.users-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}
.users-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(43,52,68,0.5);
    vertical-align: middle;
}
.users-table tbody tr:last-child td { border-bottom: none; }
.users-table tbody tr:hover { background: var(--color-surface-2); }

/* ── Status dot (shared) ── */
.status-dot {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: var(--fs-sm);
}
.status-dot::before {
    content: ''; width: 6px; height: 6px;
    border-radius: 50%; display: inline-block;
}
.status-active::before   { background: var(--color-accent); }
.status-inactive::before { background: var(--color-danger, #ef4444); }

/* ── Role badge ── */
.user-role-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: var(--fs-xs);
    font-weight: 600;
    background: var(--color-surface-2);
    color: var(--color-muted);
    border: 1px solid var(--color-border);
}
.user-role-badge--platform_admin { background: rgba(139,92,246,0.15); color: #a78bfa; border-color: rgba(139,92,246,0.3); }
.user-role-badge--admin          { background: rgba(96,165,250,0.12); color: #60a5fa; border-color: rgba(96,165,250,0.3); }
.user-role-badge--member         { background: rgba(37,211,102,0.10); color: var(--color-accent); border-color: rgba(37,211,102,0.25); }
.user-role-badge--viewer         { background: var(--color-surface-2); color: var(--color-muted); border-color: var(--color-border); }

/* ── Workspace table specifics ── */
.workspace-icon-sm {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-muted); flex-shrink: 0;
}
.workspace-name { font-weight: 600; font-size: var(--fs-sm); }
.workspace-slug { font-size: var(--fs-xs); color: var(--color-muted); }

/* ── Plan badge small ── */
.plan-badge-sm {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: var(--fs-xs);
    font-weight: 600;
    background: rgba(37,211,102,0.1);
    color: var(--color-accent);
    border: 1px solid rgba(37,211,102,0.25);
}

/* ── Trial badge ── */
.trial-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    background: rgba(251,191,36,0.12);
    color: #fbbf24;
    border: 1px solid rgba(251,191,36,0.3);
    vertical-align: middle;
}

/* ── User name/email in tables ── */
.user-name  { font-weight: 600; font-size: var(--fs-sm); color: var(--color-text); }
.user-email { font-size: var(--fs-xs); color: var(--color-muted); margin-top: 0.1rem; }

/* ── Plan badge color variants ── */
.plan-badge--free       { background: rgba(148,163,184,0.15); color: #94a3b8; }
.plan-badge--basic      { background: rgba(37,211,102,0.15);  color: #25d366; }
.plan-badge--pro        { background: rgba(99,102,241,0.15);  color: #818cf8; }
.plan-badge--enterprise { background: rgba(245,158,11,0.15);  color: #fbbf24; }

/* ── Coverage List (Dados Eleitorais) ── */
.coverage-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.coverage-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: var(--transition-global);
}
.coverage-list-item:hover {
    border-color: rgba(37, 211, 102, 0.2);
    transform: translateY(-1px);
}
.coverage-list-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.coverage-list-uf {
    font-weight: var(--fw-bold);
    font-size: var(--fs-base);
    color: var(--color-white);
    min-width: 32px;
}
.coverage-list-status {
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
}
.coverage-list-action {
    flex-shrink: 0;
}
