/* ===========================
   CSS Variables (Design System)
   =========================== */
:root {
    --primary-color: #3fbedf;
    --secondary-color: #8bd8eb;
    --tertiary-color: #d0eff7;
    --pink-color: #cc0e56;
    --back-color: #292929;
    --bg-color: #121212;
    --bg-light-color: #212121;
    --bg-card: #1a1a1a;
    --border-color: rgba(63, 190, 223, 0.2);
    --text-muted: rgba(255, 255, 255, 0.5);
    --sidebar-width: 240px;
}

/* ===========================
   Reset & Base
   =========================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

a {
    color: white !important;
    text-decoration: none !important
}

    a:not([class]):hover {
        text-decoration: underline !important
    }

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-color);
    color: #fff;
    min-height: 100vh;
}

/* ===========================
   Scrollbar
   =========================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light-color);
}

::-webkit-scrollbar-thumb {
    background: dimgray;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: dimgray;
    }

/* ===========================
   Header
   =========================== */
.admin-header {
    background: var(--bg-light-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .header-logo img {
        height: 50px;
    }

.header-badge {
    background: linear-gradient(135deg, var(--pink-color), #ff4081);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link-admin {
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .nav-link-admin:hover,
    .nav-link-admin.active {
        color: #fff;
        background: rgba(63, 190, 223, 0.1);
    }

    .nav-link-admin.active {
        color: var(--primary-color);
    }

.empresa-context {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: rgba(63, 190, 223, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
}

    .empresa-context i {
        font-size: 11px;
    }

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    text-align: right;
}

.user-name {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

.header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    transition: border-color 0.2s;
}

    .header-avatar:hover {
        border-color: var(--primary-color);
    }

.btn-logout {
    background: rgba(204, 14, 86, 0.2);
    border: 1px solid rgba(204, 14, 86, 0.3);
    color: #ff6b9d;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .btn-logout:hover {
        background: rgba(204, 14, 86, 0.3);
        color: #fff;
    }

/* ===========================
   Main Content
   =========================== */
.main-content {
    margin-top: 56px;
    min-height: calc(100vh - 56px);
    padding: 16px;
}

body:not(.has-sidebar) .main-content {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* ===========================
   Sidebar (Empresa context)
   =========================== */
.sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-light-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-empresa {
    padding: 20px 16px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(63, 190, 223, 0.03);
}

.sidebar-empresa-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-section {
    padding: 12px 10px 4px;
}

.sidebar-section-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 8px 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 2px;
    border-left: 3px solid transparent;
}

    .sidebar-link i {
        width: 18px;
        text-align: center;
        font-size: 13px;
        transition: color 0.2s;
    }

    .sidebar-link:hover {
        text-decoration: none !important;
        background: rgba(63, 190, 223, 0.06);
        color: rgba(255, 255, 255, 0.85);
        border-left-color: rgba(63, 190, 223, 0.3);
    }

    .sidebar-link.active {
        color: var(--primary-color);
        background: rgba(63, 190, 223, 0.1);
        font-weight: 500;
        border-left-color: var(--primary-color);
    }

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 16px;
}

.sidebar-footer {
    margin-top: auto;
    padding: 12px;
    border-top: 1px solid var(--border-color);
}

.sidebar-back {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.15s;
}

    .sidebar-back:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.05);
    }

/* Layout com sidebar: main-content empurrado */
.has-sidebar .main-content {
    margin-left: var(--sidebar-width);
    padding: 20px;
}

/* ===========================
   Page Header
   =========================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

    .page-header::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 0;
        width: 80px;
        height: 2px;
        background: linear-gradient(90deg, var(--primary-color), transparent);
        border-radius: 2px;
    }

.page-title {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .page-title i {
        color: var(--primary-color);
        font-size: 20px;
        width: 38px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(63, 190, 223, 0.1);
        border-radius: 10px;
    }

/* ===========================
   Cards
   =========================== */
.card-dark {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

/* ===========================
   Buttons
   =========================== */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color), #2da8c7);
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .btn-primary-custom::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
        transition: left 0.5s ease;
    }

    .btn-primary-custom:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(63, 190, 223, 0.35);
        color: #fff;
    }

        .btn-primary-custom:hover::before {
            left: 100%;
        }

    .btn-primary-custom:active {
        transform: translateY(0);
    }

.btn-secondary-custom {
    background: transparent;
    border: 1px solid var(--border-color);
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
}

    .btn-secondary-custom:hover {
        background: rgba(63, 190, 223, 0.08);
        border-color: var(--primary-color);
        color: #fff;
    }

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 8px;
}

/* ===========================
   Forms
   =========================== */
