:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --accent-gradient: linear-gradient(to right, #818cf8, #34d399);
    --accent-color: #6366f1;
    --accent-hover: #4f46e5;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: rgba(255, 255, 255, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background-color: var(--bg-color); color: var(--text-primary);
    font-family: 'Inter', sans-serif; min-height: 100vh;
    display: flex; justify-content: center;
    background-image: radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%), radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.15), transparent 25%); background-attachment: fixed;
}
.container { width: 100%; max-width: 1000px; padding: 2rem; }
header { text-align: center; margin-bottom: 2rem; }
h1 { font-size: 2.5rem; font-weight: 700; background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.glass-effect {
    background: var(--card-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border); border-radius: 1rem; padding: 1.5rem;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
}

/* Base animation */
.box-anim { animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-15px); } to { opacity: 1; transform: translateY(0); } }

/* Login */
.login-wrapper { max-width: 450px; margin-top: 5vh; }
.login-card { padding: 2.5rem 2rem; }
.login-wrapper header p { color: var(--text-secondary); margin-top: 0.5rem; font-size: 1.1rem; }

/* Dashboard Header */
.app-header { display: flex; justify-content: space-between; align-items: center; text-align: left; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem;}
.app-header h1 { font-size: 2rem; }

/* Desktop Menu Layout (Sidebar) */
#app-wrapper { display: flex; width: 100vw; height: 100vh; overflow: hidden; background: transparent; }

.sidebar { width: 260px; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--border); background: rgba(17, 24, 39, 0.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 10; flex-shrink: 0; box-shadow: 2px 0 10px rgba(0,0,0,0.5); }
.sidebar.collapsed { width: 80px; }
.sidebar.collapsed .nav-text, .sidebar.collapsed .sidebar-title { opacity: 0; width: 0; display: none; }
.sidebar.collapsed .sidebar-header { justify-content: center; }

.sidebar-header { display: flex; align-items: center; gap: 1rem; padding: 1.5rem; border-bottom: 1px solid var(--border); }
.sidebar-title { font-size: 1.25rem; font-weight: 700; background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; margin: 0; }
.logo-emoji { font-size: 1.5rem; }

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; padding: 1.5rem 1rem; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 1rem; padding: 0.875rem 1rem; border-radius: 0.75rem; border: none; background: transparent; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; font-size: 1rem; font-weight: 500; text-align: left; width: 100%; white-space: nowrap; outline: none; }
.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-primary); }
.nav-item.active { background: rgba(99, 102, 241, 0.15); color: var(--accent-color); font-weight: 600; border-left: 3px solid var(--accent-color); border-radius: 0 0.75rem 0.75rem 0; }
.nav-logout { color: var(--danger); margin-bottom: 0.5rem;}
.nav-logout:hover { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.nav-collapse { color: var(--text-secondary); }
.nav-icon { font-size: 1.2rem; min-width: 1.5rem; text-align: center; }

.sidebar-footer { padding: 1rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.5rem; }

/* Main Working Area */
.main-content { flex: 1; height: 100vh; overflow-y: auto; padding: 2.5rem 3rem; display: flex; flex-direction: column; gap: 0rem; background-image: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05), transparent 40%); }

/* Restoring Custom Scrollbars */
.main-content::-webkit-scrollbar { width: 8px; height: 8px; }
.main-content::-webkit-scrollbar-track { background: transparent; }
.main-content::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }
.main-content::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

/* Buttons */
.btn { width: 100%; padding: 0.85rem 1rem; background: var(--accent-color); color: white; border: none; border-radius: 0.5rem; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background-color 0.3s; }
.btn:hover { background: var(--accent-hover); }

.btn-logout { background: transparent; color: var(--danger); border: 1px solid var(--danger); padding: 0.6rem 1.25rem; border-radius: 0.5rem; cursor: pointer; font-weight: 600; font-size: 0.95rem; transition: all 0.3s ease; }
.btn-logout:hover { background: var(--danger); color: white; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4); }

