@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

/*
   GoTask Global Stylesheet
   Centralized Design System
*/

:root {
    --primary: #732993;
    --primary-hover: #5c2075;
    --primary-vibrant: #8e44ad;
    --primary-light: #f8d8ff;

    /* Functional Grays - Slate Scale */
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --text-lighter: #a5b1b2;

    --white: #ffffff;
    --light: #f8f9fa;
    --lighter: #edeeef;

    --border: #e1e3e4;
    --border-light: #edeeef;

    /* Status & Accents */
    --accent: #e74c3c;
    --success: #006d37;
    --success-light: #ccecd7;
    --warning: #f39c12;
    --warning-light: #fbeec8;
    --error: #e74c3c;
    --error-light: #ffdad6;
    --info: #00517c;
    --info-light: #cce5ff;

    --danger: #e74c3c;
    --danger-light: #ffdad6;

    /* Layout */
    --topbar-height: 70px;
    --sidebar-width: 260px;

    /* Elevation */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
}

.material-icons {
    font-family: 'Material Icons' !important;
    font-size: 24px;
    display: inline-block;
    line-height: 1;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-lighter);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background-color: var(--light);
    display: flex;
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Hanken Grotesk', sans-serif;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text);
    letter-spacing: -0.02em;
}


h1 {
    font-size: 2rem;
    font-weight: 700;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

/* Layout */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    transition: margin-left 0.3s ease;
    width: calc(100% - var(--sidebar-width));
}

.topbar {
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    position: sticky;
    top: 0;
    z-index: 900;
}

.page-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2.5rem;
}

/* Badges & Priorities */
.task-priority {
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.task-priority.high {
    background: rgba(220, 53, 69, 0.1);
    color: #ff4757;
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.2);
}

.task-priority.medium {
    background: rgba(255, 107, 53, 0.1);
    color: #ffa502;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.2);
}

.task-priority.low {
    background: rgba(40, 167, 69, 0.1);
    color: #2ed573;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.3rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 0.875rem;
    font-family: 'Hanken Grotesk', sans-serif !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
}

/* Mobile Toggle Hamburger Button */
.btn-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: var(--text);
    border-radius: 8px;
    transition: all 0.2s ease;
}
.btn-menu svg {
    width: 24px;
    height: 24px;
}
.btn-menu:hover {
    background-color: var(--lighter);
}

/* Mobile Sidebar Backdrop Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 950;
    transition: all 0.3s ease;
}
.sidebar-overlay.active {
    display: block;
}

/* Mobile Settings Nav Select Dropdown */
.settings-nav-select {
    width: 100%;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif !important;
    color: var(--text);
    outline: none;
    transition: all 0.2s ease;
}
.settings-nav-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.15);
}


.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 82, 204, 0.15), 0 4px 6px -2px rgba(0, 82, 204, 0.05);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-vibrant) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
    box-shadow: 0 8px 20px rgba(0, 82, 204, 0.25);
}

.btn-secondary {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}


/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-agendada {
    background: var(--warning-light);
    color: var(--warning);
}

.status-realizada {
    background: var(--success-light);
    color: var(--success);
}

.status-cancelada {
    background: var(--danger-light);
    color: var(--danger);
}

/* Forms (Standardized) */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

.form-section {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 0.5rem;
}

/* Sidebar Expansion */
body.sidebar-collapsed .sidebar {
    width: 60px;
}

body.sidebar-collapsed .sidebar-nav span {
    display: none;
}

body.sidebar-collapsed .main-content {
    margin-left: 60px;
}

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

.sidebar-header .logo {
    font-size: 1.5rem;
    color: var(--text);
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.025em;
    /* tracking-tight */
}

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

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
    background-color: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
}

.nav-item.active {
    font-weight: 600;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background-color: var(--lighter);
    margin-bottom: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-role {
    color: var(--text-light);
    font-size: 0.85rem;
}

.btn-logout {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--lighter);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background-color: var(--danger-light);
    color: var(--danger);
    border-color: var(--danger);
}

/* Topbar Expansion */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--light);
    border-radius: 6px;
    padding: 0.5rem 1rem;
}

.search-icon {
    width: 20px;
    height: 20px;
    color: var(--text-light);
    margin-right: 0.5rem;
}

.search-input {
    background: none;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    width: 200px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: var(--text-light);
    position: relative;
    flex-shrink: 0;
}

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

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Theme Configuration */
body {
    --white: #FFFFFF;
    --light: #F8FAFC;
    --lighter: #F1F5F9;
    --text: #1E293B;
    --text-light: #475569;
    --text-lighter: #94A3B8;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --primary-light: #E7F3FF;

    background-color: var(--light);
    color: var(--text);
}

body.dark-theme {
    --white: #1a1a2e !important;
    --light: #0f172a !important;
    --lighter: #1e293b !important;
    --text: #f8fafc !important;
    --text-light: #cbd5e1 !important;
    --text-lighter: #94a3b8 !important;
    --border: rgba(255, 255, 255, 0.1) !important;
    --dark-gray: #94a3b8 !important;
    --primary-light: rgba(59, 130, 246, 0.2) !important;
}

body.dark-theme,
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6,
body.dark-theme p,
body.dark-theme div,
body.dark-theme span:not(.material-icons):not(.material-symbols-outlined) {
    color: var(--text) !important;
}

body.dark-theme input:not(.btn):not([type="submit"]):not([type="button"]),
body.dark-theme textarea,
body.dark-theme select,
body.dark-theme select option,
body.dark-theme .form-control {
    color: var(--text) !important;
    background-color: var(--light) !important;
    border-color: var(--border) !important;
}

body.dark-theme .task-title,
body.dark-theme .task-name {
    color: #ffffff !important;
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6,
body.dark-theme p,
body.dark-theme span:not(.material-icons):not(.material-symbols-outlined) {
    color: var(--text);
}

body.dark-theme .task-title {
    color: var(--white) !important;
}

body.dark-theme .card,
body.dark-theme .sidebar,
body.dark-theme .topbar,
body.dark-theme .standard-card {
    background: #1a1a2e;
    border-color: var(--border);
}

body.dark-theme .nav-item:hover,
body.dark-theme .nav-item.active {
    background-color: rgba(0, 82, 204, 0.2);
}

body.dark-theme .user-profile {
    background-color: #0f0f23;
}

body.dark-theme .chat-input {
    color: var(--text) !important;
    background: var(--lighter) !important;
}

body.dark-theme .chat-input::placeholder {
    color: var(--text-lighter) !important;
}

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

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {

    .sidebar {
        transform: translateX(-100%);
        width: 100%;
        max-width: 280px;
        transition: transform 0.3s ease;
    }

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

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

    .btn-menu {
        display: flex !important;
    }

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

    .task-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem 1.5rem;
    }

    .task-item>div:last-child {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .topbar {
        padding: 0 1rem;
    }
}

.kpi-card {
    background: var(--white);
    padding: 1.85rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: slideInUp 0.6s backwards;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.kpi-header h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin: 0;
}

.kpi-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
    opacity: 0.7;
    flex-shrink: 0;
}

.kpi-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s;
}

.kpi-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -10px rgba(0, 82, 204, 0.15);
    border-color: var(--primary);
}

.kpi-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
}

.kpi-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text);
    line-height: 1;
    margin-top: auto;
}

