/* ============================================
   AURA TASKS - Design System
   Padrão Aura Minerals
   ============================================ */

/* === VARIÁVEIS E TEMAS === */
:root {
    /* Cores Oficiais Aura Minerals */
    --aura-blue: #2D3D70;
    --aura-blue-dark: #272F5A;
    --aura-blue-medium: #3C4788;
    --aura-blue-light: #6F7EC0;
    --aura-coral: #F4614D;
    --aura-coral-alt: #F1653E;
    --aura-coral-light: #FF9477;
    --aura-beige: #9F8971;
    --aura-sand: #E5D0B8;
    --aura-gray: #C1C0BF;
    --aura-gray-cool: #B0B7C1;
    --aura-gray-dark: #7F7F7F;

    /* Tema Claro (padrão) */
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef1f5;
    --text-primary: #333333;
    --text-secondary: #555555;
    --text-muted: #888888;
    --border-color: #e1e5eb;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);

    /* Prioridades */
    --priority-high: #e74c3c;
    --priority-medium: #f39c12;
    --priority-low: #27ae60;

    /* Status */
    --status-pending: #95a5a6;
    --status-progress: #3498db;
    --status-done: #27ae60;

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 60px;
    --border-radius: 8px;
    --transition: 0.3s ease;
}

/* Tema Escuro */
[data-theme="dark"] {
    --bg-primary: #1a1f2e;
    --bg-secondary: #242936;
    --bg-tertiary: #2d3344;
    --text-primary: #e6e6e6;
    --text-secondary: #b0b0b0;
    --text-muted: #6e7681;
    --border-color: #373e4d;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* === RESET E BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    padding-bottom: env(safe-area-inset-bottom, 0);
    -webkit-tap-highlight-color: transparent;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 16px; }
@media (min-width: 769px) {
    input, select, textarea { font-size: 14px; }
}

/* === LAYOUT PRINCIPAL === */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* === SIDEBAR === */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--aura-blue) 0%, var(--aura-blue-dark) 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: env(safe-area-inset-top, 0);
    transition: width var(--transition), transform var(--transition);
    z-index: 1000;
    overflow: hidden;
}

.sidebar-brand {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    min-height: var(--header-height);
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    background: var(--aura-coral);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-brand-text strong {
    font-size: 16px;
    font-weight: 700;
}

.sidebar-brand-text span {
    font-size: 11px;
    opacity: 0.6;
}

.sidebar-nav {
    flex: 1;
    padding: 15px 0;
    overflow-y: auto;
}

.sidebar-nav-section {
    padding: 10px 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.4;
    margin-top: 10px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-nav-item.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: var(--aura-coral);
}

.sidebar-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-nav-item span.nav-text {
    white-space: nowrap;
    overflow: hidden;
}

.nav-badge {
    background: var(--aura-coral);
    color: white;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: auto;
    min-width: 18px;
    text-align: center;
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--border-radius);
    margin-bottom: 8px;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    background: var(--aura-coral);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 11px;
    opacity: 0.6;
}

.sidebar-toggle {
    width: 100%;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border: none;
    border-radius: var(--border-radius);
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* Sidebar Collapsed */
.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .sidebar-nav-section,
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .sidebar-toggle span {
    display: none;
}

.sidebar.collapsed .sidebar-nav-item {
    justify-content: center;
    padding: 12px;
}

/* === MAIN CONTENT === */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* === HEADER === */
.main-header {
    background: var(--bg-secondary);
    min-height: var(--header-height);
    padding: 0 25px;
    padding-top: env(safe-area-inset-top, 0);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    font-size: 20px;
    color: var(--text-primary);
    border-radius: var(--border-radius);
}

.header-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--aura-blue);
}

[data-theme="dark"] .header-title {
    color: var(--text-primary);
}

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

.header-search {
    position: relative;
    margin-right: 10px;
}

.header-search input {
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-primary);
    color: var(--text-primary);
    width: 220px;
    transition: all 0.2s;
}

.header-search input:focus {
    outline: none;
    border-color: var(--aura-blue);
    width: 280px;
}

.header-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.header-icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-secondary);
    position: relative;
    transition: all 0.2s;
}

.header-icon-btn:hover {
    background: var(--border-color);
    color: var(--aura-blue);
}

.header-icon-btn .badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--aura-coral);
    border-radius: 50%;
    display: none;
}

