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

/* --- Sistema de Design (Variáveis CSS) --- */
:root {
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Tema Claro (Padrão) */
    --bg-app: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-header: rgba(248, 250, 252, 0.8);
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tema Escuro */
body.dark-mode {
    --bg-app: #0b0f19;
    --bg-card: #151b2c;
    --bg-sidebar: #0f1322;
    --bg-header: rgba(11, 15, 25, 0.8);
    --border: #1e293b;
    --border-hover: #334155;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.15);
    
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.15);
    --danger: #f87171;
    --danger-light: rgba(248, 113, 113, 0.15);
    --warning: #fbbf24;
    --warning-light: rgba(251, 191, 36, 0.15);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
}

/* --- Resets e Estrutura Básica --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-app);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    height: 100vh;
    display: flex;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

/* Barra de carregamento superior (estilo GitHub) */
#loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--primary);
    z-index: 9999;
    transition: width 0.2s ease, opacity 0.3s ease;
    opacity: 0;
}

/* --- Layout Principal --- */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 100;
    flex-shrink: 0;
    transition: width 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.main-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.header {
    height: 64px;
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    backdrop-filter: blur(12px);
    z-index: 90;
    flex-shrink: 0;
}

.content-container {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    background-color: var(--bg-app);
}

.content-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    animation: fadeIn 0.3s ease-out;
}

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

/* --- Sidebar --- */
.sidebar-logo {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}

.sidebar-logo svg {
    color: var(--primary);
    width: 28px;
    height: 28px;
}

.sidebar-logo span {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.menu-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin: 20px 12px 8px 12px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    gap: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
    margin-bottom: 2px;
}

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

.menu-item.active {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.menu-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

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

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 160px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--border);
    border: 1px solid var(--border);
}

.user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

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

.user-info .role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* --- Header --- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-item:not(:last-child)::after {
    content: "/";
    color: var(--text-muted);
    font-size: 0.8rem;
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Barra de pesquisa superior */
.search-wrapper {
    position: relative;
    width: 280px;
    transition: var(--transition);
}

.search-input {
    width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    padding: 8px 12px 8px 36px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
    width: 320px;
}

.search-wrapper svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.theme-toggle-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    background-color: var(--bg-card);
    color: var(--text-secondary);
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    background-color: var(--border);
    color: var(--text-primary);
}

/* Dropdown da Busca */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 420px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 480px;
    overflow-y: auto;
    display: none;
    animation: fadeIn 0.2s ease-out;
}

.search-results-section {
    padding: 12px;
}

.search-results-section:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.search-results-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
    padding-left: 8px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
}

.search-result-item:hover {
    background-color: var(--bg-app);
}

.search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

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

.search-result-description {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-no-results {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --- Cards e Grid (Dashboard) --- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.metric-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.metric-info h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-icon svg {
    width: 24px;
    height: 24px;
}

.dashboard-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

@media (max-width: 900px) {
    .dashboard-split {
        grid-template-columns: 1fr;
    }
}

.section-card-title {
    font-size: 1.1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* Listas Modernas */
.recent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    background-color: var(--bg-card);
}

.recent-item:hover {
    background-color: var(--bg-app);
    border-color: var(--border-hover);
}

.recent-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.recent-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.recent-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.time-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- Tabelas de Administração --- */
.admin-table-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.admin-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background-color: var(--bg-app);
    padding: 14px 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.5px;
}

td {
    padding: 14px 20px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

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

tr:hover td {
    background-color: rgba(0, 0, 0, 0.01);
}

body.dark-mode tr:hover td {
    background-color: rgba(255, 255, 255, 0.01);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

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

/* --- Botões e Formulários --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    gap: 8px;
    border: 1px solid transparent;
}

.btn svg {
    width: 16px;
    height: 16px;
}

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

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

.btn-secondary {
    background-color: var(--bg-card);
    border-color: var(--border);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background-color: var(--bg-app);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Input Fields */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--bg-card);
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* --- Visualização de Setor & POP (Páginas Operacionais) --- */
.sector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.sector-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sector-icon-box {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-sm);
}

.sector-icon-box svg {
    width: 28px;
    height: 28px;
}

.sector-title h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.sector-desc-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Abas */
.tabs-container {
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    display: flex;
    gap: 24px;
}

.tab-btn {
    padding: 12px 4px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

.tab-btn svg {
    width: 18px;
    height: 18px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.2s ease-out;
}

.tab-content.active {
    display: block;
}

/* Seções do POP */
.pop-section {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
    margin-bottom: 24px;
}

.pop-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pop-content-body {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.pop-content-body p {
    margin-bottom: 12px;
}

.pop-content-body ul, .pop-content-body ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

.pop-content-body li {
    margin-bottom: 6px;
}

.pop-content-body table {
    margin: 16px 0;
    border: 1px solid var(--border);
}

.pop-content-body table td, .pop-content-body table th {
    border: 1px solid var(--border);
    padding: 8px 12px;
}

/* --- Editor Quill.js --- */
.editor-container-wrapper {
    display: none;
    margin-top: 12px;
}

.editor-toolbar {
    border-top-left-radius: var(--radius-sm);
    border-top-right-radius: var(--radius-sm);
    border-color: var(--border) !important;
    background-color: var(--bg-app);
}

.editor-editor {
    min-height: 250px;
    border-bottom-left-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
    border-color: var(--border) !important;
    background-color: var(--bg-card);
    font-family: var(--font-body) !important;
    font-size: 0.95rem !important;
    color: var(--text-primary) !important;
}

/* --- Tarefas (Tasks Accordion & List) --- */
.tasks-category-header {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 32px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.task-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.task-item:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

.task-summary {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.task-summary-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.task-title {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-chevron {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.task-item.open .task-chevron {
    transform: rotate(180deg);
}

.task-details {
    display: none;
    padding: 0 20px 20px 20px;
    border-top: 1px solid var(--border);
    background-color: rgba(0, 0, 0, 0.005);
    animation: slideDown 0.25s ease-out;
}

body.dark-mode .task-details {
    background-color: rgba(255, 255, 255, 0.003);
}

.task-item.open .task-details {
    display: block;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 1000px; }
}

.task-field {
    margin-top: 16px;
}

.task-field-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.task-field-content {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Anexos de Tarefas */
.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.attachment-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--bg-card);
    transition: var(--transition);
    font-size: 0.8rem;
    font-weight: 500;
    max-width: 100%;
}

.attachment-card:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.attachment-card svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.attachment-card:hover svg {
    color: var(--primary);
}

.attachment-card span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* --- Modais (Popups) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 540px;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-content > form {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

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

.modal-header h3 {
    font-size: 1.1rem;
}

.modal-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close-btn:hover {
    background-color: var(--bg-app);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* --- Toast Notifications (Avisos Flutuantes) --- */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    font-size: 0.85rem;
    font-weight: 500;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 320px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

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

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

.toast-icon svg {
    width: 20px;
    height: 20px;
}

.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-info .toast-icon { color: var(--primary); }

/* --- Tela de Login --- */
.login-body {
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-app);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.4s ease-out;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background-color: var(--primary-light);
    color: var(--primary);
    margin-bottom: 16px;
}

.login-logo svg {
    width: 28px;
    height: 28px;
}

.login-header h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.login-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.login-footer-text {
    text-align: center;
    margin-top: 24px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Upload List no modal de tarefas */
.modal-upload-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.upload-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.upload-list-item-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 12px;
}

.upload-list-item-remove {
    color: var(--danger);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
}
