/* Liggy Dashboard Styles */

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

/**
 * Liggy Dashboard Styles
 * Baseado na identidade visual oficial: docs/identidade_visual.md
 * Cor principal Liggy: hsl(228, 92%, 21%) = #041566
 */

:root,
:root[data-theme="light"],
html[data-theme="light"] {
    /* ============================================================================
       PRIMARY: Azul Liggy Oficial
       Referência: docs/identidade_visual.md
       ============================================================================ */

    /* Primary: Liggy Blue (Light Mode) */
    --primary-50: hsl(228, 92%, 95%);      /* #EDF1FE */
    --primary-100: hsl(228, 92%, 90%);     /* #DBE3FD */
    --primary-200: hsl(228, 92%, 80%);     /* #B7C7FB */
    --primary-300: hsl(228, 92%, 65%);     /* #7D9BF8 */
    --primary-500: hsl(228, 92%, 50%);     /* #436FF5 - Interações */
    --primary-600: hsl(228, 92%, 35%);     /* #0934E1 - Links */
    --primary-700: hsl(228, 92%, 28%);     /* #051D7F - Hover */
    --primary-800: hsl(228, 92%, 21%);     /* #041566 - COR PRINCIPAL */
    --primary-900: hsl(228, 92%, 15%);     /* #020F47 - Textos */

    /* Semantic Primary Colors */
    --color-primary: var(--primary-800);
    --color-primary-hover: var(--primary-700);
    --color-primary-active: var(--primary-900);
    --color-primary-fg: #ffffff;

    /* Secondary: Warm Coral */
    --secondary-50: #fff5f0;
    --secondary-500: #ff8c61;
    --secondary-600: #ff7951;
    --secondary-700: #f86540;

    /* Neutral */
    --gray-50: #fafbfc;
    --gray-100: #f5f6f8;
    --gray-200: #e9ebee;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Status colors */
    --success-50: #f0fdf4;
    --success-500: #22c55e;
    --success-700: #15803d;

    --danger-50: #fef2f2;
    --danger-500: #ef4444;
    --danger-700: #b91c1c;

    --warning-50: #fffbeb;
    --warning-500: #f59e0b;
    --warning-700: #b45309;

    /* Semantic */
    --bg-base: #ffffff;
    --bg-surface: var(--gray-50);
    --bg-elevated: #ffffff;

    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-tertiary: var(--gray-500);

    --border-light: var(--gray-200);
    --border-medium: var(--gray-300);

    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-sans:
        "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
}

/* ============================================================================
   DARK THEME
   Baseado na identidade visual oficial: docs/identidade_visual.md
   ============================================================================ */

