:root {
    --sidebar-width: 240px;
    --primary-color: #7b2ff2;
    --primary-hover: #8c46f5;
    --bg-dark: #0c1018;
    --card-hover: rgba(25, 33, 50, 0.96);
    --border-color: rgba(122, 136, 170, 0.16);
    --text-main: #d5dbea;
    --text-muted: #90a0bd;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #dc3545;
    --surface-soft: rgba(255, 255, 255, 0.04);
    --surface-strong: rgba(255, 255, 255, 0.08);
    --shadow-card: 0 18px 44px rgba(0, 0, 0, 0.22);
    --blur-surface: blur(18px);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    background: #0f1015;
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
}

body {
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at top left, rgba(123, 47, 242, 0.2), transparent 30%),
        radial-gradient(circle at top right, rgba(83, 252, 24, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0) 30%),
        #0f1015;
    background-attachment: fixed;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 35%),
        linear-gradient(315deg, rgba(255, 255, 255, 0.02), transparent 30%);
    pointer-events: none;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: oklch(0.155 0.013 285);
    border-right: 1px solid var(--border-color);
    box-shadow: 18px 0 40px rgba(0, 0, 0, 0.18);
    backdrop-filter: var(--blur-surface);
    -webkit-backdrop-filter: var(--blur-surface);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-logo {
    padding: 14px 18px;
    display: flex;
    justify-content: flex-start;
}

.sidebar-logo img {
    height: 32px;
    width: auto;
}

.sidebar-separator {
    display: none;
}

.sidebar-section-label {
    padding: 10px 18px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    user-select: none;
}

.sidebar-campaign-selector {
    padding: 12px 18px;
}

.campaign-card {
    background: rgba(123, 47, 242, 0.13);
    border: 1px solid rgba(123, 47, 242, 0.36);
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.campaign-card:hover {
    background: rgba(123, 47, 242, 0.22);
    border-color: var(--primary-color);
    box-shadow: 0 10px 24px rgba(123, 47, 242, 0.16);
}

.campaign-card-name {
    font-size: 0.85rem;
    color: #fff;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.campaign-card-icon {
    color: var(--primary-color);
    font-size: 1rem;
    flex-shrink: 0;
}

/* Painel lateral para edições e detalhes */
.modal {
    --ta-drawer-width: min(560px, calc(100vw - 24px));
}

.modal .modal-dialog,
.modal .modal-dialog-centered,
.modal .modal-dialog-scrollable,
.modal .modal-xl,
.modal .modal-lg {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: var(--ta-drawer-width);
    max-width: var(--ta-drawer-width);
    height: 100vh;
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: stretch;
    transform: translateX(100%);
}

.modal.fade .modal-dialog {
    transform: translateX(100%);
    transition: transform 0.24s ease-out;
}

.modal.show .modal-dialog {
    transform: translateX(0);
}

.modal .modal-content {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    background: linear-gradient(180deg, rgba(16, 17, 22, 0.99) 0%, rgba(12, 13, 18, 0.99) 100%) !important;
    border-color: rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 18px 0 0 18px;
    display: flex;
    flex-direction: column;
}

.modal .modal-header,
.modal .modal-footer {
    flex: 0 0 auto;
}

.modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(255, 255, 255, 0.025);
}

.modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.025);
}

.modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.modal-backdrop.show {
    opacity: 0.72;
}

@media (max-width: 640px) {
    .modal {
        --ta-drawer-width: 100vw;
    }

    .modal .modal-content {
        border-radius: 0;
    }
}

/* Modal de Campanhas */
.modal-content {
    background: linear-gradient(180deg, rgba(17, 23, 35, 0.98) 0%, rgba(11, 15, 24, 0.98) 100%) !important;
    border: 1px solid var(--border-color);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
    backdrop-filter: var(--blur-surface);
    -webkit-backdrop-filter: var(--blur-surface);
    overflow: hidden;
}

.modal-header {
    background: rgba(255, 255, 255, 0.035);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 2px;
}

.modal-body {
    padding: 20px 24px;
}

.campaign-modal-list {
    max-height: 450px;
    overflow-y: auto;
    padding-right: 4px;
}

.campaign-modal-controls {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(17, 23, 35, 0.98);
}

.campaign-modal-filter-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.campaign-create-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 14px;
    border: 1px solid rgba(123, 47, 242, 0.48);
    border-radius: 8px;
    background: rgba(123, 47, 242, 0.16);
    color: #fff;
    font-weight: 700;
    font-size: 0.86rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.campaign-create-button:hover {
    border-color: var(--primary-color);
    background: rgba(123, 47, 242, 0.28);
    transform: translateY(-1px);
}