.form-label-custom {
    display: block;
    font-size: 12px;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    text-transform: uppercase;
}

.form-control-custom {
    background: rgba(18, 18, 18, 0.6);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    transition: all 0.25s ease;
}

    .form-control-custom:focus {
        background: rgba(18, 18, 18, 0.8);
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(63, 190, 223, 0.1), 0 2px 12px rgba(63, 190, 223, 0.08);
        color: #fff;
        outline: none;
    }

    .form-control-custom::placeholder {
        color: var(--text-muted);
    }

    .form-control-custom:disabled,
    .form-control-custom[readonly] {
        opacity: 0.5;
        cursor: not-allowed;
    }

.form-control-highlight {
    border-color: rgba(63, 190, 223, 0.4);
    background: rgba(63, 190, 223, 0.05);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
}

    .form-control-highlight:focus {
        border-color: var(--primary-color);
        background: rgba(63, 190, 223, 0.08);
    }

    .form-control-highlight[readonly] {
        opacity: 0.7;
    }

.form-select-custom {
    background: rgba(18, 18, 18, 0.6) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%233fbedf' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right 12px center/12px;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 10px 35px 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: all 0.25s ease;
}

    .form-select-custom:focus {
        background-color: rgba(18, 18, 18, 0.8);
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(63, 190, 223, 0.1), 0 2px 12px rgba(63, 190, 223, 0.08);
        color: #fff;
        outline: none;
    }

    .form-select-custom option {
        background: var(--bg-light-color);
        color: #fff;
    }

/* ===========================
   Checkbox Custom
   =========================== */
.form-check-custom {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(18, 18, 18, 0.4);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .form-check-custom:hover {
        background: rgba(63, 190, 223, 0.1);
        border-color: var(--border-color);
    }

    .form-check-custom input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: var(--primary-color);
        cursor: pointer;
    }

    .form-check-custom label {
        color: rgba(255, 255, 255, 0.8);
        font-size: 13px;
        cursor: pointer;
        margin: 0;
    }

/* ===========================
   Table
   =========================== */
.table-dark-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .table-dark-custom thead th {
        background: rgba(63, 190, 223, 0.08);
        color: var(--primary-color);
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        padding: 14px 16px;
        border: none;
        white-space: nowrap;
        position: sticky;
        top: 0;
        z-index: 2;
        backdrop-filter: blur(8px);
        border-bottom: 2px solid rgba(63, 190, 223, 0.15);
    }

        .table-dark-custom thead th:first-child {
            border-radius: 12px 0 0 0;
        }

        .table-dark-custom thead th:last-child {
            border-radius: 0 12px 0 0;
        }

    .table-dark-custom tbody tr {
        transition: all 0.2s ease;
        border-left: 3px solid transparent;
    }

        .table-dark-custom tbody tr:nth-child(even) {
            background: rgba(255, 255, 255, 0.015);
        }

        .table-dark-custom tbody tr:hover {
            background: rgba(63, 190, 223, 0.06);
            border-left-color: var(--primary-color);
        }

    .table-dark-custom tbody td {
        padding: 14px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        font-size: 13px;
        color: rgba(255, 255, 255, 0.85);
        vertical-align: middle;
    }

/* ===========================
   Status Badge
   =========================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
}

.status-online {
    background: rgba(40, 167, 69, 0.15);
    border-color: rgba(40, 167, 69, 0.25);
    color: #5dd879;
}

.status-offline {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.25);
    color: #ff6b7a;
}

.status-warning {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.25);
    color: #ffc107;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 6px currentColor;
}

/* ===========================
   Empty State
   =========================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

    .empty-state i {
        font-size: 56px;
        margin-bottom: 20px;
        opacity: 0.3;
        display: block;
        background: linear-gradient(180deg, rgba(63, 190, 223, 0.4), rgba(63, 190, 223, 0.05));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .empty-state h5 {
        color: rgba(255, 255, 255, 0.5);
        margin-bottom: 8px;
        font-weight: 500;
        font-size: 15px;
    }

    .empty-state p {
        color: var(--text-muted);
        font-size: 13px;
    }

/* ===========================
   Loading
   =========================== */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===========================
   Modal Dark Theme
   =========================== */
.modal-dark .modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-dark .modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 18px 24px;
}

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

.modal-dark .modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
}

.modal-dark .btn-close {
    filter: invert(1);
    opacity: 0.5;
    transition: opacity 0.2s;
}

    .modal-dark .btn-close:hover {
        opacity: 1;
    }

/* ===========================
   CRUD Page Layout
   =========================== */