/* Grids & Layout Utilities */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-10 {
    margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .md\:grid-cols-6 {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .lg\:grid-cols-6 {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.flex-col {
    flex-direction: column;
}

.flex-1 {
    flex: 1 1 0%;
}

/* --- CARD BASE (SHARED UTILITY) --- */
.card {
    background: var(--white);
    border-radius: 4px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* --- COLOR/TEXT UTILITIES --- */
.text-primary {
    color: var(--primary);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--error);
}

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

.text-light-color {
    color: var(--text-light);
}

/* --- BUTTON SIZES --- */
.btn.btn-sm {
    font-size: 0.7rem;
    padding: 0.35rem 0.8rem;
    gap: 0.25rem;
}

/* --- ICON SIZE VARIANTS --- */
.icon-xs {
    font-size: 14px !important;
    font-variation-settings: 'opsz' 14;
}

.icon-sm {
    font-size: 18px !important;
    font-variation-settings: 'opsz' 18;
}

.kpi-card:hover::after {
    opacity: 1;
}

.recent-section {
    margin-top: 3rem;
    animation: fadeIn 1s 0.3s backwards;
}

.recent-section h3 {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.recent-section h3::before {
    content: '';
    width: 6px;
    height: 24px;
    background: var(--primary);
    border-radius: 10px;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.task-item {
    background: var(--white);
    padding: 1.25rem 2rem;
    border-radius: 4px;
    border: 0.5px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: staggeredIn 0.5s backwards;
}

.task-item:hover {
    transform: scale(1.015) translateX(10px);
    background: var(--white);
    border-color: var(--primary);
    box-shadow: var(--shadow-xl);
}

body.dark-theme .task-item:hover {
    background: rgba(26, 26, 46, 0.7);
}

.task-title {
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    margin-bottom: 0.25rem !important;
    color: var(--text) !important;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    display: block;
    max-width: 100%;
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.task-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.task-status-pill {
    font-size: 0.7rem;
    padding: 0.15rem 0.6rem;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.task-status-pill.in-progress,
.task-status-pill.em_progresso {
    background: var(--primary-light);
    color: var(--primary);
}

.task-status-pill.completed,
.task-status-pill.concluida {
    background: var(--success-light);
    color: var(--success);
}

.task-status-pill.pending,
.task-status-pill.pendente {
    background: var(--lighter);
    color: var(--text-light);
}

.task-status-pill.nao_realizada {
    background: var(--error-light);
    color: var(--error);
}


.task-priority-label {
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.task-subtasks-wrapper {
    margin-top: 0.55rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.task-subtask-link {
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    font-size: 0.72rem;
    color: var(--text-light);
    border: 1px solid var(--border);
    background: transparent;
    transition: all 0.2s ease;
}

.task-subtask-link:hover {
    background: rgba(0, 82, 204, 0.08);
    color: var(--primary);
    border-color: var(--primary-light);
}

.task-actions-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.task-timer {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    font-size: 0.85rem;
}

.task-timer.overdue {
    color: var(--danger) !important;
}

.task-timer.warning {
    color: var(--warning) !important;
}

.task-timer.ok {
    color: var(--success) !important;
}


/* Staggered Entrance and Delay */
.kpi-card:nth-child(1) {
    animation-delay: 0.1s;
}

.kpi-card:nth-child(2) {
    animation-delay: 0.2s;
}

.kpi-card:nth-child(3) {
    animation-delay: 0.3s;
}

.kpi-card:nth-child(4) {
    animation-delay: 0.4s;
}

.task-item:nth-child(1) {
    animation-delay: 0.4s;
}

.task-item:nth-child(2) {
    animation-delay: 0.5s;
}

.task-item:nth-child(3) {
    animation-delay: 0.6s;
}

.task-item:nth-child(4) {
    animation-delay: 0.7s;
}

.task-item:nth-child(5) {
    animation-delay: 0.8s;
}

/* Animations Keyframes */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes staggeredIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.kpi-header h3 {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text);
    margin: 0.5rem 0;
}

.kpi-change {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.kpi-change.positive {
    color: var(--success);
}

.kpi-change.negative {
    color: var(--danger);
}

/* GoPulse & Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card.gradient {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.stat-card.accent1 {
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
}

.stat-card.accent5 {
    background: linear-gradient(135deg, #6C5CE7, #8076E4);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* AI Predictive Alerts */
.ai-alerts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.ai-alert-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-left: 5px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ai-alert-card.danger {
    border-left-color: var(--danger);
}

.ai-alert-card.warning {
    border-left-color: var(--warning);
}

.ai-alert-danger-tag {
    color: var(--danger);
    font-weight: 800;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.ai-alert-warning-tag {
    color: var(--warning);
    font-weight: 800;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.ai-alert-action {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
}

/* Tables & Listings */
.table-container {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-top: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: var(--lighter);
    border-bottom: 2px solid var(--border);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

tbody tr:hover {
    background-color: var(--lighter);
}

/* Badges (Standardized) */
.badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-info {
    background: #D1ECF1;
    color: #0C5460;
}

.badge-gray {
    background: #E2E3E5;
    color: #6C757D;
}

/* Subtasks & Form Sections */
.form-section {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 0.5rem;
}

.subtarefa-item {
    background: var(--lighter);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* Kanban Board */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.kanban-column {
    background: #EBECF0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.kanban-column-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.kanban-count {
    background: var(--dark-gray);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

.kanban-cards {
    padding: 0.75rem;
    flex: 1;
    overflow-y: auto;
}

.kanban-card {
    background: var(--white);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: grab;
    transition: transform 0.2s;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive Headers */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.8rem;
    margin: 0;
}

.page-header .page-header-info {
    text-align: left;
    width: 100%;
}

/* --- RESPONSIVE OVERRIDES (Bottom of file for priority) --- */
@media screen and (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media screen and (max-width: 768px) {
    body {
        overflow-x: hidden !important;
    }

    .sidebar {
        position: fixed !important;
        left: 0 !important;
        transform: translateX(-100%) !important;
        width: 280px !important;
        z-index: 9999 !important;
        transition: transform 0.3s ease !important;
        visibility: hidden !important;
    }

    .sidebar.active {
        transform: translateX(0) !important;
        visibility: visible !important;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.5) !important;
    }

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

    .topbar {
        padding: 0 1rem !important;
        justify-content: space-between !important;
    }

    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .kpi-card {
        padding: 1.25rem !important;
    }

    .task-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 1.25rem !important;
    }

    .task-item>div {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }

    .task-item>div:last-child {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-top: 0.5rem !important;
        border-top: 1px solid var(--border) !important;
        padding-top: 0.75rem !important;
    }
}

/* Mobile cards and responsive user listing */
.mobile-card-list {
    display: none;
    gap: 1rem;
    margin-top: 1rem;
}

@media screen and (min-width: 900px) {
    .mobile-card-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(320px, 1fr));
        gap: 1rem;
        align-items: stretch;
    }

    .mobile-card {
        width: 100%;
    }
}

.mobile-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

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

.mobile-card-body {
    display: grid;
    gap: 0.75rem;
}

.mobile-card-field {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.mobile-card-field-label {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 700;
}

.mobile-card-field-value {
    font-size: 0.9rem;
    color: var(--text);
    text-align: right;
    min-width: 0;
}

@media screen and (max-width: 576px) {
    .mobile-card {
        width: 100% !important;
        max-width: 100% !important;
    }
    .mobile-card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .mobile-card-field {
        flex-direction: column !important;
        gap: 0.35rem !important;
        align-items: flex-start !important;
    }
    .mobile-card-field-value {
        text-align: left !important;
    }
}


.mobile-card-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.mobile-card-footer .btn {
    width: 100%;
}

.desktop-only-table {
    display: block !important;
}

.mobile-card-list {
    display: none !important;
}

@media screen and (max-width: 1024px) {
    .desktop-only-table {
        display: none !important;
    }

    .mobile-card-list {
        display: grid !important;
    }
}


@media screen and (max-width: 992px) {
    body {
        overflow-x: hidden !important;
    }

    .sidebar {
        position: fixed !important;
        left: 0 !important;
        transform: translateX(-100%) !important;
        width: 280px !important;
        z-index: 9999 !important;
        transition: transform 0.3s ease !important;
        visibility: hidden !important;
    }

    .sidebar.active {
        transform: translateX(0) !important;
        visibility: visible !important;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.5) !important;
    }

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

    .topbar {
        padding: 0 1rem !important;
        justify-content: space-between !important;
    }

    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .kpi-card {
        padding: 1.25rem !important;
    }

    .task-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 1.25rem !important;
    }

    .task-item>div {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }

    .task-item>div:last-child {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-top: 0.5rem !important;
        border-top: 1px solid var(--border) !important;
        padding-top: 0.75rem !important;
    }
}

/* --- LAYOUT PROPORTIONS & OVERFLOW FIXES --- */
.task-info {
    flex: 1;
    min-width: 0;
}

.task-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}

.kpi-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
    opacity: 0.7;
    flex-shrink: 0;
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.kpi-header h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin: 0;
}

/* --- GANTT CHART (GOLD STANDARD) --- */
.gantt-chart {
    display: flex;
    flex-direction: column;
}

.gantt-header {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--lighter);
}

.gantt-sidebar-header {
    width: 250px;
    padding: 1.25rem;
    font-weight: 800;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.1rem;
    border-right: 1px solid var(--border);
}

.gantt-timeline-header {
    flex: 1;
    display: flex;
    overflow-x: auto;
}

.gantt-month {
    flex: 1;
    min-width: 60px;
    padding: 1.25rem;
    text-align: center;
    font-weight: 800;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.05rem;
    border-right: 1px solid var(--border-light);
}

.gantt-month:last-child {
    border-right: none;
}

.gantt-row {
    display: flex;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-light);
}

.gantt-row:hover {
    background: var(--primary-light);
}

.gantt-task-info {
    width: 250px;
    padding: 1.25rem;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.gantt-task-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    transition: color 0.2s ease;
}

.gantt-row:hover .gantt-task-title {
    color: var(--primary);
}

.gantt-task-project {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    opacity: 0.8;
}

.gantt-timeline-body {
    flex: 1;
    position: relative;
    height: 80px;
    display: flex;
    align-items: center;
    background-image: linear-gradient(to right, var(--border-light) 1px, transparent 1px);
    background-size: calc(100% / 12) 100%;
}

.gantt-bar {
    position: absolute;
    height: 32px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    font-size: 0.6rem;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.025rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
}

.gantt-bar:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.gantt-bar.high {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.gantt-bar.medium {
    background: linear-gradient(135deg, #ffa502, #ff7f50);
    box-shadow: 0 4px 12px rgba(255, 165, 2, 0.3);
}

.gantt-bar.low {
    background: linear-gradient(135deg, #2ed573, #7bed9f);
    box-shadow: 0 4px 12px rgba(46, 213, 115, 0.3);
}

.gantt-bar.done {
    background: linear-gradient(135deg, #2f3542, #57606f);
    opacity: 0.8;
}

.gantt-bar.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 4px 12px rgba(0, 82, 204, 0.3);
}

@media (max-width: 768px) {

    .gantt-sidebar-header,
    .gantt-task-info {
        width: 150px;
    }
}

/* --- CALENDAR (GOLD STANDARD) --- */
.calendar-container {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-light);
}

.calendar-header-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--lighter);
    border-bottom: 1px solid var(--border-light);
}

.calendar-day-label {
    padding: 1.25rem 0.5rem;
    text-align: center;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.1rem;
    border-right: 1px solid rgba(0, 0, 0, 0.03);
}

.calendar-day-label:last-child {
    border-right: none;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    min-height: 140px;
    padding: 1rem;
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    transition: all 0.2s ease;
    background: var(--white);
    position: relative;
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day.empty {
    background: var(--lighter);
    opacity: 0.5;
}

.calendar-day:hover:not(.empty) {
    background: var(--primary-light);
    z-index: 1;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.day-number {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-light);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.calendar-day.today .day-number {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 82, 204, 0.3);
}

.day-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.4;
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.calendar-event {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-transform: uppercase;
    display: block;
}

.calendar-event:hover {
    transform: translateX(4px);
    filter: brightness(0.95);
}

.calendar-event.high {
    background: rgba(255, 71, 87, 0.1);
    color: #ff4757;
    border-color: rgba(255, 71, 87, 0.2);
}

.calendar-event.medium {
    background: rgba(255, 165, 2, 0.1);
    color: #ffa502;
    border-color: rgba(255, 165, 2, 0.2);
}

.calendar-event.low {
    background: rgba(46, 213, 115, 0.1);
    color: #2ed573;
    border-color: rgba(46, 213, 115, 0.2);
}

.calendar-event.done {
    background: rgba(47, 53, 66, 0.05);
    color: #57606f;
    opacity: 0.6;
    text-decoration: line-through;
}

.calendar-nav-card {
    background: var(--white);
    padding: 0.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.calendar-current-month {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    color: var(--text);
    padding: 0 1rem;
    min-width: 160px;
    text-align: center;
}

@media (max-width: 768px) {
    .calendar-day {
        min-height: 100px;
        padding: 0.5rem;
    }

    .calendar-event {
        font-size: 0.55rem;
        padding: 0.25rem 0.4rem;
    }
}

/* --- FILTER BAR (GOLD STANDARD) --- */
.filter-container {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
    margin-bottom: 2rem;
}

.filter-search-wrapper {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.filter-search-wrapper .material-symbols-outlined {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--text-lighter);
    pointer-events: none;
}

.filter-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem !important;
    border-radius: 12px !important;
    font-size: 0.9rem !important;
    background: var(--white) !important;
    border: 1px solid #cbd5e1 !important;
    color: var(--text) !important;
    transition: all 0.2s ease !important;
}

.filter-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.15) !important;
    outline: none !important;
}

.filter-select {
    width: 200px;
    padding: 0.75rem 1rem !important;
    border-radius: 12px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05rem !important;
    background: var(--white) !important;
    border: 1px solid #cbd5e1 !important;
    cursor: pointer;
    color: var(--text-light) !important;
    transition: all 0.2s ease !important;
}

.filter-select:focus {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.15) !important;
    outline: none !important;
}


@media (max-width: 768px) {
    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
    }
}

/* --- PROJECT CARDS (GOLD STANDARD) --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-light);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.project-icon-box {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.project-card:hover .project-icon-box {
    background: var(--primary);
}

.project-card:hover .project-icon-box .material-symbols-outlined {
    color: var(--white);
}

.project-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.project-card:hover .project-actions {
    opacity: 1;
}

.project-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.project-description {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-meta {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
}

.project-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.project-meta-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-lighter);
    letter-spacing: 0.05rem;
}

.project-progress-container {
    margin-top: 1rem;
}

.project-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.project-progress-percent {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary);
}

.project-progress-bar {
    height: 6px;
    background: var(--lighter);
    border-radius: 10px;
    overflow: hidden;
}

.project-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-vibrant));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.project-progress-fill.bg-success {
    background: linear-gradient(90deg, var(--success), #34d399) !important;
}

.project-progress-fill.bg-warning {
    background: linear-gradient(90deg, var(--warning), #fbbf24) !important;
}

/* --- ANALYTICS & METRICS (GOLD STANDARD) --- */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.metric-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-light);
}

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

.metric-card-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-lighter);
    letter-spacing: 0.05rem;
}

.metric-card-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text);
    line-height: 1;
}

.metric-card-trend {
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.info-card-premium {
    background: var(--primary-light);
    border: 1px solid var(--primary-light);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 1rem;
}

.info-card-premium h3 {
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.info-card-premium p {
    color: var(--primary-dark);
    font-size: 0.8rem;
    opacity: 0.8;
    line-height: 1.5;
}

.info-card-icon {
    width: 40px;
    height: 40px;
    background: var(--white);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.table-premium-wrapper {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    -webkit-overflow-scrolling: touch;
}

.table-premium {
    min-width: 860px;
}

.table-premium th {
    background: var(--lighter);
    padding: 1.25rem 1.5rem;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-lighter);
    letter-spacing: 0.05rem;
    border-bottom: 1px solid var(--border-light);
}

.table-premium td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

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

/* --- KANBAN & CRM (GOLD STANDARD) --- */
.kanban-board {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    align-items: flex-start;
}

.kanban-column {
    flex: 1;
    min-width: 320px;
    background: var(--lighter);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 250px);
}

.kanban-column-header {
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-column-title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-lighter);
    letter-spacing: 0.05rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kanban-column-count {
    background: var(--white);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 900;
    color: var(--primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.kanban-items {
    padding: 0 0.75rem 0.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.kanban-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: grab;
}

.kanban-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.kanban-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.kanban-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-lighter);
}

/* --- CHAT (GOLD STANDARD) --- */
.chat-container {
    height: calc(100vh - 250px);
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--lighter);
}