.campaign-modal-filter-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.campaign-modal-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.campaign-modal-filter-pill span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.72rem;
}

.campaign-modal-filter-pill:hover,
.campaign-modal-filter-pill.is-selected {
    border-color: rgba(123, 47, 242, 0.6);
    background: rgba(123, 47, 242, 0.16);
    color: #fff;
}

.campaign-modal-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #fff;
    cursor: pointer;
}

.campaign-modal-filter input {
    accent-color: var(--primary-color);
}

.campaign-modal-count {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.campaign-modal-empty {
    padding: 18px 16px;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 10px;
}

.campaign-modal-list::-webkit-scrollbar {
    width: 6px;
}

.campaign-modal-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 3px;
}

.campaign-modal-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.campaign-modal-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.campaign-item {
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.035);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.campaign-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    transition: width 0.3s;
    opacity: 0.1;
}

.campaign-item:hover {
    background: var(--card-hover);
    border-color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: 0 14px 30px rgba(123, 47, 242, 0.18);
}

.campaign-item:hover::before {
    width: 100%;
}

.campaign-item.active {
    background: linear-gradient(135deg, rgba(123, 47, 242, 0.15) 0%, rgba(123, 47, 242, 0.05) 100%);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(123, 47, 242, 0.2);
}

.campaign-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.campaign-item-name {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.campaign-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.campaign-item-id {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    margin-bottom: 4px;
}

.campaign-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 66px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.campaign-status-badge.is-active {
    background: rgba(34, 197, 94, 0.14);
    color: #8ef0ad;
    border: 1px solid rgba(34, 197, 94, 0.28);
}

.campaign-status-badge.is-inactive {
    background: rgba(220, 53, 69, 0.12);
    color: #ff9ba5;
    border: 1px solid rgba(220, 53, 69, 0.24);
}

.campaign-status-badge.is-complete {
    background: rgba(148, 163, 184, 0.16);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.campaign-item-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.campaign-item-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.campaign-item-new {
    background: linear-gradient(135deg, rgba(123, 47, 242, 0.1) 0%, rgba(123, 47, 242, 0.05) 100%);
    border: 2px dashed var(--primary-color);
    text-align: center;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 64px;
}

.campaign-item-new i {
    font-size: 1.2rem;
}

.campaign-item-new:hover {
    background: linear-gradient(135deg, rgba(123, 47, 242, 0.2) 0%, rgba(123, 47, 242, 0.1) 100%);
    color: #fff;
    border-color: var(--primary-hover);
    transform: translateX(4px);
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-menu-item {
    padding: 12px 18px;
    color: var(--text-main);
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-radius 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    width: 100%;
    text-align: left;
}

.sidebar-menu-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    border-radius: 10px;
}

.sidebar-menu-item.active {
    background: rgba(123, 47, 242, 0.10);
    color: #fff;
    border: 1px solid rgba(123, 47, 242, 0.55);
    border-radius: 10px;
    margin: 0 10px;
    width: calc(100% - 20px);
    padding: 11px 16px;
    box-shadow: none;
}

.sidebar-menu-item.active i {
    color: var(--primary-color);
}

.sidebar-menu-item i {
    width: 20px;
    text-align: center;
    font-size: 1.05em;
}

.sidebar-menu-beta {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 0.08rem 0.38rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.1;
    text-transform: uppercase;
}

.sidebar-footer {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer:hover {
    background: rgba(255, 255, 255, 0.07);
}

.sidebar-footer-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-footer-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-footer-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

.sidebar-footer-logout {
    font-size: 0.75rem;
    color: var(--danger);
    text-decoration: none;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    overflow: visible;
    background: transparent;
    min-height: 100vh;
    padding-top: 60px;
    padding-bottom: 32px;
}

.admin-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    z-index: 990;
    min-height: 60px;
    padding: 0 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: rgba(7, 8, 13, 0.62);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
    backdrop-filter: var(--blur-surface);
    -webkit-backdrop-filter: var(--blur-surface);
}

.admin-topbar-left {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(213, 219, 234, 0.54);
    font-size: 1.12rem;
    font-weight: 600;
}

.admin-topbar-crumb,
.admin-topbar-current {
    min-width: 0;
    max-width: 36vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-topbar-current {
    color: #fff;
    font-weight: 800;
}

.admin-topbar-crumb-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.admin-topbar-crumb-link:hover,
.admin-topbar-crumb-link:focus-visible {
    color: #fff;
    text-decoration: underline;
}

.admin-topbar-separator {
    color: rgba(213, 219, 234, 0.28);
    font-size: 1.25rem;
    line-height: 1;
}

.admin-topbar-right {
    min-width: 80px;
    flex: 0 0 auto;
}

body.admin-no-sidebar .admin-topbar {
    left: 0;
}

body.admin-no-sidebar main.container-fluid {
    padding-top: 84px !important;
}

/* Modern Stat Cards */
.stat-card {
    background: rgba(255, 255, 255, 0.035);
    border-radius: 14px;
    padding: 20px;
    border: 1px solid var(--border-color);
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    backdrop-filter: var(--blur-surface);
    -webkit-backdrop-filter: var(--blur-surface);
}

.stat-card:hover {
    border-color: rgba(123, 47, 242, 0.45);
    transform: translateY(-2px);
    background: var(--card-hover);
}

.stat-card::before,
.card::before,
.dashboard-section-card::before,
.demo-section-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.stat-value {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-value .sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.stat-footer {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.stat-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-badge.success { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.stat-badge.warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

.stat-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}

.stat-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Table Integration */
.table-responsive {
    background: rgba(255, 255, 255, 0.035);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 10px;
    box-shadow: var(--shadow-card);
    backdrop-filter: var(--blur-surface);
    -webkit-backdrop-filter: var(--blur-surface);
}

.table-dark {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--border-color);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.03);
    margin-bottom: 0;
}

.table-dark thead th {
    background: rgba(255, 255, 255, 0.035);
    border-bottom: 2px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    padding: 12px 15px;
    letter-spacing: 0.5px;
}

.table-dark tbody td {
    padding: 12px 15px;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
}

.table-dark tfoot td {
    border-top: 2px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
    font-weight: 600;
    padding: 12px 15px;
}

.table-dark tbody tr:last-child td {
    border-bottom: none;
}

.container h4 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.card,
.dashboard-section-card,
.demo-section-card,
.link-card {
    position: relative;
    background: rgba(255, 255, 255, 0.035) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 14px !important;
    box-shadow: var(--shadow-card);
    backdrop-filter: var(--blur-surface);
    -webkit-backdrop-filter: var(--blur-surface);
    overflow: hidden;
}

.card:hover,
.dashboard-section-card:hover,
.demo-section-card:hover,
.link-card:hover {
    border-color: rgba(123, 47, 242, 0.35) !important;
}

.card-header,
.card-footer,
.modal-footer {
    border-color: var(--border-color) !important;
    background: rgba(255, 255, 255, 0.035) !important;
    color: #fff;
}

.card-body,
.modal-body {
    color: var(--text-main);
}

.btn {
    border-radius: 8px;
    font-weight: 650;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary,
.btn-purple {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)) !important;
    border-color: rgba(123, 47, 242, 0.7) !important;
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(123, 47, 242, 0.22);
}

.btn-primary:hover,
.btn-purple:hover {
    filter: brightness(1.08);
    box-shadow: 0 12px 28px rgba(123, 47, 242, 0.3);
}

.btn-secondary,
.btn-outline-secondary {
    background: rgba(255, 255, 255, 0.055) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
}

.btn-secondary:hover,
.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.095) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
}