.header-icon-btn .badge-dot.visible {
    display: block;
}

.header-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 25px;
    transition: all 0.2s;
}

.header-user-btn:hover {
    border-color: var(--aura-blue-light);
}

.header-user-btn .avatar-sm {
    width: 32px;
    height: 32px;
    background: var(--aura-coral);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
}

.header-user-btn .user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1001;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-primary);
}

.dropdown-item i {
    width: 18px;
    color: var(--text-muted);
}

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

/* === CONTENT AREA === */
.content-area {
    flex: 1;
    padding: 25px;
}

.section-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

/* === STATS GRID === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    user-select: none;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card:active {
    transform: translateY(0);
}

/* Highlight de seção do dashboard ao clicar no stat */
.dash-highlight {
    animation: dashHighlight 1.5s ease;
}

@keyframes dashHighlight {
    0% { box-shadow: 0 0 0 3px var(--primary); }
    100% { box-shadow: var(--shadow-sm); }
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-icon.blue { background: rgba(45,61,112,0.1); color: var(--aura-blue); }
.stat-icon.coral { background: rgba(244,97,77,0.1); color: var(--aura-coral); }
.stat-icon.green { background: rgba(39,174,96,0.1); color: #27ae60; }
.stat-icon.yellow { background: rgba(243,156,18,0.1); color: #f39c12; }
.stat-icon.red { background: rgba(231,76,60,0.1); color: #e74c3c; }
.stat-icon.purple { background: rgba(155,89,182,0.1); color: #9b59b6; }

.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--aura-blue); }
[data-theme="dark"] .stat-value { color: var(--aura-coral-light); }
.stat-label { font-size: 13px; color: var(--text-muted); }

/* === SECTION HEADER === */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--aura-coral);
}

/* === TOOLBAR === */
.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.toolbar-filter {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
}

.toolbar-filter:focus {
    outline: none;
    border-color: var(--aura-blue);
}

/* === BUTTONS === */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--aura-coral-alt);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244,97,77,0.3);
}

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

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

.btn-outline {
    background: transparent;
    color: var(--aura-coral);
    border: 1px solid var(--aura-coral);
}

.btn-outline:hover {
    background: var(--aura-coral);
    color: white;
}

.badge-shared {
    background: rgba(45, 61, 112, 0.1);
    color: var(--aura-navy);
}

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

.btn-blue:hover {
    background: var(--aura-blue-medium);
}

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

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.btn-icon:hover {
    border-color: var(--aura-blue);
    color: var(--aura-blue);
}

/* === TASK CARDS === */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.task-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 16px 20px;
    display: flex;
    min-width: 0;
    max-width: 100%;
    align-items: center;
    gap: 15px;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.task-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(2px);
}

.task-card.priority-high { border-left-color: var(--priority-high); }
.task-card.priority-medium { border-left-color: var(--priority-medium); }
.task-card.priority-low { border-left-color: var(--priority-low); }

.task-card.status-done {
    opacity: 0.6;
}

.task-card.status-done .task-title {
    text-decoration: line-through;
}

/* Resumo de tarefas concluídas na view lista */
.done-tasks-summary {
    margin-top: 16px;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
}

.done-tasks-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.done-tasks-header i {
    color: var(--success);
    font-size: 18px;
}

.done-tasks-header span {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.done-tasks-header .btn-outline {
    padding: 6px 14px;
    font-size: 12px;
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
    border-radius: var(--radius);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.done-tasks-header .btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.task-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    font-size: 11px;
    color: transparent;
}

.task-check:hover {
    border-color: var(--status-done);
    background: rgba(39,174,96,0.1);
}

.task-check.checked {
    background: var(--status-done);
    border-color: var(--status-done);
    color: white;
}

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

.task-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

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

.task-meta-item.overdue {
    color: var(--priority-high);
    font-weight: 500;
}

.task-actions {
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s;
}

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

.task-action-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: var(--bg-primary);
    border-radius: 6px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.2s;
}

.task-action-btn:hover {
    background: var(--border-color);
}

.task-action-btn.edit:hover { color: var(--aura-blue); }
.task-action-btn.share:hover { color: var(--aura-blue-light); }
.task-action-btn.delete:hover { color: var(--priority-high); }