.chat-bubble {
    max-width: 70%;
    padding: 1rem 1.25rem;
    border-radius: 20px;
    font-size: 0.85rem;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.chat-bubble-received {}

.chat-bubble.private {
    background: #f5e6ff;
    border: 1px solid #d1b3ff;
}

align-self: flex-start;
background: var(--white);
color: var(--text);
border-bottom-left-radius: 4px;
}

.chat-bubble-sent {
    align-self: flex-end;
    background: var(--primary);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.chat-meta {
    font-size: 0.65rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    opacity: 0.7;
    display: block;
}

.chat-input-area {
    padding: 1.5rem;
    background: var(--white);
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.chat-input {
    flex: 1;
    background: var(--lighter);
    border: 1px solid var(--border-lighter);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.chat-input:focus {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* --- GOCHAT APP LAYOUT --- */
.gochat-layout {
    height: calc(100vh - 14rem);
    display: flex;
    gap: 1.5rem;
}

.gochat-sidebar {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.gochat-sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.gochat-sidebar-label {
    font-size: 0.625rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-lighter);
}

.gochat-add-btn {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 6px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.gochat-add-btn:hover {
    background: #c7deff;
}

.gochat-add-btn .material-symbols-outlined {
    font-size: 14px !important;
}

.gochat-channels-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gochat-channel-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: var(--text-lighter);
    text-decoration: none;
    font-size: 0.875rem;
    overflow: hidden;
}

.gochat-channel-item span.channel-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gochat-channel-item:hover {
    background: var(--lighter);
    color: var(--text);
    text-decoration: none;
}

.gochat-channel-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

.gochat-channel-item .material-symbols-outlined {
    font-size: 16px !important;
    flex-shrink: 0;
}

.gochat-channel-empty {
    padding: 1.5rem 0.75rem;
    text-align: center;
    opacity: 0.3;
}

.gochat-channel-empty .material-symbols-outlined {
    font-size: 2rem !important;
    display: block;
    margin-bottom: 0.25rem;
}

.gochat-channel-empty p {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.gochat-user-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.gochat-user-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--text-lighter);
}

.gochat-user-avatar {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--success-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gochat-user-avatar .material-symbols-outlined {
    font-size: 12px !important;
    color: var(--success);
}

.gochat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* ensure chat-messages can shrink inside flex */
.gochat-area .chat-messages {
    min-height: 0;
}

.gochat-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0.2;
    padding: 5rem 1rem;
    text-align: center;
}

.gochat-empty-state .material-symbols-outlined {
    font-size: 5rem !important;
    display: block;
    margin-bottom: 1rem;
}

.chat-message-text {
    font-size: 0.85rem;
    line-height: 1.5;
}

.chat-send-btn {
    height: 3rem;
    width: 3rem;
    border-radius: 12px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gochat-modal-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.gochat-channel-prefix {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-lighter);
    flex-shrink: 0;
}

/* GoChat Modal */
.gochat-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.gochat-modal-overlay.is-open {
    display: flex;
}

.gochat-modal-card {
    width: 100%;
    max-width: 30rem;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid var(--border);
    border-top: 4px solid var(--primary);
    box-shadow: 0 24px 48px rgba(0, 82, 204, 0.15), 0 8px 24px rgba(0, 0, 0, 0.08);
    animation: gochatModalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gochat-modal-header {
    padding: 1.75rem 2rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, #f0f7ff 100%);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gochat-modal-header-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 82, 204, 0.3);
}

.gochat-modal-header-icon .material-symbols-outlined {
    font-size: 20px !important;
    color: var(--white);
}

.gochat-modal-header-text h3 {
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text);
    margin: 0 0 0.125rem;
}

.gochat-modal-header-text p {
    font-size: 0.75rem;
    color: var(--text-lighter);
    margin: 0;
}

.gochat-modal-body {
    padding: 1.75rem 2rem 2rem;
}

.gochat-channel-input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gochat-channel-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.gochat-channel-input-wrap .gochat-channel-prefix {
    padding: 0 0.75rem;
    background: var(--lighter);
    border-right: 1.5px solid var(--border);
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-lighter);
    align-self: stretch;
}

.gochat-channel-input-wrap .form-control {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    flex: 1;
}

.gochat-channel-input-wrap .form-control:focus {
    outline: none;
    box-shadow: none !important;
}

@keyframes gochatModalIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* --- TABS & NAVIGATION (GOLD STANDARD) --- */
.tabs-premium {
    display: flex;
    gap: 0.5rem;
    background: var(--lighter);
    padding: 0.5rem;
    border-radius: 16px;
    width: fit-content;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    color: var(--text-light);
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    cursor: pointer;
}

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

.tab-btn.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* --- ORGANIZATION & DEPARTMENTS (GOLD STANDARD) --- */
.dept-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.dept-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.dept-icon-box {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* --- STUNNING LOGIN EXPERIENCE (PREMIUM) --- */
#loginPage.login-body {
    background-color: #0f172a !important;
    background-image: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    font-family: 'Inter', sans-serif !important;
    color-scheme: dark;
}

.login-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150vw;
    height: 150vw;
    background: radial-gradient(circle at center, rgba(0, 82, 204, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    z-index: 1;
    animation: pulse-glow 10s infinite alternate ease-in-out;
}

@keyframes pulse-glow {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

.login-container {
    width: 100%;
    max-width: 460px;
    padding: 2rem;
    z-index: 10;
    animation: slide-up-fade 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slide-up-fade {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    padding: 4rem 3.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: shine-sweep 6s infinite linear;
}

@keyframes shine-sweep {
    to {
        left: 200%;
    }
}

.login-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.login-logo-icon {
    font-size: 4.5rem;
    color: var(--primary-vibrant);
    filter: drop-shadow(0 0 15px rgba(0, 101, 255, 0.4));
    margin-bottom: 1rem;
    display: inline-block;
    animation: float-slow 4s infinite ease-in-out;
}

@keyframes float-slow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.login-title {
    font-size: 2.8rem;
    font-weight: 900;
    color: white;
    letter-spacing: -2px;
    margin: 0;
    line-height: 1;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 3px;
    margin-top: 0.75rem;
}

.login-form-group {
    margin-bottom: 2rem;
    position: relative;
}

.login-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1.5px;
    margin-bottom: 0.75rem;
    margin-left: 0.5rem;
}

.login-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    padding: 1.15rem 1.5rem;
    color: #ffffff !important;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.login-input:focus {
    border-color: var(--primary-vibrant);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(0, 101, 255, 0.15);
}

.login-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.btn-login-stunning {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-vibrant) 100%);
    color: white;
    border: none;
    border-radius: 18px;
    font-weight: 900;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 30px rgba(0, 82, 204, 0.3);
}

.btn-login-stunning:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 82, 204, 0.5);
    filter: brightness(1.1);
}

.btn-login-stunning:active {
    transform: translateY(-2px) scale(0.98);
}

.login-extras {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    font-size: 0.8rem;
}

.login-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.login-link:hover {
    color: var(--primary-vibrant);
}

/* --- GoCRM LAYOUT (GOLD STANDARD) --- */
.crm-contacts-companies {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

@media (max-width: 1024px) {
    .crm-contacts-companies {
        grid-template-columns: 1fr;
    }
}

.crm-section-card {
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    overflow: hidden;
}

.crm-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.crm-section-title {
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.crm-section-title .material-symbols-outlined {
    font-size: 20px !important;
    color: var(--primary);
}

.crm-list {
    display: flex;
    flex-direction: column;
}

.crm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.5rem;
    border-top: 1px solid var(--border);
    border-radius: 8px;
    transition: background 0.15s ease;
}

.crm-row:first-child {
    border-top: none;
}

.crm-row:hover {
    background: var(--lighter);
}

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

.crm-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.7rem;
    text-transform: uppercase;
    flex-shrink: 0;
    letter-spacing: 0;
}

.crm-avatar-company {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crm-avatar-company .material-symbols-outlined {
    font-size: 18px !important;
    color: var(--primary);
}

.crm-row-info {
    min-width: 0;
    flex: 1;
}

.crm-row-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-row-meta {
    font-size: 0.7rem;
    color: var(--text-lighter);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.125rem;
    flex-wrap: wrap;
}

.crm-row-meta .meta-bold {
    font-weight: 700;
    color: var(--text-light);
}

.crm-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.crm-action-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 8px;
    background: var(--lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-lighter);
    transition: background 0.15s ease, color 0.15s ease;
    text-decoration: none;
    flex-shrink: 0;
}

.crm-action-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    text-decoration: none;
}

.crm-action-btn .material-symbols-outlined {
    font-size: 14px !important;
}

.crm-empty {
    padding: 3rem 1rem;
    text-align: center;
    opacity: 0.3;
}

.crm-empty .material-symbols-outlined {
    font-size: 3rem !important;
    display: block;
    margin-bottom: 0.5rem;
}

.crm-empty p {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
}

/* Kanban CRM card detail classes */
.kanban-card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.kanban-card-id {
    font-size: 0.55rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.05em;
}

.kanban-card-tag {
    font-size: 0.5rem;
    font-weight: 900;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    background: var(--lighter);
    color: var(--text-lighter);
}

.kanban-card-details {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.kanban-card-info-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-lighter);
}

.kanban-card-info-row .material-symbols-outlined {
    font-size: 14px !important;
    flex-shrink: 0;
}

.kanban-card-info-row.muted-less {
    opacity: 0.7;
}

.kanban-card-contact-name {
    font-weight: 700;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kanban-card-value {
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--primary);
}

.kanban-avatar-stack {
    display: flex;
    align-items: center;
}

.kanban-avatar-mini {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 1.5px solid var(--white);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -0.25rem;
}

.kanban-avatar-mini:first-child {
    margin-left: 0;
}

.kanban-avatar-mini .material-symbols-outlined {
    font-size: 10px !important;
    color: var(--primary);
}

.kanban-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    opacity: 0.15;
}

.kanban-empty .material-symbols-outlined {
    font-size: 2.5rem !important;
}

.kanban-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    width: 100%;
    padding: 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    border-style: dashed;
    letter-spacing: 0.05em;
    transition: all 0.15s ease;
}