.crud-page {
    background: var(--bg-light-color);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.crud-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 14px 16px;
    background: rgba(18, 18, 18, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
}

    .crud-toolbar .search-input {
        flex: 1;
        min-width: 20rem;
    }

    .crud-toolbar .ts-wrapper {
        width: 200px;
    }

.crud-table-wrapper {
    flex: 1;
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(18, 18, 18, 0.3);
}

.nova-permissao {
    background-color: #1f292b;
    padding: 2rem;
    border-radius: 15px;
}

.crud-form-wrapper {
    padding: 4px;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-submit {
    background: linear-gradient(135deg, #28a745, #1e8e3e);
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .btn-submit::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
        transition: left 0.5s ease;
    }

    .btn-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(40, 167, 69, 0.35);
        color: #fff;
    }

        .btn-submit:hover::before {
            left: 100%;
        }

    .btn-submit:active {
        transform: translateY(0);
    }

.text-muted-sm {
    color: var(--text-muted);
    font-size: 12px;
}

.text-muted-xs {
    color: var(--text-muted);
    font-size: 11px;
}

.icon-stat {
    font-size: 11px;
    color: var(--primary-color);
}

.text-bold {
    font-weight: 500;
}

.col-actions {
    width: 60px;
}

.btn-icon {
    color: var(--primary-color);
}

.toggle-status {
    cursor: pointer;
}

.hr-dark {
    border-color: var(--border-color);
}

/* ===========================
   User Avatar
   =========================== */
.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    transition: border-color 0.2s;
}

    .user-avatar:hover {
        border-color: var(--primary-color);
    }

.user-avatar-placeholder {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(63, 190, 223, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
}

.user-info-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-admin {
    background: rgba(204, 14, 86, 0.2);
    color: #ff6b9d;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ===========================
   Permissoes Grid
   =========================== */
.perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
    max-height: 350px;
    overflow-y: auto;
    padding: 4px;
}

.perm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(18, 18, 18, 0.4);
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

    .perm-item:hover {
        background: rgba(63, 190, 223, 0.08);
        border-color: var(--border-color);
    }

    .perm-item.selected {
        background: rgba(63, 190, 223, 0.12);
        border-color: var(--primary-color);
        color: #fff;
    }

    .perm-item input[type="checkbox"] {
        accent-color: var(--primary-color);
        width: 16px;
        height: 16px;
        cursor: pointer;
    }

    .perm-item label {
        cursor: pointer;
        margin: 0;
        flex: 1;
    }

.badge-count {
    background: rgba(63, 190, 223, 0.15);
    color: var(--primary-color);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* ===========================
   Section Cards (Empresa Home)
   =========================== */
.home-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.section-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px 20px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

    .section-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 3px;
        height: 0;
        background: var(--primary-color);
        border-radius: 0 3px 3px 0;
        transition: height 0.3s ease;
    }

    .section-card:hover {
        border-color: var(--primary-color);
        transform: translateY(-3px);
        box-shadow: 0 12px 32px rgba(63, 190, 223, 0.15);
        color: #fff;
        text-decoration: none !important
    }

        .section-card:hover::before {
            height: 100%;
        }

.section-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.section-card:hover .section-card-icon {
    transform: scale(1.1);
}

.section-card-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.section-card-info p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 4px 0 0;
}

.section-card-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 2px;
}

.icon-players {
    background: rgba(63, 190, 223, 0.15);
    color: var(--primary-color);
}

.icon-playlists {
    background: rgba(139, 216, 235, 0.15);
    color: var(--secondary-color);
}

.icon-midias {
    background: rgba(204, 14, 86, 0.15);
    color: #ff6b9d;
}

.icon-unidades {
    background: rgba(40, 167, 69, 0.15);
    color: #5dd879;
}