.btn-outline { background: transparent; color: var(--text-primary); border: 1px solid var(--border); padding: 0.6rem 1.25rem; border-radius: 0.5rem; cursor: pointer; font-weight: 600; font-size: 0.95rem; transition: background-color 0.3s; }
.btn-outline:hover { background: rgba(255, 255, 255, 0.1); }

/* Forms */
.form-control { margin-bottom: 1rem; }
.form-control label { display: block; margin-bottom: 0.4rem; font-weight: 500; color: var(--text-secondary); font-size: 0.9rem;}
.form-control input, .form-control select { width: 100%; padding: 0.75rem 1rem; background: rgba(15, 23, 42, 0.4); border: 1px solid var(--border); border-radius: 0.5rem; color: var(--text-primary); font-family: inherit; font-size: 1rem; transition: all 0.3s; color-scheme: dark;}
.form-control select option { background-color: var(--bg-color); color: var(--text-primary); }
.form-control input:focus, .form-control select:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2); }

/* Registration Styles */
.register-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.register-grid .form-control {
    margin-bottom: 0;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    font-size: 1.1rem;
    pointer-events: none;
    opacity: 0.7;
}

.input-with-icon input {
    padding-left: 2.8rem !important;
}

@media (max-width: 768px) {
    .register-grid {
        grid-template-columns: 1fr;
    }
}

/* Task Creation */
.task-creation { margin-bottom: 2rem; }
.task-creation h2 { font-size: 1.25rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.75rem; }
.task-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; align-items: end; }

/* Workspace */
.workspace-view { width: 100%; animation: fadeIn 0.3s ease; }

/* Kanban Board */
.board { display: flex; gap: 1.5rem; overflow-x: auto; padding-bottom: 1rem; align-items: stretch; margin-top: 1rem;}
.board::-webkit-scrollbar { height: 8px; }
.board::-webkit-scrollbar-track { background: transparent; }
.board::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }
.column { flex: 1; min-width: 320px; background: rgba(15, 23, 42, 0.3); padding: 1.5rem; border-radius: 1rem; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 1rem;}
.column-title { font-size: 1.1rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; color: var(--text-secondary);}

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot-todo { background: var(--text-secondary); }
.dot-doing { background: var(--warning); }
.dot-review { background: #facc15; box-shadow: 0 0 8px rgba(250, 204, 21, 0.4); }
.dot-done { background: var(--success); }

.blinking-dot { 
    display: inline-block; 
    width: 10px; 
    height: 10px; 
    background-color: var(--danger); 
    border-radius: 50%;
    box-shadow: 0 0 8px var(--danger);
    animation: blink-danger 1s infinite; 
    margin-right: 0.4rem; 
    vertical-align: middle; 
}
@keyframes blink-danger { 
    0% { opacity: 1; transform: scale(1); } 
    50% { opacity: 0.2; transform: scale(0.7); box-shadow: 0 0 2px transparent; } 
    100% { opacity: 1; transform: scale(1); } 
}

.task-list { display: flex; flex-direction: column; gap: 1rem; min-height: 150px; padding-bottom: 2rem; }

/* Task Card */
.task-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 0.5rem; padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; transition: transform 0.2s; cursor: grab; }
.task-card:active { cursor: grabbing; }
.task-card.dragging { opacity: 0.3; border: 2px dashed rgba(255,255,255,0.3); transform: scale(0.98); background: transparent; }
.tilt { transform: rotate(5deg) scale(1.02) !important; box-shadow: 0 15px 25px rgba(0, 0, 0, 0.4) !important; z-index: 100;}
.task-card:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); border-color: rgba(99, 102, 241, 0.4);}
.task-title { font-weight: 600; font-size: 1.1rem; word-break: break-word; line-height: 1.4; }
.task-meta { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.85rem; color: var(--text-secondary); }
.project-badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.75rem; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.5); width: fit-content; border: 1px solid rgba(255,255,255,0.2); box-shadow: 0 2px 5px rgba(0,0,0,0.3); letter-spacing: 0.02em;}
.task-assignee { display: inline-flex; align-items: center; gap: 0.4rem; background: rgba(255,255,255,0.05); padding: 0.3rem 0.6rem; border-radius: 1rem; border: 1px solid var(--border); width: fit-content;}
.color-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,0.1); }
.task-actions { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 0.75rem;}
.task-actions select { background: rgba(0,0,0,0.2); border: 1px solid var(--border); color: white; border-radius: 0.3rem; padding: 0.4rem 0.5rem; font-size: 0.85rem; cursor: pointer; outline: none;}
.task-actions select option { background: var(--bg-color); }
.btn-delete { background: transparent; border: none; color: var(--danger); cursor: pointer; font-size: 1.2rem; opacity: 0.6; transition: opacity 0.2s; }
.btn-delete:hover { opacity: 1; }