.kanban-add-btn:hover {
    background: var(--white) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.kanban-add-btn .material-symbols-outlined {
    font-size: 16px !important;
}

.kanban-column-footer {
    padding: 0.75rem;
    flex-shrink: 0;
}

/* --- END GoCRM / GocHAT layout section --- */

.login-footer {
    text-align: center;
    margin-top: 3rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

.login-footer a {
    color: var(--primary-vibrant);
    font-weight: 800;
    text-decoration: none;
}

.alert-login {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ff8080;
    padding: 1rem;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

/* ============================================================================
   AVATAR SYSTEM
   ============================================================================ */

.avatar-upload {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
    background: var(--lighter);
    position: relative;
}

.avatar-upload:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.avatar-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-upload .avatar-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-light);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.avatar-upload .avatar-placeholder .material-symbols-outlined {
    font-size: 2rem;
    color: var(--text-lighter);
}

.avatar-img {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.avatar-img-sm {
    width: 36px;
    height: 36px;
}

.avatar-img-md {
    width: 48px;
    height: 48px;
}

.avatar-img-lg {
    width: 120px;
    height: 120px;
}

.avatar-initial {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
    background: var(--primary-light);
    color: var(--primary);
    text-transform: uppercase;
}

.avatar-initial-sm {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
}

.avatar-initial-md {
    width: 48px;
    height: 48px;
    font-size: 1rem;
}

/* ============================================================================
   CUSTOM MULTISELECT (replaces Select2)
   ============================================================================ */

.custom-multiselect {
    position: relative;
    width: 100%;
}

.custom-multiselect-trigger {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    min-height: 44px;
    cursor: pointer;
    align-items: center;
    transition: all 0.2s ease;
}

.custom-multiselect-trigger:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

.custom-multiselect-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.5rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.custom-multiselect-tag .tag-remove {
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.7;
}

.custom-multiselect-tag .tag-remove:hover {
    opacity: 1;
}

.custom-multiselect-tag .tag-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.custom-multiselect-search {
    border: none;
    outline: none;
    flex: 1;
    min-width: 80px;
    font-size: 0.9rem;
    background: transparent;
    padding: 0.25rem 0;
}

.custom-multiselect-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
    display: none;
    margin-top: 4px;
}

.custom-multiselect-dropdown.open {
    display: block;
}

.custom-multiselect-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 0.9rem;
}

.custom-multiselect-option:hover {
    background: var(--lighter);
}

.custom-multiselect-option.selected {
    background: var(--primary-light);
    font-weight: 600;
}

.custom-multiselect-option .option-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.custom-multiselect-option .option-initial {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
}

.custom-multiselect-option .option-check {
    margin-left: auto;
    color: var(--primary);
    font-size: 1.1rem;
}

/* ============================================================================
   MEETING DETAIL PAGE
   ============================================================================ */

.meeting-info-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.meeting-info-row:hover {
    background: var(--lighter);
}

.meeting-info-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.meeting-info-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.08em;
    display: block;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.meeting-info-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

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

.meeting-action-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--white);
    transition: all 0.2s ease;
}

.meeting-action-item:hover {
    box-shadow: var(--shadow-sm);
}

.meeting-action-item .action-status-icon {
    cursor: pointer;
    font-size: 1.3rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.meeting-action-item .action-status-icon.pendente {
    color: var(--text-lighter);
}

.meeting-action-item .action-status-icon.concluida {
    color: var(--success);
}

.meeting-action-item .action-body {
    flex: 1;
    min-width: 0;
}

.meeting-action-item .action-desc {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
}

.meeting-action-item .action-desc.done {
    text-decoration: line-through;
    color: var(--text-light);
}

.meeting-action-item .action-meta {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.meeting-action-item .action-delete {
    cursor: pointer;
    color: var(--text-lighter);
    font-size: 1rem;
    align-self: center;
    opacity: 0;
    transition: all 0.2s ease;
}

.meeting-action-item:hover .action-delete {
    opacity: 1;
}

.meeting-action-item .action-delete:hover {
    color: var(--error);
}

.meeting-add-action {
    display: block;
    margin-top: 1.5rem;
    padding: 2rem;
    background: var(--lighter);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.meeting-add-action input,
.meeting-add-action select {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    font-family: inherit;
    transition: all 0.2s ease;
}

.meeting-add-action input:focus,
.meeting-add-action select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

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

.meeting-participant-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.meeting-participant-row:hover {
    background: var(--lighter);
}

.meeting-participant-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

/* Responsive spacing optimization */
@media screen and (max-width: 768px) {
    .page-content {
        padding: 1rem !important;
    }
}

/* Consolidated utilities from page styles */
.tab-content {
    scroll-margin-top: 90px;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.modelo-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.modelo-item:hover {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 10px 15px -3px rgba(0, 82, 204, 0.1);
    transform: translateY(-2px);
}

/* CRM Kanban Drag and Drop Styles */
.kanban-ghost {
    opacity: 0.4;
    background: var(--primary-light) !important;
    border: 2px dashed var(--primary) !important;
}
.kanban-drag {
    transform: rotate(2deg);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1) !important;
}
.kanban-items {
    min-height: 100px;
}
.kanban-card {
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.kanban-card:active {
    cursor: grabbing;
}
.kanban-card.sorting {
    cursor: grabbing;
}

/* GoChat Integrated Styles */
:root {
    --chat-sidebar-width: 280px;
    --chat-right-width: 260px;
}

.gochat-container {
    display: flex;
    height: calc(100vh - 100px);
    background: var(--white);
    border-radius: 1.25rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    margin: 1rem;
    position: relative;
    border: 1px solid var(--border);
}

/* Sidebars */
.sidebar-left, .sidebar-right {
    background: var(--light);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 50;
}

.sidebar-left {
    width: var(--chat-sidebar-width);
    border-right: 1px solid var(--border);
}

.sidebar-right {
    width: var(--chat-right-width);
    border-left: 1px solid var(--border);
    padding: 1.5rem;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.25rem;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    color: var(--text);
}

/* Search & Tabs */
.search-box { padding: 1rem; }
.search-input {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--white);
    font-size: 0.85rem;
    outline: none;
}

.chat-tabs {
    display: flex;
    padding: 0 1rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    padding: 0.75rem 0;
    background: none;
    border: none;
    font-size: 0.8rem;
    color: var(--text-lighter);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* List Items */
.conversations-list { flex: 1; overflow-y: auto; padding: 0.5rem 0; }
.section-title {
    padding: 1rem 1.25rem 0.5rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-lighter);
    font-weight: 800;
}

.conversation-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

.conversation-item:hover { background: var(--lighter); }
.conversation-item.active { background: var(--primary-light); color: var(--primary); }

.item-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; flex-shrink: 0;
}

.item-avatar.channel { border-radius: 10px; background: var(--lighter); color: var(--text-light); }

.item-info { flex: 1; min-width: 0; }
.item-name { font-weight: 700; margin-bottom: 2px; }
.item-last-msg { 
    font-size: 0.75rem; color: var(--text-lighter); 
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}

/* Main Chat */
.main-chat { flex: 1; display: flex; flex-direction: column; background: var(--white); min-width: 0; }
.chat-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    background: var(--white);
}

.messages-area {
    flex: 1; overflow-y: auto; padding: 1.5rem;
    background: var(--light);
    display: flex; flex-direction: column; gap: 1rem;
}

/* Messages */
.message { display: flex; gap: 0.75rem; max-width: 80%; }
.message.sent { align-self: flex-end; flex-direction: row-reverse; }

.msg-content {
    background: var(--white); padding: 0.75rem 1rem;
    border-radius: 1rem; border-top-left-radius: 2px;
    box-shadow: var(--shadow-sm);
}

.message.sent .msg-content {
    background: var(--primary); color: white;
    border-top-left-radius: 1rem; border-top-right-radius: 2px;
}

.msg-time { font-size: 0.65rem; color: var(--text-lighter); margin-top: 4px; display: block; }

/* Input Area */
.input-area { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: 1rem; align-items: center; }
.message-input {
    flex: 1; padding: 0.75rem 1.25rem;
    border: 1px solid var(--border); border-radius: 1.5rem;
    outline: none; background: var(--lighter);
}

.send-btn {
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--primary); color: white; border: none;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* Mobile */
.mobile-toggle, .mobile-info-toggle { display: none; cursor: pointer; padding: 0.5rem; }
.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 45; backdrop-filter: blur(2px);
}

@media (max-width: 1024px) {
    .sidebar-right { position: absolute; right: -100%; top: 0; bottom: 0; }
    .sidebar-right.active { right: 0; box-shadow: -5px 0 20px rgba(0,0,0,0.1); }
    .mobile-info-toggle { display: block; }
}

@media (max-width: 768px) {
    .gochat-container { margin: 0; height: calc(100vh - 72px); border-radius: 0; }
    .sidebar-left { position: absolute; left: -100%; top: 0; bottom: 0; width: 85%; max-width: 320px; }
    .sidebar-left.active { left: 0; box-shadow: 5px 0 20px rgba(0,0,0,0.1); }
    .mobile-toggle { display: block; }
}

/* Utilitários */
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Modais - Professional Look */
.chat-modal {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center;
    padding: 1rem;
}
.chat-modal-content {
    background: var(--white); width: 100%; max-width: 450px;
    padding: 2rem; border-radius: 1.5rem; box-shadow: var(--shadow-xl);
    animation: modalFadeUp 0.3s ease-out;
}
/* Dark Mode Support (Consolidated with style.css) */
html[data-theme='escuro'] body { background-color: var(--light); }
html[data-theme='escuro'] .gochat-container { background: var(--white); border-color: var(--border); }
html[data-theme='escuro'] .sidebar-left, 
html[data-theme='escuro'] .sidebar-right { background: var(--light) !important; border-color: var(--border); }
html[data-theme='escuro'] .sidebar-header { background: var(--white) !important; border-bottom-color: var(--border); color: var(--text); }
html[data-theme='escuro'] .search-input { background: var(--light) !important; border-color: var(--border) !important; color: var(--text) !important; }
html[data-theme='escuro'] .chat-tabs { border-bottom-color: var(--border); background: var(--light); }
html[data-theme='escuro'] .tab-btn { color: var(--text-lighter); }
html[data-theme='escuro'] .tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
html[data-theme='escuro'] .section-title { color: var(--text-lighter); }
html[data-theme='escuro'] .conversation-item:hover { background: var(--lighter); }
html[data-theme='escuro'] .conversation-item.active { background: var(--primary-light); color: var(--primary); border-left-color: var(--primary); }
html[data-theme='escuro'] .item-name { color: var(--text); }
html[data-theme='escuro'] .main-chat { background: var(--light); }
html[data-theme='escuro'] .chat-header { background: var(--white); border-bottom-color: var(--border); color: var(--text); }
html[data-theme='escuro'] .messages-area { background: var(--light); }
html[data-theme='escuro'] .msg-content { background: var(--white); color: var(--text); border: 1px solid var(--border); }
html[data-theme='escuro'] .message.sent .msg-content { background: var(--primary); color: var(--pure-white); border: none; }
html[data-theme='escuro'] .msg-info { color: var(--text-lighter); }
html[data-theme='escuro'] .input-area { background: var(--white); border-top-color: var(--border); }
html[data-theme='escuro'] .message-input { background: var(--light) !important; border-color: var(--border) !important; color: var(--text) !important; }
html[data-theme='escuro'] .chat-modal-content { background: var(--white); color: var(--text); }
html[data-theme='escuro'] .form-control { background: var(--light); border-color: var(--border); color: var(--text); }
html[data-theme='escuro'] .sidebar-overlay { background: rgba(0,0,0,0.85); }
html[data-theme='escuro'] .btn-icon { color: var(--text-lighter); }
html[data-theme='escuro'] .btn-icon:hover { color: var(--primary); background: rgba(255,255,255,0.05); }

/* Fixed Sidebar active states for better mobile feel */
.sidebar-left.active, .sidebar-right.active {
    z-index: 100 !important;
}

/* Calendar Event Styles */
.calendar-event.meeting {
    background: #4a90e2;
    color: #fff;
    border-left: 4px solid #357ab7;
}

/* Help Modal Styles */
.help-icon {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary, #0052CC), #003D99);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    font-size: 1.5rem;
    box-shadow: 0 0 15px rgba(0, 82, 204, 0.5), 0 4px 12px rgba(0, 82, 204, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
    font-family: 'Montserrat', 'Inter', sans-serif;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    appearance: none;
}

.help-icon-mark {
    display: block;
    color: #ffffff !important;
    line-height: 1;
    transform: translateY(-1px);
    -webkit-text-fill-color: #ffffff !important;
}

.help-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 82, 204, 0.8), 0 6px 16px rgba(0, 82, 204, 0.6);
    filter: brightness(1.2);
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-content {
    background: var(--white);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

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

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

.modal-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    padding: 2rem;
}

.help-section {
    margin-bottom: 2rem;
}

.help-section h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin: 0 0 0.75rem 0;
    font-weight: 700;
}