/* === BADGES === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    gap: 4px;
}

.badge-priority-high { background: rgba(231,76,60,0.1); color: var(--priority-high); }
.badge-priority-medium { background: rgba(243,156,18,0.1); color: var(--priority-medium); }
.badge-priority-low { background: rgba(39,174,96,0.1); color: var(--priority-low); }

.badge-status-pending { background: rgba(149,165,166,0.15); color: var(--status-pending); }
.badge-status-progress { background: rgba(52,152,219,0.1); color: var(--status-progress); }
.badge-status-done { background: rgba(39,174,96,0.1); color: var(--status-done); }

.badge-category {
    background: rgba(45,61,112,0.1);
    color: var(--aura-blue);
}

/* === KANBAN VIEW === */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    min-height: 400px;
}

.kanban-column {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 15px;
    min-height: 300px;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.kanban-column-title {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kanban-column-count {
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.kanban-column.pending .kanban-column-header { border-bottom-color: var(--status-pending); }
.kanban-column.progress .kanban-column-header { border-bottom-color: var(--status-progress); }
.kanban-column.done .kanban-column-header { border-bottom-color: var(--status-done); }

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kanban-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 14px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.kanban-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.kanban-card-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

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

/* === PROJECT CARDS === */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
}

.project-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.project-card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.project-card-color {
    width: 100%;
    height: 4px;
}

.project-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.project-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-body {
    padding: 16px 20px;
}

.progress-bar {
    height: 6px;
    background: var(--bg-primary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--aura-blue), var(--aura-coral));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.project-card-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.project-card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.project-card-deadline {
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-card-deadline.overdue {
    color: var(--priority-high);
    font-weight: 500;
}

/* === SHARED AREA === */
.colleagues-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.colleague-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.colleague-avatar {
    width: 40px;
    height: 40px;
    background: var(--aura-blue-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.colleague-info {
    flex: 1;
}

.colleague-name {
    font-weight: 500;
    font-size: 14px;
}

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

.colleague-status {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
}

.colleague-status.accepted {
    background: rgba(39,174,96,0.1);
    color: var(--status-done);
}

.colleague-status.pending {
    background: rgba(243,156,18,0.1);
    color: var(--priority-medium);
}

.colleague-status.rejected {
    background: rgba(231,76,60,0.1);
    color: var(--priority-high);
}

.colleague-actions {
    flex-shrink: 0;
}

.colleague-card {
    flex-wrap: wrap;
}

.invite-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.invite-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.invite-form input:focus {
    outline: none;
    border-color: var(--aura-blue);
}

/* === MODAIS === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: transform 0.3s;
}

.modal-overlay.show .modal {
    transform: translateY(0) scale(1);
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--aura-blue);
}

[data-theme="dark"] .modal-header h3 {
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-primary);
    border-radius: 50%;
    font-size: 18px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 60vh;
}

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

/* === FORMS === */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group label .required {
    color: var(--aura-coral);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--aura-blue);
    box-shadow: 0 0 0 3px rgba(45,61,112,0.1);
}

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

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

/* Color picker buttons */
.color-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.color-option:hover,
.color-option.selected {
    border-color: var(--text-primary);
    transform: scale(1.15);
}

/* === TABS === */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.2s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.tab:hover {
    color: var(--aura-blue);
}

.tab.active {
    color: var(--aura-blue);
    border-bottom-color: var(--aura-coral);
}

.tab-content {
    display: none;
}

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

/* === VIEW TOGGLE === */
.view-toggle {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.view-toggle-btn {
    padding: 7px 14px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.view-toggle-btn:not(:last-child) {
    border-right: 1px solid var(--border-color);
}

.view-toggle-btn.active {
    background: var(--aura-blue);
    color: white;
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 20px;
}

/* === TOAST NOTIFICATIONS === */
.toast-container {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 20px);
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-secondary);
    padding: 14px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    border-left: 4px solid var(--aura-blue);
}

.toast.show { transform: translateX(0); }
.toast.success { border-left-color: var(--status-done); }
.toast.error { border-left-color: var(--priority-high); }
.toast.warning { border-left-color: var(--priority-medium); }

.toast-icon { font-size: 18px; }
.toast.success .toast-icon { color: var(--status-done); }
.toast.error .toast-icon { color: var(--priority-high); }
.toast.warning .toast-icon { color: var(--priority-medium); }

.toast-message {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

/* === SKELETON LOADING === */
.skeleton {
    background: linear-gradient(90deg, var(--bg-primary) 25%, var(--border-color) 50%, var(--bg-primary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-card {
    height: 70px;
    margin-bottom: 10px;
}

.skeleton-stat {
    height: 90px;
}

/* === SETTINGS === */
.settings-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 20px;
}

.settings-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-card h4 i {
    color: var(--aura-coral);
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-label {
    font-size: 14px;
    color: var(--text-primary);
}

.settings-description {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-color);
    border-radius: 12px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--aura-coral);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* === LOGIN PAGE === */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--aura-blue) 0%, var(--aura-blue-dark) 50%, #1a2040 100%);
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.login-header {
    padding: 40px 40px 20px;
    text-align: center;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.login-logo-icon {
    width: 48px;
    height: 48px;
    background: var(--aura-coral);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--aura-blue);
}

.login-subtitle {
    color: #888;
    font-size: 14px;
    margin-top: 4px;
}

.login-body {
    padding: 20px 40px 30px;
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-form .form-group label {
    color: #555;
}

.login-form .form-control {
    padding: 12px 14px;
    border: 1px solid #e1e5eb;
    background: #f9fafb;
    /* iOS PWA standalone fix */
    -webkit-user-select: text;
    user-select: text;
    -webkit-appearance: none;
    touch-action: manipulation;
}

.login-form .form-control:focus {
    background: white;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--aura-coral);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.login-btn:hover {
    background: var(--aura-coral-alt);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244,97,77,0.3);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    color: #ccc;
    font-size: 12px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e1e5eb;
}

.google-btn {
    width: 100%;
    padding: 11px;
    border: 1px solid #e1e5eb;
    border-radius: var(--border-radius);
    background: white;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.google-btn:hover {
    background: #f5f7fa;
    border-color: #ccc;
}

.google-btn img {
    width: 20px;
    height: 20px;
}

.login-footer {
    text-align: center;
    padding: 20px;
    background: #f9fafb;
    border-top: 1px solid #e1e5eb;
    font-size: 13px;
    color: #888;
}

.login-footer a {
    color: var(--aura-coral);
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

.login-error {
    background: rgba(231,76,60,0.1);
    color: #e74c3c;
    padding: 10px 14px;
    border-radius: var(--border-radius);
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
    align-items: center;
    gap: 8px;
}

.login-error.show {
    display: flex;
}

/* === LOADING FULLSCREEN === */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--aura-blue), var(--aura-blue-dark));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 9999;
}

.loading-screen .loader-dots {
    display: flex;
    gap: 8px;
}

.loading-screen .loader-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.loading-screen .loader-dots span:nth-child(1) { background: white; animation-delay: 0s; }
.loading-screen .loader-dots span:nth-child(2) { background: var(--aura-coral); animation-delay: 0.2s; }
.loading-screen .loader-dots span:nth-child(3) { background: white; animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.loading-screen .loading-text {
    color: white;
    font-size: 14px;
    opacity: 0.7;
}

/* === DASHBOARD SECTIONS === */
.dashboard-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    min-width: 0;
    overflow: hidden;
}

/* === SETTINGS GRID === */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.settings-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* === SHORTCUTS GRID === */
.shortcuts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* === TODAY TASKS SECTION === */
.today-section {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 20px;
    min-width: 0;
    overflow: hidden;
}

.today-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.today-section-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.today-section-header h3 i {
    color: var(--aura-coral);
}

/* Contadores do dashboard */
.dash-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 13px;
    font-size: 13px;
    font-weight: 700;
    background: var(--bg-primary);
    color: var(--text-secondary);
}

.dash-count.overdue {
    background: rgba(231,76,60,0.12);
    color: #e74c3c;
}

.dash-count.progress {
    background: rgba(45,61,112,0.1);
    color: var(--aura-blue);
}

.dash-count.pending {
    background: rgba(243,156,18,0.1);
    color: #f39c12;
}

.dash-section-overdue .today-section-header h3 i {
    color: #e74c3c;
}

/* === SHARE MODAL === */
.share-users-list {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 10px;
}

.share-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.share-user-item label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.share-user-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--aura-coral);
}

/* === NOTIFICATIONS PANEL === */
.notification-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1001;
}

.notification-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-panel-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 14px;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    transition: background 0.2s;
    cursor: pointer;
}

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

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

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.notification-icon.invite {
    background: rgba(45,61,112,0.1);
    color: var(--aura-blue);
}