:root[data-theme="dark"],
html[data-theme="dark"] {
    /* Primary: Azul Liggy (Dark Mode) */
    --primary-50: hsl(228, 50%, 15%);      /* #131B3D - Backgrounds escuros */
    --primary-100: hsl(228, 50%, 20%);     /* #1A2451 - Hover escuro */
    --primary-200: hsl(228, 50%, 25%);     /* #212D66 - Borders */
    --primary-300: hsl(228, 92%, 65%);     /* #7D9BF8 */
    --primary-500: hsl(228, 92%, 50%);     /* #436FF5 - COR PRINCIPAL DARK */
    --primary-600: hsl(228, 92%, 60%);     /* #6989F7 - Links */
    --primary-700: hsl(228, 92%, 70%);     /* #8FA3F9 - Hover */
    --primary-800: hsl(228, 92%, 80%);     /* #B7C7FB - Textos em fundos escuros */
    --primary-900: hsl(228, 92%, 85%);     /* #C7D5FC */

    /* Semantic Primary Colors (Dark) */
    --color-primary: var(--primary-500);
    --color-primary-hover: var(--primary-600);
    --color-primary-active: var(--primary-700);
    --color-primary-fg: #0a0a0a;

    /* Secondary: Warm Coral (Dark) */
    --secondary-50: #3d2519;
    --secondary-500: #ff8c61;
    --secondary-600: #ff9f78;
    --secondary-700: #ffb38f;

    /* Neutral (Dark) */
    --gray-50: #2a2f37;
    --gray-100: #3a3f47;
    --gray-200: #4a4f57;
    --gray-300: #5a5f67;
    --gray-400: #9ca3af;
    --gray-500: #b0b0b0;
    --gray-600: #c0c0c0;
    --gray-700: #d0d0d0;
    --gray-800: #e0e0e0;
    --gray-900: #f0f0f0;

    /* Status colors (Dark) */
    --success-50: #1e4620;
    --success-500: #4ade80;
    --success-700: #22c55e;

    --danger-50: #5c1f1f;
    --danger-500: #f87171;
    --danger-700: #ef4444;

    --warning-50: #5c4a1f;
    --warning-500: #fbbf24;
    --warning-700: #f59e0b;

    /* Semantic (Dark) */
    --bg-base: #1a1d23;
    --bg-surface: var(--gray-50);
    --bg-elevated: #22252b;

    --text-primary: #e8e8e8;
    --text-secondary: var(--gray-600);
    --text-tertiary: var(--gray-500);

    --border-light: var(--gray-200);
    --border-medium: var(--gray-300);

    /* Shadows (Dark) - mais suaves */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

html,
body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 50%, #dfe8f0 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.main-content {
    padding: var(--space-8);
    padding-top: calc(var(--space-6) + 72px); /* 72px = altura aproximada do header */
    margin-left: 0;
    transition: margin-left 0.3s ease, width 0.3s ease;
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    box-sizing: border-box;
}

.main-content.has-sidebar {
    margin-left: 260px;
    width: calc(100vw - 260px);
}

.main-content.sidebar-collapsed {
    margin-left: 70px !important;
    width: calc(100vw - 70px) !important;
}

@media (max-width: 768px) {
    .main-content {
        padding: var(--space-6);
        padding-top: calc(var(--space-6) + 72px);
        width: 100% !important;
        max-width: 100vw;
    }

    .main-content.has-sidebar {
        margin-left: 0;
        width: 100% !important;
    }

    .main-content.sidebar-collapsed {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-4) var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    transition: left 0.3s ease;
}

.header.sidebar-collapsed {
    left: 70px;
}