.help-section p {
    color: var(--text);
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.help-section ul {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
    color: var(--text);
    line-height: 1.6;
}

.help-section li {
    margin-bottom: 0.5rem;
}

.help-tip {
    background: linear-gradient(135deg, rgba(0, 82, 204, 0.05), rgba(255, 107, 53, 0.05));
    border-left: 4px solid var(--primary);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.help-tip strong {
    color: var(--primary);
}

@media (max-width: 768px) {
    .help-icon {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-header {
        padding: 1.5rem;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    .modal-body {
        padding: 1.5rem;
    }
}

/* Menu Notification Dropdown Styles */
.notification-dropdown {
    position: absolute;
    top: 60px;
    right: 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 350px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--lighter);
    border-radius: 12px 12px 0 0;
}

.notification-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.notification-content {
    padding: 0;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
}

.notification-item:hover {
    background: var(--lighter);
}

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

.notification-item-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.notification-item-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.notification-item-due {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: #FFE5E5;
    color: #721C24;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.notification-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
}

.notification-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.notification-link:hover {
    text-decoration: underline;
}

/* Form and Detail Views Custom Styles (Centralized) */

/* Styles from alt_contato.php */
.animate-fade-in { animation: fadeIn 0.3s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.btn-xs { padding: 4px 8px; font-size: 10px; }

/* --- Premium Textarea --- */
.textarea-wrapper { position: relative; }
.premium-textarea {
    min-height: 140px;
    resize: vertical;
    padding: 1.25rem 1.25rem 2.5rem !important;
    border: 2px solid var(--border) !important;
    border-radius: 16px !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    background: linear-gradient(to bottom, #ffffff, #fafbff) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02) !important;
    width: 100%;
}
.premium-textarea::placeholder { font-style: italic; opacity: 0.6; }
.premium-textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.08), inset 0 2px 4px rgba(0,0,0,0.02) !important;
    outline: none !important;
    transform: translateY(-1px);
}
.textarea-wrapper .textarea-icon {
    position: absolute;
    bottom: 0.7rem;
    left: 0.85rem;
    pointer-events: none;
    font-size: 18px;
    color: var(--dark-lighter, #94a3b8);
    opacity: 0.3;
    transition: opacity 0.25s ease;
    user-select: none;
}
.textarea-wrapper:focus-within .textarea-icon { opacity: 0.55; }
.textarea-wrapper .textarea-counter {
    position: absolute;
    bottom: 0.65rem;
    right: 0.85rem;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dark-lighter, #94a3b8);
    pointer-events: none;
    transition: color 0.2s ease;
    user-select: none;
}
.textarea-wrapper .textarea-counter.near-limit { color: var(--danger, #dc3545); }

/* Styles from alt_crm.php */
.animate-fade-in { animation: fadeIn 0.3s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.btn-xs { padding: 4px 8px; font-size: 10px; }

.premium-textarea {
    min-height: 120px;
    resize: vertical;
    padding: 1.25rem !important;
    border: 2px solid var(--border) !important;
    border-radius: 16px !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    background: var(--white) !important;
    transition: all 0.3s ease !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02) !important;
}

.premium-textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(0, 82, 204, 0.1), inset 0 2px 4px rgba(0,0,0,0.02) !important;
    outline: none !important;
}

/* Styles from alt_empresa.php */
.animate-fade-in { animation: fadeIn 0.3s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.btn-xs { padding: 4px 8px; font-size: 10px; }

/* --- Premium Textarea --- */
.textarea-wrapper { position: relative; }
.premium-textarea {
    min-height: 140px;
    resize: vertical;
    padding: 1.25rem 1.25rem 2.5rem !important;
    border: 2px solid var(--border) !important;
    border-radius: 16px !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    background: linear-gradient(to bottom, #ffffff, #fafbff) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02) !important;
    width: 100%;
}
.premium-textarea::placeholder { font-style: italic; opacity: 0.6; }
.premium-textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.08), inset 0 2px 4px rgba(0,0,0,0.02) !important;
    outline: none !important;
    transform: translateY(-1px);
}
.textarea-wrapper .textarea-icon {
    position: absolute;
    bottom: 0.7rem;
    left: 0.85rem;
    pointer-events: none;
    font-size: 18px;
    color: var(--dark-lighter, #94a3b8);
    opacity: 0.3;
    transition: opacity 0.25s ease;
    user-select: none;
}
.textarea-wrapper:focus-within .textarea-icon { opacity: 0.55; }
.textarea-wrapper .textarea-counter {
    position: absolute;
    bottom: 0.65rem;
    right: 0.85rem;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dark-lighter, #94a3b8);
    pointer-events: none;
    transition: color 0.2s ease;
    user-select: none;
}
.textarea-wrapper .textarea-counter.near-limit { color: var(--danger, #dc3545); }

/* Styles from config_integracao.php */
.page-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
    }

    .page-header h1 {
        font-size: 2rem;
        color: var(--text);
        margin: 0;
        font-weight: 700;
    }

    .page-header p {
        color: var(--text-light);
        margin: 0.5rem 0 0 0;
    }



    .btn-test {
        background: #D1ECF1;
        color: #0C5460;
    }

    .btn-test:hover {
        background: #BEE5EB;
    }

    .btn-small {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .form-card {
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 2rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        max-width: 600px;
    }

    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-group label {
        display: block;
        font-weight: 600;
        color: var(--text);
        margin-bottom: 0.5rem;
        font-size: 0.95rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 0.75rem;
        border: 1px solid var(--border);
        border-radius: 8px;
        font-family: inherit;
        font-size: 0.95rem;
        transition: all 0.2s ease;
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
    }

    .form-group small {
        display: block;
        margin-top: 0.5rem;
        color: var(--text-light);
        font-size: 0.85rem;
    }

    .form-actions {
        display: flex;
        gap: 1rem;
        margin-top: 2rem;
    }

    .alert {
        padding: 1rem;
        border-radius: 8px;
        margin-bottom: 1.5rem;
        border: 1px solid;
    }

    .alert-success {
        background-color: #D4EDDA;
        color: #155724;
        border-color: #C3E6CB;
    }

    .alert-danger {
        background-color: #F8D7DA;
        color: #721C24;
        border-color: #F5C6CB;
    }

    .alert-info {
        background-color: #D1ECF1;
        color: #0C5460;
        border-color: #BEE5EB;
    }

    .info-box {
        background: #E7F3FF;
        border-left: 4px solid var(--primary);
        padding: 1rem;
        border-radius: 4px;
        margin-bottom: 1.5rem;
        font-size: 0.9rem;
    }

    .info-box strong {
        color: var(--primary);
    }

    .auth-type-info {
        background: var(--lighter);
        padding: 1rem;
        border-radius: 8px;
        margin-top: 0.5rem;
        font-size: 0.85rem;
        color: var(--text-light);
    }

    .conditional-field {
        display: none;
    }

    .conditional-field.show {
        display: block;
    }

    .test-button-group {
        display: flex;
        gap: 1rem;
        margin-top: 1rem;
    }

    .test-button-group .btn {
        flex: 1;
        text-align: center;
    }

    @media (max-width: 768px) {
        .page-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 1rem;
        }

        .page-header h1 {
            font-size: 1.5rem;
        }

        .form-card {
            padding: 1.5rem;
        }

        .form-actions {
            flex-direction: column;
        }

        .btn {
            width: 100%;
            text-align: center;
        }

        .test-button-group {
            flex-direction: column;
        }
    }

/* Styles from detalhe_fluxo.php */
body {
                font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
                background: #f5f5f5;
                margin: 0;
                padding: 20px;
            }
            .error-container {
                max-width: 600px;
                margin: 50px auto;
                background: white;
                padding: 2rem;
                border-radius: 8px;
                box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            }
            .error-title {
                color: #721C24;
                font-size: 1.5rem;
                margin-bottom: 1rem;
            }
            .error-message {
                background: #F8D7DA;
                color: #721C24;
                padding: 1rem;
                border-radius: 6px;
                border: 1px solid #F5C6CB;
                margin-bottom: 1.5rem;
                line-height: 1.6;
            }
            .back-link {
                display: inline-block;
                padding: 0.75rem 1.5rem;
                background: #0052CC;
                color: white;
                text-decoration: none;
                border-radius: 6px;
                margin-top: 1rem;
            }
            .back-link:hover {
                background: #0043A4;
            }

/* Styles from detalhe_fluxo.php */
/* ===== ESTILOS SCOPED: detalhe_fluxo.php ===== */

/* --- Barra de ações do fluxo --- */
.fluxo-actions-bar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

/* --- Cards de etapa --- */
.etapa-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm, 0 1px 4px rgba(0,0,0,.06));
    transition: box-shadow 0.2s;
}
.etapa-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.etapa-card.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-light);
    border-style: dashed;
}
.etapa-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.etapa-title h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.25rem;
}
.etapa-title p {
    font-size: 0.82rem;
    color: var(--text-light);
    margin: 0;
}
.etapa-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: 1rem;
}

/* --- Stats da etapa --- */
.etapa-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding: 0.6rem 1rem;
    background: var(--lighter, #F8FAFF);
    border-radius: 8px;
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-light);
}
.stat-badge {
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* --- Progress bar --- */
.progress-container {
    margin-bottom: 1.25rem;
}
.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.4rem;
    font-weight: 600;
}
.progress-bar-container {
    height: 6px;
    background: var(--lighter, #F0F4FF);
    border-radius: 99px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 99px;
    transition: width 0.4s ease;
}

/* --- Lista de tarefas --- */
.tarefas-container {
    margin-top: 1rem;
}
.tarefas-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 40px;
}
.tarefas-list.empty-state {
    text-align: center;
    color: var(--text-light);
    font-size: 0.82rem;
    padding: 0.75rem 0;
}
.tarefa-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    cursor: grab;
    transition: background 0.15s, box-shadow 0.15s;
}
.tarefa-item:hover {
    background: var(--lighter, #F8FAFF);
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.tarefa-info { flex: 1; min-width: 0; }
.tarefa-link {
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.tarefa-link:hover { color: var(--primary); text-decoration: underline; }
.tarefa-meta {
    font-size: 0.72rem;
    color: var(--text-light);
    margin-top: 2px;
}
.tarefa-status {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 99px;
    text-transform: capitalize;
    white-space: nowrap;
    margin-left: 0.75rem;
    background: var(--lighter);
    color: var(--text-light);
}
.tarefa-status.status-concluida { background: #D1FAE5; color: #065F46; }
.tarefa-status.status-em_andamento { background: #DBEAFE; color: #1D4ED8; }
.tarefa-status.status-pendente { background: #FEF9C3; color: #92400E; }

/* --- Botões de ação das tarefas --- */
.tarefas-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}
.btn-add-tarefa,
.btn-associate-tarefa {
    flex: 1;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-family: inherit;
}
.btn-add-tarefa:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-associate-tarefa:hover { background: var(--lighter); }

/* --- Drag & drop --- */
.sortable-ghost { opacity: 0.35; }
.drag-over { outline: 2px dashed var(--primary); border-radius: 8px; }

/* === MODAL === */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.2s ease;
}
.modal.show {
    display: flex;
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.modal-content {
    background: var(--white);
    border-radius: 4px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.25s ease;
}
@keyframes modalSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}
.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
    padding: 0.25rem;
    border-radius: 6px;
    transition: background 0.15s;
}
.modal-close:hover { background: var(--lighter); color: var(--text); }
.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 60vh;
}
.form-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* KPI: evitar overflow de texto longo (ex: PLANEJAMENTO) */
.kpi-value {
    font-size: clamp(0.9rem, 2vw, 1.6rem);
    word-break: break-word;
    line-height: 1.25;
    margin-top: auto;
}

/* Styles from detalhe_oportunidade.php */
.animate-fade-in { animation: fadeIn 0.3s ease-out; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* --- Premium Textarea --- */
.textarea-wrapper { position: relative; }
.premium-textarea {
    min-height: 140px;
    resize: vertical;
    padding: 1.25rem 1.25rem 2.5rem !important;
    border: 2px solid var(--border) !important;
    border-radius: 16px !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    background: linear-gradient(to bottom, #ffffff, #fafbff) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02) !important;
    width: 100%;
}
.premium-textarea::placeholder { font-style: italic; opacity: 0.6; }
.premium-textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.08), inset 0 2px 4px rgba(0,0,0,0.02) !important;
    outline: none !important;
    transform: translateY(-1px);
}
.textarea-wrapper .textarea-icon {
    position: absolute;
    bottom: 0.7rem;
    left: 0.85rem;
    pointer-events: none;
    font-size: 18px;
    color: var(--dark-lighter, #94a3b8);
    opacity: 0.3;
    transition: opacity 0.25s ease;
    user-select: none;
}
.textarea-wrapper:focus-within .textarea-icon { opacity: 0.55; }
.textarea-wrapper .textarea-counter {
    position: absolute;
    bottom: 0.65rem;
    right: 0.85rem;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dark-lighter, #94a3b8);
    pointer-events: none;
    transition: color 0.2s ease;
    user-select: none;
}
.textarea-wrapper .textarea-counter.near-limit { color: var(--danger, #dc3545); }

/* Styles from gerenciar_ciclicas.php */
.container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 2rem;
    }

    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
    }

    .header h1 {
        font-size: 2rem;
        color: var(--text);
        margin: 0;
    }



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

    .ciclica-card {
        background: var(--white);
        border-radius: 12px;
        padding: 1.5rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        transition: all 0.2s ease;
    }

    .ciclica-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    }

    .ciclica-titulo {
        font-weight: 600;
        color: var(--text);
        margin: 0 0 0.5rem 0;
        font-size: 1.1rem;
    }

    .ciclica-meta {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin: 1rem 0;
        font-size: 0.9rem;
        color: var(--text-light);
    }

    .ciclica-meta span {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .badge {
        display: inline-block;
        padding: 0.25rem 0.75rem;
        background: var(--primary);
        color: white;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 600;
    }

    .badge-ativo {
        background: #28a745;
    }

    .badge-inativo {
        background: #6c757d;
    }

    .ciclica-actions {
        display: flex;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .btn-small {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        border-radius: 6px;
        flex: 1;
        text-align: center;
    }

    .btn-success {
        background: #28a745;
        color: white;
    }

    .btn-danger {
        background: #dc3545;
        color: white;
    }

    .btn-info {
        background: #17a2b8;
        color: white;
    }

    .empty-state {
        text-align: center;
        padding: 3rem;
        color: var(--text-light);
    }

    .empty-state p {
        margin: 0;
        font-size: 1.1rem;
    }

    @media (max-width: 768px) {
        .container {
            padding: 1rem;
        }

        .header {
            flex-direction: column;
            align-items: flex-start;
            gap: 1rem;
        }

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

        .ciclica-actions {
            flex-direction: column;
        }

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

/* Styles from logs_integracao.php */
.page-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
    }

    .page-header h1 {
        font-size: 2rem;
        color: var(--text);
        margin: 0;
        font-weight: 700;
    }

    .page-header p {
        color: var(--text-light);
        margin: 0.5rem 0 0 0;
    }

    .page-header-actions {
        display: flex;
        gap: 0.5rem;
    }



    .btn-small {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .alert {
        padding: 1rem;
        border-radius: 8px;
        margin-bottom: 1.5rem;
        border: 1px solid;
    }

    .alert-success {
        background-color: #D4EDDA;
        color: #155724;
        border-color: #C3E6CB;
    }

    .alert-danger {
        background-color: #F8D7DA;
        color: #721C24;
        border-color: #F5C6CB;
    }

    .filtros-card {
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 1.5rem;
        margin-bottom: 2rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .filtros-row {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .form-group {
        margin-bottom: 0;
    }

    .form-group label {
        display: block;
        font-weight: 600;
        color: var(--text);
        margin-bottom: 0.5rem;
        font-size: 0.95rem;
    }

    .form-group input,
    .form-group select {
        width: 100%;
        padding: 0.75rem;
        border: 1px solid var(--border);
        border-radius: 8px;
        font-family: inherit;
        font-size: 0.95rem;
        transition: all 0.2s ease;
    }

    .form-group input:focus,
    .form-group select:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
    }

    .filtros-actions {
        display: flex;
        gap: 0.5rem;
    }

    .log-item {
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 1.5rem;
        margin-bottom: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .log-header {
        display: flex;
        justify-content: space-between;
        align-items: start;
        margin-bottom: 1rem;
    }

    .log-info {
        flex: 1;
    }

    .log-status {
        display: inline-block;
        padding: 0.4rem 0.8rem;
        border-radius: 6px;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
    }

    .status-sucesso {
        background: #D4EDDA;
        color: #155724;
    }

    .status-erro {
        background: #F8D7DA;
        color: #721C24;
    }

    .status-pendente {
        background: #FFF3CD;
        color: #856404;
    }

    .status-processando {
        background: #D1ECF1;
        color: #0C5460;
    }

    .log-meta {
        display: flex;
        gap: 2rem;
        margin-top: 0.5rem;
        font-size: 0.85rem;
        color: var(--text-light);
    }

    .log-meta-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .log-mensagem {
        background: var(--lighter);
        padding: 1rem;
        border-radius: 8px;
        margin-top: 1rem;
        font-size: 0.9rem;
        color: var(--text);
        border-left: 4px solid var(--primary);
    }

    .log-mensagem.erro {
        border-left-color: #DC3545;
        background: #FFF5F5;
    }

    .log-actions {
        display: flex;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .btn-retry {
        background: #D1ECF1;
        color: #0C5460;
        border: none;
        padding: 0.5rem 1rem;
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.85rem;
        transition: all 0.2s ease;
    }

    .btn-retry:hover {
        background: #B8DAFF;
    }

    .btn-details {
        background: var(--lighter);
        color: var(--primary);
        border: none;
        padding: 0.5rem 1rem;
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.85rem;
        transition: all 0.2s ease;
    }

    .btn-details:hover {
        background: var(--light);
    }

    .paginacao {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 2rem;
    }

    .paginacao a,
    .paginacao span {
        padding: 0.5rem 0.75rem;
        border: 1px solid var(--border);
        border-radius: 6px;
        text-decoration: none;
        color: var(--text);
        transition: all 0.2s ease;
    }

    .paginacao a:hover {
        background: var(--lighter);
    }

    .paginacao .ativa {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }

    .empty-state {
        text-align: center;
        padding: 2rem;
        color: var(--text-light);
    }

    @media (max-width: 768px) {
        .page-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 1rem;
        }

        .page-header h1 {
            font-size: 1.5rem;
        }

        .filtros-row {
            grid-template-columns: 1fr;
        }

        .log-meta {
            flex-direction: column;
            gap: 0.5rem;
        }

        .log-actions {
            flex-direction: column;
        }

        .btn {
            width: 100%;
            text-align: center;
        }
    }

/* Styles from mapeamentos_integracao.php */
.page-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
    }

    .page-header h1 {
        font-size: 2rem;
        color: var(--text);
        margin: 0;
        font-weight: 700;
    }

    .page-header p {
        color: var(--text-light);
        margin: 0.5rem 0 0 0;
    }

    .page-header-actions {
        display: flex;
        gap: 0.5rem;
    }



    .btn-small {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .alert {
        padding: 1rem;
        border-radius: 8px;
        margin-bottom: 1.5rem;
        border: 1px solid;
    }

    .alert-success {
        background-color: #D4EDDA;
        color: #155724;
        border-color: #C3E6CB;
    }

    .alert-danger {
        background-color: #F8D7DA;
        color: #721C24;
        border-color: #F5C6CB;
    }

    .info-card {
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 1.5rem;
        margin-bottom: 2rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .form-card {
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 1.5rem;
        margin-bottom: 2rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .form-row {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-group label {
        display: block;
        font-weight: 600;
        color: var(--text);
        margin-bottom: 0.5rem;
        font-size: 0.95rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 0.75rem;
        border: 1px solid var(--border);
        border-radius: 8px;
        font-family: inherit;
        font-size: 0.95rem;
        transition: all 0.2s ease;
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
    }

    .form-actions {
        display: flex;
        gap: 1rem;
        margin-top: 1rem;
    }

    .mapeamento-item {
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 1.5rem;
        margin-bottom: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .mapeamento-header {
        display: flex;
        justify-content: space-between;
        align-items: start;
        margin-bottom: 1rem;
    }

    .mapeamento-info {
        flex: 1;
    }

    .mapeamento-campos {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 0.5rem;
    }

    .campo {
        background: var(--lighter);
        padding: 0.5rem 1rem;
        border-radius: 6px;
        font-family: monospace;
        font-size: 0.9rem;
        font-weight: 600;
    }

    .seta {
        color: var(--primary);
        font-weight: bold;
    }

    .tipo-sync {
        display: inline-block;
        padding: 0.25rem 0.75rem;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
    }

    .sync-bidirecional {
        background: #D1ECF1;
        color: #0C5460;
    }

    .sync-local-remoto {
        background: #D4EDDA;
        color: #155724;
    }

    .sync-remoto-local {
        background: #FFF3CD;
        color: #856404;
    }

    .transformacao-info {
        background: var(--lighter);
        padding: 0.75rem;
        border-radius: 6px;
        margin-top: 0.5rem;
        font-size: 0.85rem;
        color: var(--text-light);
        font-family: monospace;
    }

    .mapeamento-actions {
        display: flex;
        gap: 0.5rem;
    }

    .btn-edit {
        background: #D1ECF1;
        color: #0C5460;
        border: none;
        padding: 0.5rem 1rem;
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.85rem;
        transition: all 0.2s ease;
    }

    .btn-edit:hover {
        background: #B8DAFF;
    }

    .btn-delete {
        background: #F8D7DA;
        color: #721C24;
        border: none;
        padding: 0.5rem 1rem;
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.85rem;
        transition: all 0.2s ease;
    }

    .btn-delete:hover {
        background: #F5C6CB;
    }

    .checkbox-group {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .checkbox-group input[type="checkbox"] {
        width: auto;
        margin: 0;
    }

    .empty-state {
        text-align: center;
        padding: 2rem;
        color: var(--text-light);
    }

    @media (max-width: 768px) {
        .page-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 1rem;
        }

        .page-header h1 {
            font-size: 1.5rem;
        }

        .form-row {
            grid-template-columns: 1fr;
        }

        .mapeamento-campos {
            flex-direction: column;
            align-items: flex-start;
        }

        .mapeamento-actions {
            flex-direction: column;
        }

        .btn {
            width: 100%;
            text-align: center;
        }
    }
}

/* System Footer */
.system-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 2.5rem;
    background: transparent;
    border-top: 1px solid var(--border) !important;
    color: var(--text-lighter);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    margin-top: auto;
    white-space: nowrap;
    width: 100% !important;
    box-sizing: border-box;
}
.system-footer > * {
    flex: 1;
}
.system-footer > *:nth-child(1) {
    text-align: left;
}
.system-footer > *:nth-child(2) {
    text-align: center;
}
.system-footer > *:nth-child(3) {
    text-align: right;
}
.system-footer a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    opacity: 0.8;
}
.system-footer a:hover {
    color: var(--primary);
    opacity: 1;
}
@media (max-width: 768px) {
    .system-footer {
        padding: 0.6rem 1rem;
    }
}

/* GoIA Insights Card (AI Theme) */
.goia-insights-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.04), rgba(33, 82, 255, 0.04)) !important;
    border: 1px solid rgba(139, 92, 246, 0.18) !important;
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.goia-insights-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #8b5cf6, #2152ff);
}

.goia-insights-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(139, 92, 246, 0.12), 0 8px 8px -6px rgba(33, 82, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.3) !important;
}

.goia-insights-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #8b5cf6, #2152ff) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
    flex-shrink: 0;
}

.goia-insights-icon span {
    font-size: 1.5rem;
    color: #ffffff !important;
}

/* Dark Mode Support for GoIA Card */
html[data-theme='escuro'] .goia-insights-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(33, 82, 255, 0.08)) !important;
    border-color: rgba(139, 92, 246, 0.25) !important;
}


/* ==========================================================================
   Google Stitch Dashboard Layout Styles
   ========================================================================== */
.dashboard-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.dashboard-date-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.dashboard-date-widget {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.2rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.dashboard-date-widget span {
    font-size: 1.1rem;
    color: var(--primary);
}

/* Sidebar overrides */
.sidebar-action-container {
    padding: 0 1.5rem 1rem 1.5rem;
}
.sidebar-btn-new-task {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--primary) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 4px !important;
    padding: 0.75rem !important;
    box-shadow: 0 4px 12px rgba(115, 41, 147, 0.2) !important;
    transition: all 0.2s ease !important;
    text-decoration: none;
}
.sidebar-btn-new-task:hover {
    background: var(--primary-hover) !important;
}
.sidebar-badge-new {
    background: var(--primary);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}

/* Topbar overrides */
.topbar-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: 1.5rem;
}
.topbar-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s ease;
}
.topbar-nav a:hover,
.topbar-nav a.active {
    color: var(--primary);
}
.topbar-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