.icon-grupos {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.icon-tags {
    background: rgba(111, 66, 193, 0.15);
    color: #a78bfa;
}

.icon-usuarios {
    background: rgba(253, 126, 20, 0.15);
    color: #fd7e14;
}

.icon-perfis {
    background: rgba(220, 53, 69, 0.15);
    color: #ff6b7a;
}

/* ===========================
   Form Switch Accents
   =========================== */
.switch-primary {
    accent-color: var(--primary-color);
}

.switch-pink {
    accent-color: var(--pink-color);
}

/* ===========================
   SweetAlert2 Dark Theme
   =========================== */
.swal2-popup {
    background: var(--bg-card) !important;
    color: #fff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    font-family: 'Poppins', sans-serif !important;
}

.swal2-title {
    color: #fff !important;
    font-size: 18px !important;
}

.swal2-html-container {
    color: var(--text-muted) !important;
    font-size: 14px !important;
}

.swal2-confirm {
    background: var(--primary-color) !important;
    border-radius: 6px !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 500 !important;
}

.swal2-cancel {
    background: transparent !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    font-family: 'Poppins', sans-serif !important;
}

.swal2-deny {
    background: var(--pink-color) !important;
    border-radius: 6px !important;
    font-family: 'Poppins', sans-serif !important;
}

.swal2-select {
    background: var(--bg-light-color) !important;
    color: #fff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 13px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%233fbedf' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px !important;
}

    .swal2-select:focus {
        border-color: var(--primary-color) !important;
        box-shadow: 0 0 0 3px rgba(63, 190, 223, 0.1) !important;
        outline: none !important;
    }

    .swal2-select option {
        background: var(--bg-light-color);
        color: #fff;
    }

/* ── Utility Classes ─────────────────────────────────── */
.col-thumb {
    width: 60px;
}

.col-check {
    width: 40px;
}

.thumbnail-sm {
    width: 50px;
    height: 35px;
    object-fit: cover;
    border-radius: 4px;
}

.badge-sm {
    font-size: 10px;
}

.text-detail-sm {
    font-size: 11px;
}

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

.upload-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cursor-pointer {
    cursor: pointer;
}

.d-hidden {
    display: none;
}

.filter-select {
    max-width: 160px;
}

.filter-date {
    max-width: 180px;
}

.text-danger-custom {
    color: #ff6b7a;
}

.text-success-custom {
    color: #5dd879;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 0 4px;
}

.hr-border {
    border-color: var(--border-color);
}

.ocorrencias-scroll {
    max-height: 300px;
    overflow-y: auto;
}

/* ===========================
   Playlist
   =========================== */
.playlist-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 4px 10px;
    background: rgba(63, 190, 223, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

    .playlist-stat i {
        color: var(--primary-color);
        font-size: 11px;
    }

/* Index - Thumbnails Row */
.playlist-thumbs-row {
    display: flex;
    gap: 2px;
}

.playlist-thumb-mini {
    width: 36px;
    height: 26px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid var(--border-color);
}

/* Gerenciar - Card Grid */
.playlist-midias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.playlist-midia-card {
    background: var(--bg-light-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.15s;
}

    .playlist-midia-card:hover {
        border-color: var(--primary-color);
    }

.playlist-midia-drag-handle {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.15s;
}

.playlist-midia-card:hover .playlist-midia-drag-handle {
    opacity: 1;
}

.playlist-midia-drag-handle:active {
    cursor: grabbing;
}

.sortable-ghost {
    opacity: 0.3;
}

.sortable-chosen {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 12px rgba(63, 190, 223, 0.3);
}

.playlist-midia-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}

.playlist-midia-video,
.playlist-midia-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.playlist-midia-video {
    cursor: pointer;
}

.playlist-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    transition: background 0.15s;
}

    .playlist-play-btn:hover {
        background: rgba(0, 0, 0, 0.6);
    }

.playlist-midia-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background: rgba(251, 113, 133, 0.85);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
}

.playlist-midia-card:hover .playlist-midia-remove {
    opacity: 1;
}

.playlist-midia-order-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.playlist-midia-ordem-badge {
    background: rgba(63, 190, 223, 0.15);
    color: var(--primary-color);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
}

.btn-order {
    width: 22px;
    height: 22px;
    background: rgba(63, 190, 223, 0.15);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--primary-color);
    font-size: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
}

.btn-order:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.playlist-midia-flags {
    position: absolute;
    bottom: 6px;
    left: 6px;
    display: flex;
    gap: 4px;
}

.playlist-midia-flag {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
}

.flag-inativa {
    background: rgba(220, 53, 69, 0.8);
    color: #fff;
}

.flag-vencida {
    background: rgba(255, 193, 7, 0.85);
    color: #000;
}

.flag-oculta {
    background: rgba(108, 117, 125, 0.85);
    color: #fff;
}

.playlist-midia-info {
    padding: 8px 10px;
}