.notification-text {
    flex: 1;
}

.notification-text strong {
    font-size: 13px;
}

.notification-text p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.notification-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.notification-actions .btn-sm {
    padding: 4px 10px;
    font-size: 11px;
}

/* === MOBILE OVERLAY === */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

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

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .kanban-board {
        grid-template-columns: 1fr;
    }

    .header-search input {
        width: 160px;
    }

    .header-search input:focus {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

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

    .sidebar.collapsed {
        width: var(--sidebar-width);
        transform: translateX(-100%);
    }

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

    .main-header {
        padding: 0 12px;
        padding-top: env(safe-area-inset-top, 0);
    }

    .header-menu-btn {
        display: flex;
    }

    .header-title {
        font-size: 18px;
    }

    .header-search {
        display: none;
    }

    /* Empty state compacto */
    .empty-state {
        padding: 24px 12px;
    }

    .empty-state i {
        font-size: 36px;
    }

    .empty-state p {
        font-size: 12px;
    }

    .header-user-btn .user-name {
        display: none;
    }

    .content-area {
        padding: 12px;
    }

    /* Stats grid: 2 colunas no tablet, scrollável */
    .stats-grid {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 8px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .stats-grid::-webkit-scrollbar {
        height: 3px;
    }

    .stats-grid::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 3px;
    }

    .stat-card {
        padding: 12px 14px;
        min-width: 140px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-label {
        font-size: 11px;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    /* Dashboard sections - 1 coluna no mobile */
    .dashboard-sections {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 100%;
    }

    /* Seções do dash */
    .today-section {
        padding: 12px;
        margin-bottom: 0;
        overflow: hidden;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .today-section-header h3 {
        font-size: 14px;
    }

    /* Impedir overflow horizontal em tudo */
    .section-content,
    .content-area,
    .main-content {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .tasks-list {
        width: 100%;
        max-width: 100%;
    }

    .task-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

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

    /* Projetos */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* Section header */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Toolbar */
    .toolbar {
        width: 100%;
        gap: 6px;
    }

    .toolbar-filter {
        flex: 1;
        min-width: 0;
        padding: 7px 10px;
        font-size: 12px;
    }

    .view-toggle-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    /* Task card mobile - layout reorganizado */
    .task-card {
        padding: 12px;
        gap: 8px;
        flex-wrap: wrap;
        position: relative;
    }

    .task-check {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

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

    .task-title {
        font-size: 14px;
        word-break: break-word;
        padding-right: 0;
    }

    .task-meta {
        gap: 4px;
        flex-wrap: wrap;
    }

    .task-meta-item {
        font-size: 11px;
    }

    .task-actions {
        opacity: 1;
        gap: 6px;
        width: 100%;
        justify-content: flex-end;
        border-top: 1px solid var(--border-color);
        padding-top: 8px;
        margin-top: 4px;
        flex-direction: row;
    }

    .task-action-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    /* Badges menores */
    .badge {
        font-size: 10px;
        padding: 3px 7px;
    }

    /* Modais */
    .modal {
        width: 96%;
        max-height: 92vh;
        margin: 4vh auto;
        border-radius: 12px;
    }

    .modal.modal-lg {
        max-width: 96%;
    }

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

    .modal-header h2 {
        font-size: 16px;
    }

    .modal-body {
        padding: 14px 16px;
        max-height: 68vh;
    }

    .modal-footer {
        padding: 12px 16px;
    }

    /* Kanban board */
    .kanban-board {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .kanban-column {
        padding: 12px;
    }

    /* Login page */
    .login-container {
        max-width: 100%;
        margin: 10px;
    }

    .login-header,
    .login-body {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Invite form */
    .invite-form {
        flex-direction: column;
    }

    /* Notifications */
    .notification-panel {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        border-radius: 16px 16px 0 0;
        max-height: 70vh;
        padding-bottom: env(safe-area-inset-bottom, 12px);
    }

    /* Settings */
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .settings-card {
        padding: 16px;
    }

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

    /* Subtasks */
    .subtasks-section {
        padding: 12px;
    }

    .subtask-item {
        padding: 8px 10px;
        gap: 8px;
        font-size: 12px;
    }

    .subtask-item .subtask-remove {
        opacity: 1;
    }

    .subtask-add input {
        padding: 8px 10px;
        font-size: 12px;
    }

    /* Notes */
    .notes-list {
        max-height: 200px;
    }

    .note-item {
        padding: 10px 12px;
    }

    .note-add textarea {
        font-size: 12px;
    }

    /* Done tasks summary */
    .done-tasks-summary {
        padding: 10px 14px;
    }

    .done-tasks-header {
        gap: 8px;
        flex-wrap: wrap;
    }

    /* Detail meta */
    .detail-meta {
        gap: 6px;
    }

    .detail-meta .badge {
        font-size: 11px;
        padding: 4px 10px;
    }

    /* Project task summary */
    .project-task-summary {
        gap: 6px;
    }

    .project-task-stat {
        padding: 8px 6px;
    }

    .project-task-stat .stat-num {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .content-area {
        padding: 8px;
        overflow-x: hidden;
    }

    /* Inputs 16px para evitar zoom no iOS */
    input, select, textarea {
        font-size: 16px !important;
    }

    .dashboard-sections {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    /* Stats: scroll horizontal compacto */
    .stat-card {
        min-width: 110px;
        padding: 8px 10px;
        gap: 8px;
    }

    .stat-value {
        font-size: 18px;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    /* Seções do dash */
    .today-section {
        padding: 10px;
    }

    .today-section-header h3 {
        font-size: 13px;
    }

    .dash-count {
        min-width: 22px;
        height: 22px;
        font-size: 11px;
    }

    /* Task card compact */
    .task-card {
        padding: 10px;
        gap: 8px;
        max-width: 100%;
        overflow: hidden;
    }

    .task-title {
        font-size: 13px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .task-meta {
        gap: 3px;
        flex-wrap: wrap;
    }

    .task-meta-item {
        font-size: 10px;
    }

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

    .task-check {
        width: 22px;
        height: 22px;
    }

    .task-actions {
        flex-direction: row;
        gap: 6px;
    }

    .task-action-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    /* Tabs */
    .tabs {
        overflow-x: auto;
    }

    .tab {
        white-space: nowrap;
        padding: 10px 14px;
        font-size: 12px;
    }

    /* ===== MODAIS FULLSCREEN COM SAFE-AREA ===== */
    .modal-overlay {
        align-items: flex-end;
    }

    .modal {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 16px 16px 0 0;
        height: auto;
        display: flex;
        flex-direction: column;
    }

    .modal.modal-lg {
        max-width: 100%;
    }

    .modal-header {
        padding: 16px;
        padding-top: calc(env(safe-area-inset-top, 12px) + 12px);
        flex-shrink: 0;
    }

    .modal-header h3 {
        font-size: 16px;
    }

    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .modal-body {
        flex: 1;
        max-height: calc(100vh - 180px - env(safe-area-inset-top, 0));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 14px 16px;
    }

    .modal-footer {
        flex-shrink: 0;
        padding: 12px 16px;
        padding-bottom: calc(env(safe-area-inset-bottom, 12px) + 12px);
    }

    /* Kanban compacto */
    .kanban-card {
        padding: 10px 12px;
    }

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

    .kanban-card-footer {
        gap: 6px;
    }

    /* Toolbar compacto */
    .toolbar {
        gap: 4px;
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .toolbar-filter, .toolbar-sort {
        flex: 1;
        min-width: calc(50% - 4px);
        padding: 8px 10px;
        font-size: 12px;
    }

    .btn {
        padding: 10px 14px;
        font-size: 12px;
        min-height: 40px;
    }

    .btn-sm {
        padding: 8px 12px;
        font-size: 11px;
        min-height: 36px;
    }

    .view-toggle-btn {
        padding: 8px 14px;
        min-height: 36px;
    }

    /* Section header */
    .section-header {
        gap: 8px;
        flex-direction: column;
        align-items: stretch;
    }

    .section-title {
        font-size: 16px;
    }

    /* Project cards */
    .project-card {
        padding: 12px;
    }

    /* Notifications panel fullscreen bottom */
    .notification-panel {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        border-radius: 16px 16px 0 0;
        max-height: 70vh;
        padding-bottom: env(safe-area-inset-bottom, 12px);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    }

    /* Toast responsivo */
    .toast-container {
        top: calc(env(safe-area-inset-top, 12px) + 12px);
        right: 8px;
        left: 8px;
    }

    .toast {
        min-width: unset;
        width: 100%;
    }

    /* Login */
    .login-header {
        padding: 20px;
    }

    .login-header h1 {
        font-size: 22px;
    }

    .login-body {
        padding: 20px;
    }

    .login-footer {
        padding-bottom: env(safe-area-inset-bottom, 20px);
    }

    /* Settings */
    .settings-card {
        padding: 12px 14px;
    }

    /* Subtask / notes */
    .subtask-item {
        padding: 7px 8px;
        font-size: 12px;
    }

    .subtask-add {
        gap: 6px;
    }

    .subtask-add .btn {
        min-width: 40px;
        min-height: 40px;
    }

    .note-add .btn {
        min-height: 40px;
    }

    .note-item .note-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    /* Dropdown menu mobile */
    .dropdown-menu {
        right: 0 !important;
        left: auto !important;
        min-width: 180px;
    }
}

/* === PASSWORD INPUT WITH TOGGLE === */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 42px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    padding: 4px;
    cursor: pointer;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--text-primary);
}

/* === FORGOT PASSWORD LINK === */
.forgot-password {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--aura-coral);
    margin-top: -8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.forgot-password:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* === SUCCESS MESSAGE (login page) === */
.login-success {
    background: rgba(39,174,96,0.1);
    color: #27ae60;
    padding: 10px 14px;
    border-radius: var(--border-radius);
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
    align-items: center;
    gap: 8px;
}

.login-success.show {
    display: flex;
}

/* === PASSWORD STRENGTH INDICATOR === */
.password-strength {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.password-strength-bar {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: var(--border-color);
    transition: background 0.3s;
}

.password-strength-bar.weak { background: #e74c3c; }
.password-strength-bar.medium { background: #f39c12; }
.password-strength-bar.strong { background: #27ae60; }

.password-strength-text {
    font-size: 11px;
    margin-top: 4px;
    color: var(--text-muted);
}

/* === SETTINGS: SECURITY CARD === */
.settings-card .btn-danger {
    background: transparent;
    color: var(--priority-high);
    border: 1px solid var(--priority-high);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-card .btn-danger:hover {
    background: var(--priority-high);
    color: white;
}

.settings-card .btn-blue {
    background: var(--aura-blue);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-card .btn-blue:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.settings-card .btn-blue:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* === TASK DUPLICATE BUTTON === */
.task-action-btn.duplicate {
    color: var(--aura-blue-light);
}

.task-action-btn.duplicate:hover {
    color: var(--aura-blue);
    background: rgba(45,61,112,0.1);
}

/* === SORT SELECTOR === */
.toolbar-sort {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
}

/* === KEYBOARD SHORTCUTS INDICATOR === */
.shortcut-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 20px;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 3000;
    font-size: 13px;
    color: var(--text-secondary);
}

.shortcut-hint.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.shortcut-hint kbd {
    display: inline-block;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    font-family: monospace;
    margin: 0 2px;
}

/* === EXPORT BUTTON === */
.settings-card .btn-outline {
    background: transparent;
    color: var(--aura-blue);
    border: 1px solid var(--aura-blue);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.settings-card .btn-outline:hover {
    background: var(--aura-blue);
    color: white;
}

/* dashboard-sections responsivo tratado no @media 768px principal */

/* === MODAL LARGE === */
.modal.modal-lg {
    max-width: 640px;
}

/* === SUBTASKS === */
.subtasks-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 14px 16px;
    margin: 12px 0;
}

.subtasks-section > label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--aura-blue);
    margin-bottom: 10px;
}

[data-theme="dark"] .subtasks-section > label {
    color: var(--aura-blue-light);
}

.subtasks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    min-height: 0;
}

.subtask-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s;
    animation: subtaskSlideIn 0.25s ease;
}

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

.subtask-item:hover {
    border-color: var(--aura-blue-light);
}

.subtask-item input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--aura-coral);
    flex-shrink: 0;
    cursor: pointer;
}

.subtask-item .subtask-text {
    flex: 1;
    color: var(--text-primary);
}

.subtask-item .subtask-text.done {
    text-decoration: line-through;
    color: var(--text-muted);
}

.subtask-item .subtask-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s;
    padding: 2px 6px;
    cursor: pointer;
}

.subtask-item:hover .subtask-remove {
    opacity: 1;
}

.subtask-item .subtask-remove:hover {
    color: var(--priority-high);
}

.subtask-add {
    display: flex;
    gap: 8px;
    align-items: center;
}

.subtask-add input {
    flex: 1;
    padding: 9px 12px;
    font-size: 13px;
    background: var(--bg-secondary);
}

.subtask-add .btn {
    flex-shrink: 0;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subtask-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 12px;
}

.subtask-progress .progress-bar {
    flex: 1;
}

.subtask-progress-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--aura-coral);
    min-width: 32px;
    text-align: right;
}

/* === DETAIL MODAL === */
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.detail-meta .badge {
    font-size: 12px;
    padding: 5px 12px;
}

.detail-section {
    border-top: 1px solid var(--border-color);
    padding-top: 18px;
    margin-top: 18px;
}

.detail-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section h4 i {
    color: var(--aura-coral);
    font-size: 14px;
}

/* === NOTES === */
.notes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
    max-height: 250px;
    overflow-y: auto;
}

.note-item {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 12px 14px;
    border-left: 3px solid var(--aura-coral);
    position: relative;
}

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

.note-item .note-author {
    font-size: 12px;
    font-weight: 600;
    color: var(--aura-blue);
}

[data-theme="dark"] .note-item .note-author {
    color: var(--aura-blue-light);
}

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

.note-item .note-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    white-space: pre-wrap;
}

.note-add {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.note-add textarea {
    font-size: 13px;
    resize: vertical;
    min-height: 50px;
}

.note-add .btn {
    align-self: flex-end;
}

.notes-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* === PROJECT DETAIL PROGRESS === */
.project-detail-progress {
    margin-bottom: 12px;
}

.project-progress-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-bottom: 8px;
}

.project-progress-stat .progress-percent {
    font-size: 20px;
    font-weight: 700;
    color: var(--aura-coral);
}

.project-task-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.project-task-stat {
    text-align: center;
    padding: 10px;
    background: var(--bg-primary);
    border-radius: 8px;
}

.project-task-stat .stat-num {
    font-size: 20px;
    font-weight: 700;
    display: block;
}

.project-task-stat .stat-lbl {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
}

.project-task-stat.pending .stat-num { color: var(--status-pending); }
.project-task-stat.progress .stat-num { color: var(--status-progress); }
.project-task-stat.done .stat-num { color: var(--status-done); }

/* === PROJECT TASKS LIST (dentro do detalhe) === */
.project-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
}

.project-task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid var(--status-pending);
}

.project-task-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(2px);
}

.project-task-item.status-in_progress {
    border-left-color: var(--status-progress);
}

.project-task-item.status-done {
    border-left-color: var(--status-done);
    opacity: 0.7;
}

.project-task-icon {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    font-size: 13px;
}

.project-task-item.status-pending .project-task-icon { color: var(--status-pending); }
.project-task-item.status-in_progress .project-task-icon { color: var(--status-progress); }
.project-task-item.status-done .project-task-icon { color: var(--status-done); }

.project-task-info {
    flex: 1;
    min-width: 0;
}

.project-task-title {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.project-task-title.done {
    text-decoration: line-through;
    color: var(--text-muted);
}

.project-task-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

/* settings-grid e settings-col definidos antes dos media queries */

.settings-card.danger-zone {
    border: 1px solid var(--priority-high);
}

.settings-card.danger-zone h4 {
    color: var(--priority-high);
}

.settings-card.danger-zone h4 i {
    color: var(--priority-high);
}

/* shortcuts-grid definido antes dos media queries */

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 6px 0;
}

.shortcut-item kbd {
    display: inline-block;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 12px;
    font-family: 'Segoe UI', monospace;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

/* === TASK CARD PROGRESS BAR === */
.task-card-progress {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-card-progress .progress-bar {
    flex: 1;
    height: 4px;
}

.task-card-progress .progress-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--aura-coral);
    min-width: 28px;
}

/* === KANBAN CARD PROGRESS === */
.kanban-card-progress {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kanban-card-progress .progress-bar {
    flex: 1;
    height: 3px;
}

.kanban-card-progress .progress-text {
    font-size: 10px;
    font-weight: 600;
    color: var(--aura-coral);
}

/* === PRINT === */
@media print {
    .sidebar, .main-header, .modal-overlay, .toast-container {
        display: none !important;
    }

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