.topbar-profile {
    width: 38px;
    height: 38px;
    border-radius: 9999px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: border-color 0.2s ease;
    margin-left: 0.5rem;
}
.topbar-profile:hover {
    border-color: var(--primary);
}
.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
}

/* Plan card custom style */
.plan-metric-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}
.plan-metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.plan-metric-header h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    margin: 0;
}
.plan-badge-premium {
    background: #ccecd7;
    color: #006d37;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 9999px;
}
.plan-active-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: #006d37;
}
.plan-progress-container {
    background: var(--lighter);
    border-radius: 9999px;
    height: 8px;
    overflow: hidden;
    margin: 1rem 0 0.5rem 0;
}
.plan-progress-fill {
    background: var(--primary);
    height: 100%;
    border-radius: 9999px;
}
.plan-progress-text {
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 1rem;
}
.plan-btn-outline {
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.plan-btn-outline:hover {
    background: var(--primary);
    color: #ffffff;
}

/* Metric KPI card updates */
.metric-kpi-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
    position: relative;
}
.metric-kpi-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.metric-kpi-icon-wrap {
    color: var(--text-light);
}
.metric-kpi-icon-wrap span {
    font-size: 20px;
}
.metric-kpi-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    margin: 0;
}
.metric-kpi-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0.75rem 0;
}
.metric-kpi-footer {
    font-size: 12px;
    color: var(--text-light);
}