.playlist-midia-name {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-midia-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

    .playlist-midia-meta i {
        font-size: 10px;
    }

.playlist-midia-refresh {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

    .playlist-midia-refresh label {
        font-size: 10px;
        color: var(--text-muted);
        white-space: nowrap;
        margin: 0;
    }

        .playlist-midia-refresh label i {
            font-size: 9px;
            color: var(--primary-color);
        }

.playlist-refresh-input {
    width: 70px;
    padding: 2px 6px;
    font-size: 11px;
    text-align: center;
}

.playlist-midia-oculta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

    .playlist-midia-oculta label {
        font-size: 10px;
        color: var(--text-muted);
        white-space: nowrap;
        margin: 0;
    }

        .playlist-midia-oculta label i {
            font-size: 9px;
            color: var(--text-muted);
        }

    .playlist-midia-oculta .form-check {
        min-height: auto;
        margin: 0;
        padding: 0;
    }

    .playlist-midia-oculta .form-check-input {
        margin: 0;
    }

/* ===========================
   Modal Dark Custom
   =========================== */
.modal-dark-custom {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: #fff;
}

    .modal-dark-custom .modal-header {
        border-bottom-color: var(--border-color);
    }

    .modal-dark-custom .modal-footer {
        border-top-color: var(--border-color);
    }

.modal-separator {
    border-color: var(--border-color);
    opacity: 0.5;
    margin: 8px 0;
}

/* ===========================
   Modal - Midia Item Check
   =========================== */
.midia-item-check {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

    .midia-item-check:hover {
        border-color: var(--primary-color);
        background: rgba(63, 190, 223, 0.05);
    }

    .midia-item-check.selected {
        border-color: var(--primary-color);
        background: rgba(63, 190, 223, 0.1);
    }

    .midia-item-check.ja-na-playlist {
        opacity: 0.55;
        cursor: default;
        border-color: rgba(255, 255, 255, 0.08);
    }

    .midia-item-check img {
        width: 60px;
        height: 45px;
        object-fit: cover;
        border-radius: 4px;
    }

.midia-item-info {
    flex: 1;
    min-width: 0;
}

    .midia-item-info .name {
        font-weight: 600;
        font-size: 13px;
    }

    .midia-item-info .detail {
        font-size: 11px;
        color: var(--text-muted);
    }

.midia-ja-add {
    color: #5dd879;
    font-weight: 600;
    font-size: 11px;
}

/* ===========================
   Modal - Player Item Check
   =========================== */
.player-item-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

    .player-item-check:hover {
        border-color: var(--primary-color);
    }

    .player-item-check.selected {
        border-color: var(--primary-color);
        background: rgba(63, 190, 223, 0.1);
    }

.player-group-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    margin: 12px 0 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
}

/* ===========================
   Danger Buttons
   =========================== */
.btn-danger-sm {
    background: rgba(251, 113, 133, 0.15);
    border: 1px solid transparent;
    color: #fb7185;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.15s;
}

    .btn-danger-sm:hover {
        background: rgba(251, 113, 133, 0.3);
        border-color: #fb7185;
    }

.btn-danger-custom {
    background: rgba(251, 113, 133, 0.15);
    border: 1px solid #fb7185;
    color: #fb7185;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
}

    .btn-danger-custom:hover {
        background: rgba(251, 113, 133, 0.3);
    }

/* ===========================
   Status Badge - Info
   =========================== */
.status-badge.status-info {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.25);
    color: #60a5fa;
}

/* ===========================
   Mídias Grid (Index)
   =========================== */
.midias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.midia-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: block;
}

    .midia-card:hover {
        border-color: var(--primary-color);
        transform: translateY(-3px);
        box-shadow: 0 8px 28px rgba(63, 190, 223, 0.15);
    }

        .midia-card:hover .midia-card-thumb img {
            transform: scale(1.05);
        }

.midia-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}

    .midia-card-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.4s ease;
    }

.midia-card-body {
    padding: 10px 12px 12px;
}

.midia-card-title {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.midia-card-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

    .midia-card-meta i {
        font-size: 10px;
        margin-right: 3px;
    }

/* ===========================
   Players
   =========================== */
.player-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-online {
    background: #5dd879;
    box-shadow: 0 0 6px rgba(93, 216, 121, 0.5);
}

.dot-offline {
    background: #ff6b7a;
}

.dot-warning {
    background: #ffc107;
    box-shadow: 0 0 6px rgba(255, 193, 7, 0.4);
}

.dot-none {
    background: rgba(255, 255, 255, 0.2);
}

.player-badge {
    font-size: 12px;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 500;
    white-space: nowrap;
}

.player-badge-grupo {
    background: rgba(63, 190, 223, 0.15);
    color: var(--primary-color);
}

.player-badge-unidade {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
}

.btn-action-player {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.2s ease;
}

    .btn-action-player:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
        background: rgba(63, 190, 223, 0.1);
        text-decoration: none !important;
        transform: translateY(-1px);
    }

    .btn-action-player.btn-action-danger:hover {
        border-color: #fb7185;
        color: #fb7185;
        background: rgba(251, 113, 133, 0.12);
        text-decoration: none !important;
    }