@media (max-width: 768px) {
    .header {
        left: 0;
    }

    .header.sidebar-collapsed {
        left: 0;
    }
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

/* User Menu Dropdown */
.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.user-menu-trigger:hover {
    background: var(--gray-50);
    border-color: var(--border-medium);
}

.user-menu-trigger.active {
    background: var(--gray-100);
    border-color: var(--border-medium);
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    flex-shrink: 0;
}

.user-avatar i {
    font-size: 1.25rem;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-trigger i.ph-caret-down {
    font-size: 0.875rem;
    transition: transform 0.2s ease;
}

.user-menu-trigger.active i.ph-caret-down {
    transform: rotate(180deg);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    min-width: 240px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    overflow: hidden;
}

.user-menu-header {
    padding: var(--space-4);
    background: var(--gray-50);
    border-bottom: 1px solid var(--border-light);
}

.user-menu-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-email {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-divider {
    height: 1px;
    background: var(--border-light);
    margin: var(--space-2) 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.user-menu-item:hover {
    background: var(--gray-50);
    color: var(--text-primary);
}

.user-menu-item i {
    font-size: 1.125rem;
}

.user-menu-item-danger {
    color: var(--danger-700);
}

.user-menu-item-danger:hover {
    background: var(--danger-50);
    color: var(--danger-700);
}

@media (max-width: 768px) {
    .user-name {
        display: none;
    }

    .user-menu-trigger {
        padding: var(--space-2);
    }
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: white;
    border-right: 1px solid var(--border-light);
    padding: var(--space-6);
    z-index: 50;
    overflow-y: auto;
    transition:
        width 0.3s ease,
        padding 0.3s ease;
}

.sidebar.collapsed {
    width: 70px;
    padding: var(--space-4) var(--space-2);
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition:
            transform 0.3s ease,
            width 0.3s ease,
            padding 0.3s ease;
    }

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

.sidebar-logo {
    margin-bottom: var(--space-8);
    overflow: hidden;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-logo {
    opacity: 0;
    height: 0;
    margin-bottom: var(--space-2);
}

/* Tenant in Sidebar */
.sidebar-logo .tenant-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.sidebar-logo .tenant-link:hover {
    opacity: 0.8;
}

.tenant-logo-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: var(--radius-lg);
    background-color: var(--gray-100);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    border: 2px solid var(--border-light);
}

.tenant-logo-default {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%);
    border-color: var(--primary-200);
}

.tenant-logo-default i {
    font-size: 1.5rem;
    color: var(--primary-600);
}

.tenant-name-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

/* Tenant Switcher (Superuser only) */
.tenant-switcher {
    position: relative;
}

.tenant-dropdown-trigger {
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.tenant-dropdown-icon {
    font-size: 0.875rem;
    transition: transform 0.2s ease;
    color: var(--text-tertiary);
}

.tenant-dropdown-icon.rotate-180 {
    transform: rotate(180deg);
}

.tenant-dropdown {
    position: absolute;
    top: calc(100% + var(--space-2));
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    overflow: hidden;
    max-height: 400px;
    display: flex;
    flex-direction: column;
}

.tenant-dropdown-header {
    padding: var(--space-3);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.tenant-search-input {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--gray-50);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-family: inherit;
}

.tenant-search-input:focus {
    outline: none;
    border-color: var(--primary-500);
    background: white;
}

.tenant-dropdown-list {
    overflow-y: auto;
    max-height: 320px;
}

.tenant-dropdown-loading,
.tenant-dropdown-empty,
.tenant-dropdown-hint {
    padding: var(--space-6) var(--space-4);
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.tenant-dropdown-loading i {
    animation: spin 0.8s linear infinite;
    margin-right: var(--space-2);
}

.tenant-dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--border-light);
}

.tenant-dropdown-item:last-child {
    border-bottom: none;
}

.tenant-dropdown-item:hover {
    background: var(--gray-50);
}

.tenant-item-logo {
    flex-shrink: 0;
}

.tenant-item-logo .tenant-logo-img {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
}

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

.tenant-item-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tenant-item-domain {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav-item {
    margin-bottom: var(--space-2);
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
}

.sidebar.collapsed .sidebar-nav-link {
    justify-content: center;
    padding: var(--space-3);
}

.sidebar.collapsed .sidebar-nav-link i {
    font-size: 1.5rem;
}

.sidebar.collapsed .sidebar-nav-link .nav-text {
    display: none;
}

.sidebar.collapsed .sidebar-nav-link {
    overflow: hidden;
}

.sidebar-nav-link:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.sidebar-nav-link.active {
    background: var(--primary-50);
    color: var(--primary-800);
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
}

.card-header {
    margin-bottom: var(--space-4);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(
        135deg,
        var(--primary-800) 0%,
        var(--primary-600) 100%
    );
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-icon:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

/* Forms */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: 1rem;
    color: var(--text-primary);
    background: white;
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(9, 52, 225, 0.1);
}

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

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: var(--space-3);
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-light);
}

.table td {
    padding: var(--space-4) var(--space-3);
    border-bottom: 1px solid var(--border-light);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

/* Utilities */
.text-primary {
    color: var(--text-primary);
}
.text-secondary {
    color: var(--text-secondary);
}
.text-tertiary {
    color: var(--text-tertiary);
}

.bg-primary {
    background: var(--primary-500);
}
.bg-success {
    background: var(--success-500);
}
.bg-danger {
    background: var(--danger-500);
}
.bg-warning {
    background: var(--warning-500);
}

.mb-2 {
    margin-bottom: var(--space-2);
}
.mb-3 {
    margin-bottom: var(--space-3);
}
.mb-4 {
    margin-bottom: var(--space-4);
}
.mb-6 {
    margin-bottom: var(--space-6);
}

.mt-4 {
    margin-top: var(--space-4);
}
.mt-6 {
    margin-top: var(--space-6);
}

.font-semibold {
    font-weight: 600;
}
.font-bold {
    font-weight: 700;
}

.flex {
    display: flex;
}
.items-center {
    align-items: center;
}
.justify-between {
    justify-content: space-between;
}
.gap-2 {
    gap: var(--space-2);
}
.gap-4 {
    gap: var(--space-4);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-up {
    animation: slideUp 0.3s ease;
}

/* Loading spinner */
.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--gray-300);
    border-top-color: var(--primary-600);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

/* Login page specific */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    background: linear-gradient(
        135deg,
        var(--primary-800) 0%,
        var(--primary-600) 100%
    );
}

.login-box {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: var(--radius-2xl);
    padding: var(--space-12);
    box-shadow: var(--shadow-xl);
}

.login-logo {
    text-align: center;
    margin-bottom: var(--space-8);
}

.login-logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-800);
    margin-bottom: var(--space-2);
}