/* Middle Row Grid (3 Columns) */
.middle-row-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
@media (max-width: 1024px) {
    .middle-row-grid {
        grid-template-columns: 1fr;
    }
}

/* Flow analysis chart */
.chart-container-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.5rem;
}
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.chart-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.chart-period-badge {
    background: var(--lighter);
    color: var(--text-light);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}
.flow-bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 140px;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}
.flow-bar-col {
    width: 12%;
    border-radius: 4px 4px 0 0;
    transition: opacity 0.2s ease;
}
.flow-bar-col.color-light { background: #f8d8ff; }
.flow-bar-col.color-mid { background: #ecb2ff; }
.flow-bar-col.color-dark { background: #732993; }
.flow-bar-col:hover {
    opacity: 0.85;
}
.flow-metrics-row {
    display: flex;
    justify-content: space-between;
    text-align: center;
    margin-top: 1rem;
}
.flow-metric-item span {
    display: block;
    font-size: 11px;
    color: var(--text-light);
}
.flow-metric-item strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    display: block;
    margin-top: 4px;
}

/* Newsletter Card */
.newsletter-card {
    background: linear-gradient(135deg, #e67e22, #732993);
    border-radius: 4px;
    padding: 2.25rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #ffffff;
    box-shadow: var(--shadow-md);
}
.newsletter-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
}
.newsletter-card p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0 0 1.5rem 0;
    line-height: 1.4;
}
.newsletter-input-wrap {
    width: 100%;
    margin-bottom: 0.75rem;
}
.newsletter-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 4px;
    background: #ffffff;
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    text-align: center;
}
.newsletter-btn {
    width: 100%;
    padding: 0.75rem;
    background: #ffffff;
    color: #732993;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.newsletter-btn:hover {
    opacity: 0.95;
}

/* Profile Widget Card */
.profile-widget-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.profile-widget-avatar-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 1.25rem;
}
.profile-widget-img {
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    object-fit: cover;
    border: 2px solid var(--primary-light);
}
.profile-widget-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background-color: #006d37;
    border: 2px solid #ffffff;
    border-radius: 9999px;
}
.profile-widget-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.25rem 0;
}
.profile-widget-email {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0 0 1.5rem 0;
}
.profile-widget-divider {
    width: 100%;
    height: 1px;
    background-color: var(--border);
    margin-bottom: 1.25rem;
}
.profile-details-row {
    display: flex;
    width: 100%;
    justify-content: space-between;
    text-align: center;
}
.profile-detail-col span {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.profile-detail-col strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-top: 4px;
}

/* Recent Projects Table */
.recent-projects-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 2rem;
    overflow: hidden;
}
.recent-projects-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}
.recent-projects-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.recent-projects-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}
.recent-projects-link:hover {
    text-decoration: underline;
}
.projects-table-wrap {
    overflow-x: auto;
}
.projects-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.projects-table th {
    background: var(--light);
    padding: 1rem 1.5rem;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}
.projects-table td {
    padding: 1.2rem 1.5rem;
    font-size: 0.9rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}
.projects-table tr:last-child td {
    border-bottom: none;
}
.projects-table tr:hover td {
    background: var(--light);
}
.table-status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.table-status-pill.completed {
    background: #ccecd7;
    color: #006d37;
}
.table-status-pill.delayed {
    background: #ffdad6;
    color: #ba1a1a;
}
.table-status-pill.planning {
    background: #cce5ff;
    color: #00517c;
}
.table-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: var(--text-light);
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
}
.table-action-btn:hover {
    color: var(--primary);
}
.table-action-btn.delete:hover {
    color: var(--error);
}

.goia-insights-wrapper {
    width: 100%;
    margin-top: 2rem;
}
.goia-insights-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.goia-insights-text-wrap {
    flex: 1;
}
.goia-insights-title {
    margin: 0;
    font-size: 14px;
    font-weight: 900;
    color: var(--text);
}
.goia-insights-description {
    margin: 4px 0 0 0;
    font-size: 11px;
    color: var(--text-light);
}

/* ==========================================================================
   Modern Checklists Page Styles (checklists.php)
   ========================================================================== */
.checklists-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
@media (max-width: 768px) {
    .checklists-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}
.checklists-title-container h1 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
}
.checklists-title-container h1 span {
    font-size: 2.2rem;
    color: var(--primary);
}
.checklists-subtitle {
    margin: 4px 0 0 0;
    font-size: 0.875rem;
    color: var(--text-light);
}
.checklists-btn-new {
    background: var(--primary);
    color: #ffffff;
    border: none;
    font-weight: 700;
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s ease;
}
.checklists-btn-new:hover {
    background: var(--primary-hover);
}

/* Success / Error Alerts */
.checklists-alert-container {
    background: #eafaf1;
    border: 1px solid #ccecd7;
    border-left: 4px solid #006d37;
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #006d37;
    font-size: 0.9rem;
    font-weight: 600;
    transition: opacity 0.3s ease;
}
.checklists-alert-container.error {
    background: #fdf2f2;
    border: 1px solid #fde8e8;
    border-left: 4px solid #ba1a1a;
    color: #ba1a1a;
}
.checklists-alert-container span {
    font-size: 20px;
}

/* Search bar styling */
.checklists-filter-container {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
}
.checklists-search-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}
.checklists-search-wrapper span {
    color: var(--text-light);
    font-size: 22px;
}
.checklists-search-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    width: 100%;
    text-transform: uppercase;
}
.checklists-search-input::placeholder {
    color: var(--text-lighter);
}

/* Grid & Cards layout */
.checklists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.checklists-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}
.checklists-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}
.checklists-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.checklists-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: #f8d8ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}
.checklists-icon-box span {
    font-size: 20px;
}
.checklists-card-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.checklists-card-actions button,
.checklists-card-actions a {
    background: transparent;
    border: none;
    color: var(--text-light);
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease, background 0.2s ease;
}
.checklists-card-actions button:hover,
.checklists-card-actions a:hover {
    background: var(--light);
    color: var(--primary);
}
.checklists-card-actions button.delete:hover {
    color: var(--error);
    background: rgba(186, 26, 26, 0.05);
}

.checklists-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
}
.checklists-card-date {
    font-size: 11px;
    color: var(--text-light);
    margin: 0 0 1.5rem 0;
}

.checklists-progress-container {
    margin-top: auto;
}
.checklists-progress-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.checklists-progress-bar-bg {
    background: var(--light);
    border-radius: 9999px;
    height: 6px;
    overflow: hidden;
}
.checklists-progress-bar-fill {
    background: var(--primary);
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s ease;
}

/* Modal Overlay & Card */
.checklists-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(25, 28, 29, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.checklists-modal-overlay.hidden {
    display: none;
}
.checklists-modal-card {
    background: var(--white);
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    position: relative;
}
.checklists-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.checklists-modal-header-icon-box {
    width: 40px;
    height: 40px;
    background: #f8d8ff;
    color: var(--primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
.checklists-modal-header-title-wrap {
    flex: 1;
    margin-left: 1rem;
}
.checklists-modal-header-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
    text-transform: uppercase;
}
.checklists-modal-header-subtitle {
    margin: 2px 0 0 0;
    font-size: 0.8rem;
    color: var(--text-light);
}
.checklists-modal-close-btn {
    border: none;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.checklists-modal-close-btn:hover {
    color: var(--error);
}

.checklists-modal-form {
    display: flex;
    flex-direction: column;
}
.checklists-modal-body {
    padding: 2rem;
}
.checklists-form-group {
    display: flex;
    flex-direction: column;
}
.checklists-form-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}
.checklists-form-input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.95rem;
    outline: none;
    text-transform: uppercase;
}
.checklists-form-input:focus {
    border-color: var(--primary);
}

.checklists-modal-footer {
    padding: 1.25rem 2rem;
    background: var(--light);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}
.checklists-btn-cancel {
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text-light);
    font-weight: 700;
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
}
.checklists-btn-cancel:hover {
    background: var(--light);
}
.checklists-btn-submit {
    background: var(--primary);
    color: #ffffff;
    border: none;
    font-weight: 700;
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
}
.checklists-btn-submit:hover {
    background: var(--primary-hover);
}

/* ==========================================================================
   Restored Dashboard Layout Classes (dashboard.php)
   ========================================================================== */
.dashboard-section-wrapper {
    margin-bottom: 2.5rem;
}
.dashboard-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}
.dashboard-section-header.no-border {
    border-bottom: none;
}
.dashboard-section-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.dashboard-section-icon {
    font-size: 1.6rem;
    color: var(--primary);
}
.dashboard-section-title {
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--text);
    margin: 0;
    letter-spacing: 0.05em;
}
.dashboard-section-subtitle {
    font-size: 0.68rem;
    color: var(--text-lighter);
    margin: 2px 0 0 0;
}
.dashboard-section-link {
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.5px;
    text-decoration: none;
}
.dashboard-section-link:hover {
    text-decoration: underline;
}