/* Player Index - Última Mídia */
.player-midia-thumb {
    width: 42px;
    height: 30px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.text-truncate-cell {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Player Gerenciar */
.player-badge-subgrupo {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.player-playlists-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 500px;
    overflow-y: auto;
}

.player-playlist-accordion {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.15s;
}

    .player-playlist-accordion:hover {
        border-color: rgba(63, 190, 223, 0.4);
    }

.player-playlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(18, 18, 18, 0.4);
    cursor: pointer;
    transition: background 0.15s;
}

    .player-playlist-header:hover {
        background: rgba(63, 190, 223, 0.05);
    }

.playlist-chevron {
    font-size: 11px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.player-playlist-header:not(.collapsed) .playlist-chevron {
    transform: rotate(180deg);
}

.player-playlist-midias {
    padding: 6px 12px 10px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.player-playlist-midia-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    transition: background 0.15s;
}

    .player-playlist-midia-item:hover {
        background: rgba(255, 255, 255, 0.06);
    }

    .player-playlist-midia-item .player-midia-thumb {
        width: 48px;
        height: 34px;
    }

.player-midia-thumb-placeholder {
    width: 48px;
    height: 34px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    flex-shrink: 0;
}

.player-playlist-midia-item .playlist-midia-flag {
    position: static;
    flex-shrink: 0;
}

/* ===========================
   Mídia Tipo URL
   =========================== */
.midia-url-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 20px;
    background: rgba(96, 165, 250, 0.08);
    border: 2px dashed rgba(96, 165, 250, 0.3);
    border-radius: 12px;
    color: #60a5fa;
}

    .midia-url-placeholder i {
        font-size: 36px;
        opacity: 0.7;
    }

    .midia-url-placeholder span {
        font-size: 14px;
        font-weight: 600;
    }

    .midia-url-placeholder p {
        font-size: 12px;
        color: var(--text-muted);
        margin: 0;
        text-align: center;
    }

.midia-url-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: rgba(96, 165, 250, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    font-size: 28px;
}

.playlist-midia-url-placeholder {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    background: rgba(96, 165, 250, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #60a5fa;
}

    .playlist-midia-url-placeholder i {
        font-size: 22px;
    }

    .playlist-midia-url-placeholder span {
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

.midia-item-url-icon {
    width: 60px;
    height: 45px;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    font-size: 18px;
    flex-shrink: 0;
}

/* ===========================
   Usuário - Alerta Exclusão
   =========================== */
.alert-exclusao-conta {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #ff6b7a;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .alert-exclusao-conta i {
        font-size: 14px;
    }

/* ===========================
   Usuário - Unidade Tags
   =========================== */
.unidade-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.unidade-tag-remove {
    background: none;
    border: none;
    color: #fb7185;
    cursor: pointer;
    padding: 0;
    font-size: 11px;
    line-height: 1;
    transition: color 0.15s;
}

    .unidade-tag-remove:hover {
        color: #ff6b7a;
    }

/* ===========================
   Usuário - Thumb Preview
   =========================== */
.usuario-thumb-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* ===========================
   Dashboard Cards
   =========================== */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.dash-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dash-right {
    min-height: 0;
}

.dash-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

    .dash-card-title i {
        color: var(--primary-color);
        font-size: 14px;
    }

.dash-card-link {
    margin-left: auto;
    font-size: 12px;
    font-weight: 500;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s;
}

    .dash-card-link:hover {
        opacity: 0.8;
    }

.dash-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.dash-stat-item {
    flex: 1;
    min-width: 60px;
    text-align: center;
}

.dash-stat-icon {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}

.dash-icon-online {
    color: #5dd879;
}

.dash-icon-offline {
    color: #ff6b7a;
}

.dash-icon-warning {
    color: #ffc107;
}

.dash-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.dash-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.dash-map {
    width: 100%;
    flex: 1;
    min-height: 200px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-color);
}

/* ===========================
   Report Cards
   =========================== */
.report-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

    .report-card:hover {
        border-color: rgba(63, 190, 223, 0.4);
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    }

.report-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(63, 190, 223, 0.12);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 12px;
}

.report-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
}

.report-card-desc {
    font-size: 12px;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: 14px;
}

.report-card .btn-primary-custom {
    align-self: flex-start;
}

.icon-relatorios {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}

/* ===========================
   Sidebar Toggle (hamburger)
   =========================== */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

    .sidebar-toggle:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.08);
    }

.sidebar-overlay {
    display: none;
}

/* ===========================
   Responsive - Tablet (<=992px)
   =========================== */