/* List View */
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th, .data-table td { padding: 1rem; border-bottom: 1px solid var(--border); }
.data-table th { font-weight: 600; color: var(--text-secondary); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; background: rgba(15, 23, 42, 0.4);}
.data-table tbody tr { transition: background-color 0.2s; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.05); }

.badge { padding: 0.4rem 0.8rem; border-radius: 1rem; font-size: 0.8rem; font-weight: 600; text-align: center; display: inline-block;}
.badge-todo { background: rgba(203, 213, 225, 0.1); color: var(--text-secondary); border: 1px solid var(--border); }
.badge-doing { background: rgba(245, 158, 11, 0.1); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3);}
.badge-done { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3);}

/* Edit & Restore Buttons */
.btn-edit { background: transparent; border: none; color: var(--text-secondary); cursor: pointer; font-size: 1.2rem; opacity: 0.6; transition: opacity 0.2s; margin-right: 0.5rem; }
.btn-edit:hover { opacity: 1; color: var(--text-primary); }
.btn-restore { background: transparent; border: none; color: var(--success); cursor: pointer; font-size: 1.2rem; opacity: 0.6; transition: opacity 0.2s; margin-right: 0.5rem; }
.btn-restore:hover { opacity: 1; }

/* Drawer / Modal Layout */
.drawer-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 999; backdrop-filter: blur(2px); animation: fadeIn 0.3s; }
.drawer { position: fixed; top: 0; right: 0; width: 600px; max-width: 100%; height: 100vh; z-index: 1000; border-radius: 1rem 0 0 1rem; border-right: none; display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); background: rgba(15, 23, 42, 0.95); overflow-y: auto;}
.drawer.open { transform: translateX(0); }
.drawer-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem; border-bottom: 1px solid var(--border); }
.drawer-header h2 { font-size: 1.5rem; margin: 0; }
.btn-close { background: transparent; border: none; color: var(--text-secondary); font-size: 2rem; cursor: pointer; line-height: 1; transition: color 0.2s; }
.btn-close:hover { color: var(--danger); }
.drawer-content { padding: 1.5rem; display: flex; flex-direction: column; gap: 2rem; }

/* Comments */
.comments-section { border-top: 1px solid var(--border); padding-top: 1.5rem; }
.comments-section h3 { font-size: 1.1rem; margin-bottom: 1rem; color: var(--text-secondary); }
.comments-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; max-height: 250px; overflow-y: auto; padding-right: 0.5rem;}
.comments-list::-webkit-scrollbar { width: 6px; }
.comments-list::-webkit-scrollbar-track { background: transparent; }
.comments-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }
.comment-bubble { background: rgba(255, 255, 255, 0.05); border-radius: 0.5rem; padding: 0.75rem 1rem; border: 1px solid var(--border); }
.comment-author { font-weight: 600; font-size: 0.85rem; color: var(--accent-color); margin-bottom: 0.25rem; display: flex; justify-content: space-between;}
.comment-date { font-size: 0.75rem; color: var(--text-secondary); font-weight: 400;}
.comment-text { font-size: 0.95rem; line-height: 1.4; word-break: break-word;}
.comment-form { display: flex; gap: 0.5rem; align-items: stretch; }
.comment-form input { flex: 1; padding: 0.75rem 1rem; background: rgba(0, 0, 0, 0.2); border: 1px solid var(--border); border-radius: 0.5rem; color: white; font-family: inherit;}
.comment-form input:focus { outline: none; border-color: var(--accent-color); }