.login-logo p {
    color: var(--text-secondary);
}

.error-message {
    background: var(--danger-50);
    color: var(--danger-700);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    border: 1px solid var(--danger-500);
}

/* ==============================================================================
   TOAST NOTIFICATIONS
   ============================================================================== */

.toast {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 300px;
    max-width: 500px;
    z-index: 9999;
    transform: translateX(calc(100% + var(--space-6)));
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast span {
    flex: 1;
    font-weight: 500;
}

.toast-success {
    border-left: 4px solid var(--success-500);
}

.toast-success i {
    color: var(--success-500);
}

.toast-error {
    border-left: 4px solid var(--danger-500);
}

.toast-error i {
    color: var(--danger-500);
}

.toast-info {
    border-left: 4px solid var(--primary-500);
}

.toast-info i {
    color: var(--primary-500);
}

@media (max-width: 768px) {
    .toast {
        bottom: var(--space-4);
        right: var(--space-4);
        left: var(--space-4);
        min-width: auto;
    }
}

/* ==============================================================================
   MODAL OVERLAYS
   ============================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-6);
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: white;
    border-radius: var(--radius-2xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-6);
}

.modal-footer {
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
    padding: var(--space-6);
    border-top: 1px solid var(--border-light);
}

@media (max-width: 768px) {
    .modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* ==============================================================================
   SIDE PANEL (Asana-style)
   ============================================================================== */

.side-panel {
    position: fixed;
    right: -100%;
    top: 0;
    bottom: 0;
    width: 600px;
    max-width: 90vw;
    background: white;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.side-panel.active {
    right: 0;
}

.side-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.side-panel-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.side-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.side-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-6);
}

/* ==============================================================================
   BADGES
   ============================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-alto {
    background: var(--success-50);
    color: var(--success-700);
}

.badge-médio {
    background: var(--warning-50);
    color: var(--warning-700);
}

.badge-baixo {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* ==============================================================================
   EMPTY STATES
   ============================================================================== */

.empty-state {
    text-align: center;
    padding: var(--space-12);
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: var(--space-4);
}

.empty-state p {
    color: var(--text-tertiary);
    font-size: 1.125rem;
}

/* ==============================================================================
   SIDEBAR DIVIDER
   ============================================================================== */

.sidebar-nav-divider {
    padding: var(--space-4) var(--space-6);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray-400);
    letter-spacing: 0.05em;
    margin-top: var(--space-4);
}

/* ==============================================================================
   SUPERADMIN RESTRICTED ELEMENTS
   Estilos para elementos restritos a superadmins
   ============================================================================== */

.superadmin-only {
    border: 2px solid #fbbf24 !important;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
    position: relative;
}

.superadmin-only:hover {
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
}

/* Ícone indicador de superadmin */
.superadmin-icon {
    color: #fbbf24;
    margin-right: 0.25rem;
}