@media (max-width: 992px) {
    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Sidebar becomes off-canvas */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1100;
    }

    .sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1050;
        display: none;
    }

    .sidebar-open .sidebar-overlay {
        display: block;
    }

    /* Main content takes full width */
    .has-sidebar .main-content {
        margin-left: 0;
    }

    /* Header: hide user role text, compress */
    .user-info {
        display: none;
    }

    .header-nav {
        gap: 4px;
    }

    .empresa-context {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-link-admin .link-text {
        display: none;
    }

    .btn-logout .logout-text {
        display: none;
    }

    /* Tables scroll horizontally */
    .crud-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-dark-custom {
        min-width: 600px;
    }

    /* Toolbar stacks */
    .crud-toolbar .search-input {
        min-width: 100%;
    }

    /* Home grid: 2 columns */
    .home-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    /* Dashboard cards stack */
    .dash-grid {
        grid-template-columns: 1fr;
    }

    .dash-map {
        min-height: 220px;
    }
}

/* ===========================
   Responsive - Mobile (<=576px)
   =========================== */
@media (max-width: 576px) {
    /* Header minimal */
    .admin-header {
        padding: 0 12px;
        gap: 6px;
    }

    .header-logo img {
        height: 36px;
    }

    .header-badge {
        font-size: 8px;
        padding: 2px 6px;
    }

    .header-nav {
        gap: 2px;
    }

    .nav-link-admin {
        padding: 4px 8px;
        font-size: 11px;
    }

        .nav-link-admin span,
        .nav-link-admin .link-text {
            display: none;
        }

    .empresa-context {
        display: none;
    }

    .btn-logout {
        padding: 4px 8px;
        font-size: 10px;
    }

        .btn-logout span,
        .btn-logout .logout-text {
            display: none;
        }

    /* Main content */
    .main-content {
        padding: 12px 8px;
    }

    .has-sidebar .main-content {
        padding: 12px 8px;
    }

    /* Page header */
    .page-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .page-title {
        font-size: 18px;
        gap: 8px;
    }

        .page-title i {
            width: 32px;
            height: 32px;
            font-size: 16px;
        }

    /* CRUD page */
    .crud-page {
        padding: 14px 12px;
        border-radius: 12px;
    }

    .crud-toolbar {
        padding: 10px 12px;
        flex-direction: column;
    }

        .crud-toolbar .search-input {
            min-width: 100%;
        }

    /* Tables */
    .table-dark-custom thead th {
        padding: 10px 12px;
        font-size: 10px;
    }

    .table-dark-custom tbody td {
        padding: 10px 12px;
        font-size: 12px;
    }

    /* Home grid: 1 column */
    .home-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .section-card {
        padding: 16px 14px;
    }

    .section-card-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
        border-radius: 10px;
    }

    .section-card-info h3 {
        font-size: 14px;
    }

    .section-card-info p {
        font-size: 11px;
    }

    /* Dashboard */
    .dash-stat-value {
        font-size: 18px;
    }

    .dash-stat-label {
        font-size: 10px;
    }

    .dash-map {
        min-height: 180px;
    }

    .dash-grid {
        gap: 10px;
    }

    /* Cards */
    .card-dark {
        padding: 14px;
        border-radius: 10px;
    }

    /* Buttons */
    .btn-primary-custom,
    .btn-secondary-custom {
        padding: 8px 14px;
        font-size: 12px;
    }

    /* Modals */
    .modal-dark .modal-body {
        padding: 16px;
    }

    .modal-dark .modal-header {
        padding: 14px 16px;
    }

    /* Forms */
    .form-actions {
        flex-direction: column;
    }

        .form-actions > * {
            width: 100%;
            text-align: center;
            justify-content: center;
        }

    /* Playlists grid */
    .playlist-midias-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
    }

    /* Midias grid */
    .midias-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }

    /* Pagination */
    .pagination-wrapper {
        flex-wrap: wrap;
    }

    /* Reports */
    .report-card {
        padding: 14px;
    }

    .report-card-title {
        font-size: 13px;
    }

    .report-card-desc {
        font-size: 11px;
    }

    /* Permissions grid */
    .perm-grid {
        grid-template-columns: 1fr;
    }

    /* Player badges */
    .player-badge {
        font-size: 11px;
        padding: 1px 6px;
    }

    /* Filter selects */
    .filter-select {
        max-width: 100%;
    }

    .filter-date {
        max-width: 100%;
    }
}

/* ===========================
   DateTime Input (native picker)
   =========================== */