.btn-outline-light {
    background: rgba(255, 255, 255, 0.045) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
}

.btn-success {
    background: rgba(34, 197, 94, 0.16) !important;
    border-color: rgba(34, 197, 94, 0.32) !important;
    color: #8ef0ad !important;
}

.btn-warning,
.btn-outline-warning {
    background: rgba(245, 158, 11, 0.15) !important;
    border-color: rgba(245, 158, 11, 0.34) !important;
    color: #ffd27a !important;
}

.btn-danger,
.btn-outline-danger {
    background: rgba(220, 53, 69, 0.14) !important;
    border-color: rgba(220, 53, 69, 0.34) !important;
    color: #ff9ba5 !important;
}

.btn-info {
    background: rgba(14, 165, 233, 0.16) !important;
    border-color: rgba(14, 165, 233, 0.34) !important;
    color: #8bd8ff !important;
}

.form-label {
    color: #fff;
    font-weight: 600;
}

.form-control,
.form-select,
.input-group-text {
    background-color: rgba(255, 255, 255, 0.055) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    border-radius: 8px;
}

.form-control::placeholder {
    color: rgba(213, 219, 234, 0.45);
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(25, 33, 50, 0.98) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
    box-shadow: 0 0 0 3px rgba(123, 47, 242, 0.18) !important;
}

.form-control:disabled,
.form-control[readonly] {
    background-color: rgba(255, 255, 255, 0.035) !important;
    color: var(--text-muted) !important;
}

.form-check-input {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-hover);
}