.kpi-header-icon-raw {
    font-size: 2rem;
    color: var(--primary);
    opacity: 0.75;
}
.kpi-value-small {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.3rem;
}
.kpi-value-limit {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-lighter);
}

.project-progress-bar-container {
    background: var(--light);
    border-radius: 9999px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 0.6rem;
    width: 100%;
}
.project-progress-bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.kpi-progress-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.kpi-progress-meta-left {
    font-size: 0.72rem;
    color: var(--text-lighter);
}
.kpi-badge-alert {
    font-size: 0.65rem;
    font-weight: 900;
    color: #ffffff;
    padding: 2px 9px;
    border-radius: 20px;
}
.kpi-badge-alert.error {
    background: #EF4444;
}
.kpi-badge-alert.warning {
    background: #F59E0B;
}

.dashboard-task-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.task-title-large {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
    color: var(--text);
}
.task-meta-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.task-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.task-meta-icon {
    color: var(--text-lighter);
    opacity: 0.8;
}
.task-meta-item span {
    font-size: 0.8rem;
    color: var(--text-light);
}
.task-priority-text {
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.task-timer-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.quick-action-item-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: all 0.2s ease;
}
.quick-action-item-card:hover {
    border-color: rgba(115, 41, 147, 0.3);
    transform: translateY(-2px);
}
.quick-action-icon-wrap {
    width: 3rem;
    height: 3rem;
    border-radius: 8px;
    background: rgba(115, 41, 147, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: all 0.2s ease;
}
.quick-action-item-card:hover .quick-action-icon-wrap {
    background: var(--primary);
    color: #ffffff;
}
.quick-action-title {
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--text);
    display: block;
}
.quick-action-subtitle {
    font-size: 10px;
    color: var(--text-lighter);
}

/* ==========================================================================
   Modern Detail Checklist Page Styles (detalhe_checklist.php)
   ========================================================================== */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
@media (max-width: 768px) {
    .detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}
.detail-title-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.detail-back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}
.detail-back-btn:hover {
    background: var(--light);
    color: var(--primary);
}
.detail-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}
.detail-icon-box span {
    font-size: 20px;
}
.detail-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
    text-transform: uppercase;
}
.detail-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 4px 0 0 0;
}
.detail-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.detail-btn-outline {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text-light);
    font-weight: 700;
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
}
.detail-btn-outline:hover {
    background: var(--light);
    color: var(--text);
}
.detail-btn-blue {
    background: #2563eb;
    color: #ffffff;
    border: none;
    font-weight: 700;
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: background 0.2s ease;
}
.detail-btn-blue:hover {
    background: #1d4ed8;
}

/* Cards Layout */
.detail-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.detail-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.detail-badge-count {
    background: var(--primary);
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.detail-item-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s ease;
}
.detail-item-row:hover {
    border-color: var(--primary-light);
}
.detail-item-row.completed-row {
    background: #f4fbf7;
    border-color: #ccecd7;
}
.detail-item-row.failed-row {
    background: #fdf3f3;
    border-color: #ffdad6;
}

.detail-item-circle {
    font-size: 24px;
    color: var(--text-lighter);
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}
.detail-item-circle.completed {
    color: #006d37;
}
.detail-item-circle.failed {
    color: #ba1a1a;
}

.detail-item-title {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
}
.detail-item-title.line-through {
    text-decoration: line-through;
    color: var(--text-light);
}

.detail-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.detail-item-status-select {
    border: none;
    outline: none;
    background: #f1f3f4;
    color: #5f6368;
    font-size: 10px;
    font-weight: 900;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    appearance: none;
}
.detail-item-row.completed-row .detail-item-status-select {
    background: #ccecd7;
    color: #006d37;
}
.detail-item-row.failed-row .detail-item-status-select {
    background: #ffdad6;
    color: #ba1a1a;
}

.detail-item-delete-btn {
    border: none;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease, background 0.2s ease;
}
.detail-item-delete-btn:hover {
    background: rgba(186, 26, 26, 0.05);
    color: var(--error);
}

/* Prompt Card Re-insert */
.detail-prompt-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.detail-prompt-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.detail-prompt-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3ebf7;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.detail-prompt-icon span {
    font-size: 22px;
}
.detail-prompt-text-wrap {
    flex: 1;
}
.detail-prompt-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 4px 0;
}
.detail-prompt-description {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0 0 1.25rem 0;
}
.detail-prompt-actions {
    display: flex;
    gap: 0.75rem;
}
.detail-prompt-btn-cancel {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text-light);
    font-weight: 700;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}
.detail-prompt-btn-cancel:hover {
    background: var(--light);
}
.detail-prompt-btn-submit {
    background: #2563eb;
    color: #ffffff;
    border: none;
    font-weight: 700;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}
.detail-prompt-btn-submit:hover {
    background: #1d4ed8;
}

/* ==========================================================================
   Modern Members Page Styles (usuarios.php)
   ========================================================================== */
.members-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1.5rem;
}
@media (max-width: 768px) {
    .members-header {
        flex-direction: column;
        align-items: stretch;
    }
}
.members-header-info h1 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
}
.members-header-info h1 span {
    color: var(--primary);
}
.members-subtitle {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 4px 0 0 0;
}
.members-tip {
    font-size: 0.8rem;
    color: var(--text-lighter);
    margin: 8px 0 0 0;
}
.members-btn-new {
    background: var(--primary);
    color: #ffffff;
    border: none;
    font-weight: 700;
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: background 0.2s ease;
    flex-shrink: 0;
}
.members-btn-new:hover {
    background: var(--primary-hover);
}

/* Table styling */
.members-table-wrap {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}
@media (max-width: 991px) {
    .members-table-wrap {
        display: none !important; /* Hide on mobile/tablet and show cards instead */
    }
}
.members-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.members-table th {
    background: var(--light);
    padding: 1rem 1.5rem;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}
.members-table td {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.members-table tr:last-child td {
    border-bottom: none;
}
.members-table tr:hover td {
    background: var(--light);
}
.members-table-empty {
    padding: 3rem !important;
    text-align: center;
    color: var(--text-light);
    opacity: 0.6;
}
.members-table-empty span {
    font-size: 32px;
    display: block;
    margin-bottom: 0.5rem;
}

/* Profile cell */
.member-profile-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--border);
}
.member-avatar-initial {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}
.member-info-cell {
    display: flex;
    flex-direction: column;
}
.member-name {
    font-weight: 700;
    color: var(--text);
    font-size: 0.9rem;
}
.member-role {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    margin-top: 1px;
}

.member-email-cell {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
}

.member-function-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    background: #e1f5fe;
    color: #0288d1;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.member-branch-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--light);
    color: var(--text-light);
    font-size: 10px;
    font-weight: 700;
    font-family: monospace;
}

.member-status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 9999px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.05em;
}
.member-status-badge.active {
    background: #ccecd7;
    color: #006d37;
}
.member-status-badge.inactive {
    background: #ffdad6;
    color: #ba1a1a;
}

.member-actions-cell {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.member-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text-light);
    transition: all 0.2s ease;
}
.member-action-btn span {
    font-size: 14px;
}
.member-action-btn:hover {
    background: var(--light);
    color: var(--text);
}
.member-action-btn.toggle-off:hover {
    background: #fff8e1;
    color: #f57f17;
    border-color: #ffe082;
}
.member-action-btn.toggle-on:hover {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #a5d6a7;
}
.member-action-btn.delete:hover {
    background: #ffebee;
    color: #c62828;
    border-color: #ef9a9a;
}

/* Mobile cards styling */
.member-mobile-list {
    display: none !important;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}
@media (max-width: 991px) {
    .member-mobile-list {
        display: flex !important;
    }
}
.member-mobile-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}
.member-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}
.member-mobile-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.member-mobile-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}
.member-mobile-label {
    color: var(--text-light);
    font-weight: 600;
}
.member-mobile-value {
    color: var(--text);
    font-weight: 700;
}
.member-mobile-footer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.member-mobile-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
}
.member-mobile-action span {
    font-size: 16px;
}
.member-mobile-action:hover {
    background: var(--light);
}
.member-mobile-action.edit {
    background: var(--primary);
    color: #ffffff;
    border: none;
}
.member-mobile-action.edit:hover {
    background: var(--primary-hover);
}
.member-mobile-action.toggle-off:hover {
    background: #fff8e1;
    color: #f57f17;
    border-color: #ffe082;
}
.member-mobile-action.toggle-on:hover {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #a5d6a7;
}
.member-mobile-action.delete:hover {
    background: #ffebee;
    color: #c62828;
    border-color: #ef9a9a;
}
.member-mobile-empty {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    color: var(--text-light);
    opacity: 0.6;
}
.member-mobile-empty span {
    font-size: 32px;
    display: block;
    margin-bottom: 0.5rem;
}

.profile-widget-initial {
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 28px;
    border: 2px solid var(--primary-light);
}

/* --- ORGANOGRAM TREE VISUALIZATION (PREMIUM) --- */
.organograma-container {
    width: 100%;
    overflow-x: auto;
    background: var(--white);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 40px 20px;
    box-shadow: var(--shadow-md);
}

.tree {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tree ul {
    padding-top: 24px;
    position: relative;
    transition: all 0.5s;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.tree li {
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 24px 8px 0 8px;
    transition: all 0.5s;
}

/* Linhas conectoras horizontais */
.tree li::before, .tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid var(--primary);
    width: 50%;
    height: 24px;
}
.tree li::after {
    right: auto;
    left: 50%;
    border-left: 2px solid var(--primary);
}

/* Remove linhas extras para filhos únicos */
.tree li:only-child::after, .tree li:only-child::before {
    display: none;
}
.tree li:only-child {
    padding-top: 0;
}

/* Ajusta bordas dos cantos */
.tree li:first-child::before, .tree li:last-child::after {
    border: 0 none;
}
.tree li:last-child::before {
    border-right: 2px solid var(--primary);
    border-radius: 0 8px 0 0;
}
.tree li:first-child::after {
    border-radius: 8px 0 0 0;
}

/* Linhas conectoras verticais para descendentes */
.tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 2px solid var(--primary);
    width: 0;
    height: 24px;
    transform: translateX(-50%);
}

/* Estilização dos Cartões */
.tree-node-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: var(--light);
    border: 1px solid var(--border);
    padding: 14px 18px;
    border-radius: 16px;
    min-width: 170px;
    max-width: 210px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.tree-node-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    background: var(--white);
}

.tree-node-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
}

.tree-node-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-bottom: 2px;
}

.tree-node-role {
    font-size: 10px;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tree-node-dept-badge {
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 6px;
    margin-top: 8px;
    letter-spacing: 0.5px;
}

/* Diferenciação de Estilos por Nível */
.card-director {
    border-left: 4px solid var(--warning);
    background: var(--warning-light);
}
.card-director:hover {
    border-color: var(--warning);
}
.card-director .tree-node-avatar {
    background: var(--white);
    color: var(--warning);
    border-color: var(--warning);
}

.card-manager {
    border-left: 4px solid var(--primary);
    background: var(--primary-light);
}
.card-manager:hover {
    border-color: var(--primary);
}
.card-manager .tree-node-avatar {
    background: var(--white);
    color: var(--primary);
    border-color: var(--primary);
}
.card-manager .tree-node-dept-badge {
    background: var(--primary);
    color: var(--white);
}

.card-collab {
    border-left: 4px solid var(--success);
    background: var(--white);
}
.card-collab:hover {
    border-color: var(--success);
}
.card-collab .tree-node-avatar {
    background: var(--success-light);
    color: var(--success);
}

.card-empty {
    border-left: 4px dashed var(--text-lighter);
    background: var(--light);
}
.card-empty:hover {
    border-color: var(--text-lighter);
}
.card-empty .tree-node-avatar {
    background: var(--white);
    color: var(--text-light);
}