/* Notificações e Menções (@) */
.mention {
    color: #4ade80; /* Cor verde para destaque */
    font-weight: 700;
}
.notification-item {
    padding: 0.75rem;
    border-radius: 6px;
    background: rgba(255,255,255,0.02);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.notification-item:hover {
    background: rgba(255,255,255,0.05);
}
.notification-item.unread {
    background: rgba(99, 102, 241, 0.15); /* Fundo sutil primário */
    border-left: 3px solid var(--primary);
}
.notification-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}
.notification-text {
    font-size: 0.85rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .task-form-grid { grid-template-columns: 1fr; }
    .board { flex-direction: column; }
    .column { min-width: 100%; }
    .drawer { width: 100%; border-radius: 0; }
}

/* --- LANDING PAGE (SAAS) STYLES --- */
.lp-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.lp-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-radius: 0 0 16px 16px;
    border-top: none;
    border-left: none;
    border-right: none;
    backdrop-filter: blur(20px);
}

.lp-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.lp-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.lp-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.lp-menu a:hover {
    color: var(--primary);
}

.lp-btn-small {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

.lp-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 4rem 5% 2rem 5%;
    text-align: center;
}

.lp-hero-content {
    max-width: 800px;
    width: 100%;
}

.lp-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lp-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.lp-tenant-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem;
}

.lp-section {
    padding: 5rem 5%;
}

.lp-alt-bg {
    background: rgba(0, 0, 0, 0.2);
}

.lp-section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.lp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.lp-card {
    padding: 2.5rem 2rem;
    border-radius: 16px;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.lp-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.lp-card-highlight {
    border: 1px solid var(--primary);
}

.lp-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.lp-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.lp-price {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1.5rem 0;
    color: var(--primary);
}

.lp-price span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.lp-list {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.lp-list li {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.lp-faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
}

.lp-faq-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.lp-faq-item p {
    color: var(--text-secondary);
    line-height: 1.5;
}

.lp-footer {
    padding: 3rem 5%;
    margin-top: auto;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
}

.lp-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 2rem auto;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.lp-footer-content a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 1.5rem;
}

.lp-copyright {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .lp-title { font-size: 2.5rem; }
    .lp-menu { display: none; }
    .lp-footer-content { flex-direction: column; text-align: center; }
    .lp-footer-content a { margin: 0 0.75rem; }
}

/* --- DASHBOARD PROGRESS BAR STYLES --- */
.progress-stacked {
    display: flex;
    height: 10px;
    background-color: var(--border);
    border-radius: 5px;
    overflow: hidden;
    width: 100%;
}

.progress-segment {
    height: 100%;
    transition: width 0.4s ease;
}

.segment-done { background: var(--success); }
.segment-pending { background: var(--warning); }
.segment-review { 
    background: #facc15; 
    animation: pulse-review 2s infinite ease-in-out;
}
.segment-overdue { 
    background: var(--danger);
    animation: pulse-danger 2s infinite ease-in-out;
}

@keyframes pulse-review {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.3); box-shadow: 0 0 10px rgba(250, 204, 21, 0.5); }
    100% { filter: brightness(1); }
}

@keyframes pulse-danger {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.5); box-shadow: 0 0 8px var(--danger); }
    100% { filter: brightness(1); }
}

.kpi-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    margin-top: 0.4rem;
}

.kpi-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
}