.dropdown-menu {
    background: rgba(17, 23, 35, 0.98);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    backdrop-filter: var(--blur-surface);
    -webkit-backdrop-filter: var(--blur-surface);
}

.dropdown-item {
    color: var(--text-main);
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
    background: rgba(123, 47, 242, 0.18);
    color: #fff;
}

.alert {
    border-radius: 10px;
    border: 1px solid transparent;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #ffd27a;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.28);
    color: #8ef0ad;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.28);
    color: #ff9ba5;
}

.badge {
    border: 1px solid transparent;
}

.bg-success {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #8ef0ad !important;
    border-color: rgba(34, 197, 94, 0.22);
}

.bg-danger {
    background: rgba(220, 53, 69, 0.15) !important;
    color: #ff9ba5 !important;
    border-color: rgba(220, 53, 69, 0.22);
}

.bg-warning {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #ffd27a !important;
    border-color: rgba(245, 158, 11, 0.22);
}

.bg-secondary {
    background: rgba(144, 160, 189, 0.13) !important;
    color: var(--text-muted) !important;
    border-color: rgba(144, 160, 189, 0.22);
}

.bg-primary {
    background: rgba(123, 47, 242, 0.16) !important;
    color: #c9b3ff !important;
    border-color: rgba(123, 47, 242, 0.28);
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-success {
    color: #8ef0ad !important;
}

.text-danger {
    color: #ff9ba5 !important;
}

/* Marquee / Streamers Online */
#online-channels-marquee-wrapper {
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
    position: relative;
    user-select: none;
    height: 40px;
    background-color: rgba(30, 32, 34, 0.98);
    padding: 5px 0;
    border-bottom: 1px solid #333;
    cursor: grab;
}

#online-channels-marquee-wrapper.dragging {
    cursor: grabbing;
}

#online-channels-marquee {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.streamer-avatar {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 50%;
}

img.streamer-avatar[src*="default-avatar.svg"] {
    background: none;
    border: 1px solid #2F3436;
    padding: 0;
    box-sizing: border-box;
}

.avatar-with-badge {
    position: relative;
    display: inline-flex;
    width: 22px;
    height: 22px;
}

.platform-badge {
    position: absolute;
    right: -6px;
    bottom: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.platform-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Utils */
.sortable-th { cursor: pointer; user-select: none; }
.sort-arrow { font-size: 0.9em; margin-left: 2px; }

/* Botões de modo (view/edit) e botões ativos */
.btn-outline-secondary.active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

/* Card Header Badge Alignment */
.card-header .badge {
    display: flex;
    align-items: center;
    min-height: 24px;
    line-height: 1.2;
    padding-top: 2px;
    padding-bottom: 2px;
}

/* Footer utility */
.footer-btn {
    color: var(--text-muted) !important;
    text-decoration: none !important;
}
.footer-btn:hover, .footer-btn:focus {
    color: #fff !important;
    text-decoration: none !important;
}

/* Utilities */
.d-none { display: none !important; }

/* Table Badges */
.table .badge {
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
}
.table .badge.bg-success { 
    background: rgba(34, 197, 94, 0.1) !important; 
    color: var(--success) !important;
    border-color: rgba(34, 197, 94, 0.2);
}
.table .badge.bg-warning { 
    background: rgba(245, 158, 11, 0.1) !important; 
    color: var(--warning) !important;
    border-color: rgba(245, 158, 11, 0.2);
}
.table .badge.bg-danger { 
    background: rgba(220, 53, 69, 0.1) !important; 
    color: var(--danger) !important;
    border-color: rgba(220, 53, 69, 0.2);
}
.table .badge.bg-secondary { 
    background: rgba(133, 135, 150, 0.1) !important; 
    color: var(--text-muted) !important;
    border-color: rgba(133, 135, 150, 0.2);
}
.table .badge.bg-primary { 
    background: rgba(123, 47, 242, 0.1) !important; 
    color: var(--primary-color) !important;
    border-color: rgba(123, 47, 242, 0.2);
}

@media (max-width: 768px) {
    :root { --sidebar-width: 72px; }
    .sidebar-menu-item span { display: none; }
    .sidebar-logo { justify-content: center; }
    .sidebar-logo img { height: 30px; }
    .sidebar-footer-info { display: none; }
    .main-content {
        padding-top: 60px;
    }
    .admin-topbar {
        min-height: 60px;
        padding: 0 16px;
    }
    .admin-topbar-left {
        gap: 8px;
        font-size: 0.9rem;
    }
    .admin-topbar-crumb,
    .admin-topbar-current {
        max-width: 32vw;
    }
    .admin-topbar-right {
        display: none;
    }
}