.form-control-custom[type="datetime-local"],
.form-control-custom[type="date"],
.form-control-custom[type="time"] {
    color-scheme: dark;
}

    .form-control-custom[type="datetime-local"]::-webkit-calendar-picker-indicator,
    .form-control-custom[type="date"]::-webkit-calendar-picker-indicator,
    .form-control-custom[type="time"]::-webkit-calendar-picker-indicator {
        filter: invert(0.7) sepia(1) saturate(3) hue-rotate(150deg);
        cursor: pointer;
        opacity: 0.7;
        transition: opacity 0.2s;
    }

        .form-control-custom[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
        .form-control-custom[type="date"]::-webkit-calendar-picker-indicator:hover,
        .form-control-custom[type="time"]::-webkit-calendar-picker-indicator:hover {
            opacity: 1;
        }

/* ===========================
   Privacy Policy Page
   =========================== */
.privacy-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    position: relative;
    z-index: 1;
}

.privacy-logo {
    text-align: center;
    margin-bottom: 30px;
}

    .privacy-logo img {
        filter: drop-shadow(0 0 20px rgba(63, 190, 223, 0.3));
    }

.privacy-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
}

.privacy-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #fff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.privacy-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(63, 190, 223, 0.1);
}

.privacy-section {
    margin-bottom: 28px;
}

    .privacy-section h2 {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--primary-color);
        margin-bottom: 12px;
    }

    .privacy-section p {
        color: rgba(255, 255, 255, 0.8);
        font-size: 0.9rem;
        line-height: 1.7;
        margin-bottom: 10px;
    }

    .privacy-section code {
        background: rgba(63, 190, 223, 0.12);
        color: var(--primary-color);
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 0.85rem;
    }

    .privacy-section ul {
        list-style: none;
        padding-left: 0;
        margin-bottom: 10px;
    }

        .privacy-section ul li {
            color: rgba(255, 255, 255, 0.8);
            font-size: 0.9rem;
            line-height: 1.7;
            padding: 4px 0 4px 20px;
            position: relative;
        }

            .privacy-section ul li::before {
                content: '';
                position: absolute;
                left: 0;
                top: 13px;
                width: 6px;
                height: 6px;
                border-radius: 50%;
                background: var(--primary-color);
            }

.privacy-contact {
    margin-top: 12px;
}

    .privacy-contact li {
        padding: 6px 0 6px 0 !important;
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .privacy-contact li::before {
            display: none !important;
        }

        .privacy-contact li i {
            color: var(--primary-color);
            width: 18px;
            text-align: center;
            font-size: 14px;
        }

        .privacy-contact li a {
            color: var(--primary-color) !important;
            transition: opacity 0.2s;
        }

            .privacy-contact li a:hover {
                opacity: 0.8;
            }

@media (max-width: 576px) {
    .privacy-box {
        padding: 24px 18px;
        border-radius: 14px;
    }

    .privacy-title {
        font-size: 1.4rem;
    }

    .privacy-section h2 {
        font-size: 1rem;
    }
}

/* ===========================
   Tom Select - Dark Theme
   =========================== */
.ts-wrapper {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

.ts-wrapper.single .ts-control {
    background: rgba(18, 18, 18, 0.6) !important;
    border: 1px solid var(--border-color) !important;
    color: #fff;
    padding: 10px 35px 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s ease;
    min-height: auto;
    box-shadow: none !important;
}

.ts-wrapper.single .ts-control::after {
    border-color: var(--primary-color) transparent transparent;
}

.ts-wrapper.single.focus .ts-control {
    background: rgba(18, 18, 18, 0.8) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(63, 190, 223, 0.1), 0 2px 12px rgba(63, 190, 223, 0.08) !important;
}

.ts-wrapper .ts-control > input {
    color: #fff;
}

.ts-wrapper .ts-control > input::placeholder {
    color: var(--text-muted);
}

.ts-dropdown {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    margin-top: 4px;
    color: #fff;
}

.ts-dropdown .option {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    padding: 8px 14px;
    transition: background 0.15s;
}

.ts-dropdown .option:hover,
.ts-dropdown .active {
    background: rgba(63, 190, 223, 0.12);
    color: #fff;
}

.ts-dropdown .option.selected {
    background: rgba(63, 190, 223, 0.2);
    color: var(--primary-color);
}

.ts-dropdown .ts-dropdown-content {
    max-height: 250px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.ts-wrapper.single .ts-control .item {
    color: #fff;
}

.ts-wrapper .ts-control > .item {
    color: #fff;
}

.ts-dropdown .no-results {
    color: var(--text-muted);
    padding: 10px 14px;
    font-size: 12px;
    text-align: center;
}

.ts-wrapper .clear-button {
    color: var(--text-muted);
    font-size: 16px;
}

    .ts-wrapper .clear-button:hover {
        color: #fff;
    }
