/* ========================================
   Marked OS — Screen Layouts
   ======================================== */

/* ---- Splash Screen ---- */
.splash-screen {
    position: fixed;
    inset: 0;
    z-index: var(--z-splash);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.splash-screen.exit {
    opacity: 0;
    transform: scale(1.05);
}

.splash-content {
    text-align: center;
    animation: fadeInUp 0.6s ease;
}

.splash-logo {
    margin-bottom: var(--space-5);
}

.splash-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: block;
    border-radius: var(--radius-xl);
    object-fit: contain;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
    animation: pulse-glow 2s infinite;
}

.splash-title {
    color: white;
    font-size: var(--text-3xl);
    font-weight: var(--font-extrabold);
    letter-spacing: -0.5px;
    margin-bottom: var(--space-1);
}

.splash-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.splash-loader {
    width: 120px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    margin: var(--space-8) auto 0;
    overflow: hidden;
}

.splash-loader-bar {
    height: 100%;
    width: 0%;
    background: white;
    border-radius: var(--radius-full);
    animation: splash-progress 1.5s ease forwards;
}

/* ---- Offline Screen ---- */
.offline-screen {
    position: fixed;
    inset: 0;
    z-index: var(--z-overlay);
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.offline-content {
    text-align: center;
    padding: var(--space-6);
}

.offline-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-6);
    color: var(--text-tertiary);
}

.offline-content h2 {
    margin-bottom: var(--space-2);
}

.offline-content p {
    margin-bottom: var(--space-6);
    color: var(--text-secondary);
}

/* ---- Auth Screen ---- */
.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: var(--space-5);
}

.auth-view {
    width: 100%;
    max-width: 400px;
    animation: fadeInUp 0.4s ease;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.auth-logo {
    margin-bottom: var(--space-5);
}

.auth-logo img,
.auth-logo svg {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    display: block;
    border-radius: var(--radius-lg);
    object-fit: contain;
}

.auth-header h1 {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-2);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.auth-form {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.auth-switch {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-top: var(--space-5);
}

.auth-switch a {
    font-weight: var(--font-semibold);
}

.verify-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-5);
    animation: pulse-check 2s infinite;
}

/* ---- App Shell ---- */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--top-bar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-3);
    z-index: var(--z-sticky);
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .top-bar {
    background: rgba(30, 33, 48, 0.85);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.top-bar-title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.notification-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: var(--font-bold);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Side Drawer */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: calc(var(--z-overlay) - 1);
    animation: fadeIn 0.2s ease;
}

.side-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--drawer-width);
    background: var(--bg-card);
    z-index: var(--z-overlay);
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.side-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    padding: var(--space-6) var(--space-5);
    background: var(--primary-gradient);
}

.drawer-user {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.drawer-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: var(--font-bold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
}

.drawer-user-name {
    color: white;
    font-weight: var(--font-semibold);
    font-size: var(--text-base);
}

.drawer-user-role {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.drawer-user-tag {
    color: var(--primary-light);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    margin-bottom: 2px;
}

.profile-tag {
    display: inline-block;
    padding: 2px 8px;
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.drawer-user-info {
    display: flex;
    flex-direction: column;
}

.drawer-nav {
    padding: var(--space-3);
    flex: 1;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    transition: all var(--transition-fast);
    margin-bottom: var(--space-1);
}

.drawer-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.drawer-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.drawer-link.active {
    background: var(--primary-50);
    color: var(--primary);
}

.drawer-link.danger {
    color: var(--danger);
}

.drawer-link.danger:hover {
    background: var(--danger-bg);
}

.drawer-divider {
    height: 1px;
    background: var(--border-light);
    margin: var(--space-3) 0;
}

/* Main Content */
.main-content {
    margin-top: var(--top-bar-height);
    margin-bottom: var(--bottom-nav-height);
    min-height: calc(100vh - var(--top-bar-height) - var(--bottom-nav-height));
    overflow-y: auto;
}

.page {
    display: none;
    animation: fadeIn 0.25s ease;
}

.page.active {
    display: block;
}

.page-content {
    padding: var(--space-4);
    max-width: var(--max-content-width);
    margin: 0 auto;
}

/* ---- Dashboard ---- */
.greeting-card {
    background: var(--primary-gradient);
    border-radius: var(--radius-xl);
    padding: var(--space-5) var(--space-6);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-5);
    position: relative;
    overflow: hidden;
}

.greeting-card::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.greeting-card::before {
    content: '';
    position: absolute;
    bottom: -20px;
    right: 40px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.greeting-label {
    font-size: var(--text-sm);
    opacity: 0.8;
    display: block;
    margin-bottom: var(--space-1);
}

.greeting-card h2 {
    color: white;
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
}

.greeting-date {
    font-size: var(--text-xs);
    opacity: 0.7;
    text-align: right;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 20px;
    height: 20px;
}

.stat-card[data-color="primary"] .stat-icon {
    background: var(--primary-100);
    color: var(--primary);
}

.stat-card[data-color="success"] .stat-icon {
    background: var(--success-bg);
    color: var(--success);
}

.stat-card[data-color="warning"] .stat-icon {
    background: var(--warning-bg);
    color: var(--warning);
}

.stat-card[data-color="danger"] .stat-icon {
    background: var(--danger-bg);
    color: var(--danger);
}

.stat-value {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.section-header h3 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
}

/* ---- Task List (Dashboard + List View) ---- */
.task-list,
.task-list-view {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

.task-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    padding: var(--space-3) var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-xs);
}

.task-item:hover {
    border-color: var(--primary-200);
    box-shadow: var(--shadow-sm);
    transform: translateX(2px);
}

.task-item-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-default);
    flex-shrink: 0;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-item-check.checked {
    background: var(--success);
    border-color: var(--success);
}

.task-item-check.checked svg {
    display: block;
}

.task-item-check svg {
    width: 12px;
    height: 12px;
    color: white;
    display: none;
}

.task-item-info {
    flex: 1;
    min-width: 0;
}

.task-item-title {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-item-title.completed {
    text-decoration: line-through;
    color: var(--text-tertiary);
}

.task-item-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-1);
}

.task-item-due {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.task-item-due.overdue {
    color: var(--danger);
    font-weight: var(--font-medium);
}

/* ---- Projects Grid ---- */
.project-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: var(--space-5);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--project-color, var(--primary));
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}

.project-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.project-card-title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
}

.project-card-desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-progress {
    margin-bottom: var(--space-3);
}

.progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
    background: var(--project-color, var(--primary));
}

.progress-text {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-top: var(--space-1);
}

.project-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-task-count {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.project-avatars {
    display: flex;
}

.project-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    font-size: 9px;
    font-weight: var(--font-bold);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
    margin-left: -6px;
}

.project-avatar:first-child {
    margin-left: 0;
}

/* ---- Analytics / Charts ---- */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

.chart-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-4) var(--space-2);
}

.chart-header h4 {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
}

.chart-period {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.chart-body {
    padding: var(--space-3) var(--space-4) var(--space-4);
}

.chart-body canvas {
    width: 100% !important;
    height: auto !important;
}

.project-progress-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border-light);
}

.project-progress-item:last-child {
    border-bottom: none;
}

.project-progress-name {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    width: 100px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-progress-bar {
    flex: 1;
}

.project-progress-percent {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    width: 40px;
    text-align: right;
}

/* ---- Notifications ---- */
.notifications-list {
    display: flex;
    flex-direction: column;
}

.notification-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
    cursor: pointer;
}

.notification-item:hover {
    background: var(--bg-secondary);
}

.notification-item.unread {
    background: var(--primary-50);
}

.notification-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 6px;
}

.notification-item:not(.unread) .notification-dot {
    background: transparent;
}

.notification-body {
    flex: 1;
}

.notification-text {
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.notification-text strong {
    font-weight: var(--font-semibold);
}

.notification-time {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-top: var(--space-1);
}

/* ---- Settings ---- */
.settings-section {
    margin-bottom: var(--space-6);
}

.settings-section h3 {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-3);
}

.settings-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-light);
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
}

.setting-value {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-top: var(--space-1);
}

.setting-desc {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* ---- Bottom Navigation ---- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: var(--z-sticky);
    padding: 0 var(--space-2);
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .bottom-nav {
    background: rgba(30, 33, 48, 0.9);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-2);
    color: var(--text-tertiary);
    font-size: 10px;
    font-weight: var(--font-medium);
    transition: color var(--transition-fast);
    position: relative;
    min-width: 48px;
}

.nav-item svg {
    width: 22px;
    height: 22px;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item:active {
    transform: scale(0.92);
}

.fab-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white !important;
    box-shadow: var(--shadow-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -18px;
    transition: transform var(--transition-spring), box-shadow var(--transition-base);
}

.fab-btn svg {
    width: 24px;
    height: 24px;
}

.fab-btn:hover,
.fab-btn:active {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 20px rgba(163, 21, 53, 0.4);
}

/* FAB Menu */
.fab-menu {
    position: fixed;
    inset: 0;
    z-index: var(--z-overlay);
}

.fab-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
}

.fab-options {
    position: absolute;
    bottom: calc(var(--bottom-nav-height) + var(--space-4));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: center;
}

.fab-option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    animation: fadeInUp 0.3s ease backwards;
}

.fab-option:nth-child(1) {
    animation-delay: 0.05s;
}

.fab-option:nth-child(2) {
    animation-delay: 0.1s;
}

.fab-option-label {
    padding: var(--space-2) var(--space-3);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    box-shadow: var(--shadow-md);
    white-space: nowrap;
}

.fab-option-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-primary);
    transition: transform var(--transition-fast);
}

.fab-option-icon svg {
    width: 20px;
    height: 20px;
}

.fab-option:hover .fab-option-icon {
    transform: scale(1.1);
}

/* ---- Page Toolbar ---- */
.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
    gap: var(--space-2);
}

.toolbar-title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
}

.toolbar-actions {
    display: flex;
    gap: var(--space-2);
}

.view-toggle {
    display: flex;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 3px;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.view-btn svg {
    width: 14px;
    height: 14px;
}

.view-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* ---- Desktop Responsive ---- */
@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-card.full-width {
        grid-column: span 2;
    }
}

@media (min-width: 1024px) {
    .main-content {
        margin-left: var(--drawer-width);
        margin-bottom: 0;
    }

    .side-drawer {
        transform: translateX(0);
        box-shadow: none;
        border-right: 1px solid var(--border-light);
    }

    .drawer-overlay {
        display: none !important;
    }

    .bottom-nav {
        display: none;
    }

    .top-bar {
        left: var(--drawer-width);
    }

    #menu-btn {
        display: none;
    }

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---- Team Management ---- */
.section-desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    line-height: 1.5;
}

.team-member-row {
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s ease;
}

.team-member-row:last-child {
    border-bottom: none;
}

.team-member-row:hover {
    background: var(--bg-hover);
}

.team-member-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    letter-spacing: 0.5px;
}

.team-role-control {
    display: flex;
    align-items: center;
}

.select-sm {
    min-width: 120px;
}

.select-sm select {
    padding: 6px 28px 6px 10px;
    font-size: var(--text-xs);
    border-radius: var(--radius-md);
}

/* Role Badges */
.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.role-super_admin {
    background: linear-gradient(135deg, #A31535 0%, #D4183D 100%);
    color: white;
}

.role-admin {
    background: linear-gradient(135deg, #7C3AED 0%, #9F67FF 100%);
    color: white;
}

.role-lead {
    background: linear-gradient(135deg, #2563EB 0%, #60A5FA 100%);
    color: white;
}

.role-standard {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

/* Sign Out Button */
.btn-danger-outline {
    border-color: var(--danger);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-3);
}

.profile-summary h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-summary .badge {
    font-size: 0.7rem;
}

.btn-danger-outline:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

/* ========================================
   NEW FEATURES — Styles
   ======================================== */

/* ---- Inline Tabs (Project Type) ---- */
.tabs-inline {
    display: flex;
    gap: var(--space-1);
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 3px;
    border: 1px solid var(--border);
}

.tab-btn {
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 6px rgba(163, 21, 53, 0.3);
}

.tab-btn:not(.active):hover {
    background: var(--card-bg);
    color: var(--text-primary);
}

/* ---- Inline Search ---- */
.search-inline {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px 12px;
    flex: 1;
    max-width: 280px;
}

.search-inline svg {
    opacity: 0.4;
    flex-shrink: 0;
}

.search-inline input {
    border: none;
    background: transparent;
    font-size: 0.85rem;
    outline: none;
    width: 100%;
    color: var(--text-primary);
}

/* ---- Notes Masonry Grid ---- */
.notes-masonry {
    columns: 2;
    column-gap: var(--space-3);
    padding-bottom: var(--space-5);
}

@media (min-width: 480px) {
    .notes-masonry {
        columns: 3;
    }
}

@media (min-width: 768px) {
    .notes-masonry {
        columns: 4;
    }
}

.note-card {
    background: var(--note-bg, #fff);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    margin-bottom: var(--space-3);
    break-inside: avoid;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.note-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-light);
}

.note-card.pinned {
    border-color: var(--primary);
    border-width: 2px;
}

.note-pin-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    color: var(--primary);
    opacity: 0.6;
}

.note-card-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: var(--space-1);
    color: var(--text-primary);
    line-height: 1.3;
}

.note-card-preview {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--space-2);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
}

.note-card-project {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--project-color, var(--primary)) 12%, transparent);
    color: var(--project-color, var(--primary));
    font-weight: 600;
    white-space: nowrap;
}

.note-card-time {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}

/* ---- Note Editor Modal ---- */
.note-modal {
    max-width: 640px;
}

.note-title-input {
    border: none;
    background: transparent;
    font-size: 1.25rem;
    font-weight: 700;
    width: 100%;
    outline: none;
    color: var(--text-primary);
    padding: var(--space-2) 0;
    margin-bottom: var(--space-2);
}

.note-title-input::placeholder {
    color: var(--text-tertiary);
}

.note-color-picker {
    display: flex;
    gap: 8px;
    margin-bottom: var(--space-3);
}

.note-color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.15s ease;
}

.note-color-swatch:hover {
    transform: scale(1.15);
}

.note-color-swatch.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(163, 21, 53, 0.2);
}

.note-format-bar {
    display: flex;
    gap: 4px;
    padding: 6px 8px;
    background: var(--surface);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2);
    border: 1px solid var(--border);
}

.fmt-btn {
    width: 32px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.fmt-btn:hover {
    background: var(--card-bg);
    color: var(--text-primary);
}

.fmt-sep {
    width: 1px;
    background: var(--border);
    margin: 4px 4px;
}

.note-body {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    font-size: 0.9rem;
    line-height: 1.7;
    outline: none;
    color: var(--text-primary);
    background: var(--surface);
}

.note-body:empty::before {
    content: attr(data-placeholder);
    color: var(--text-tertiary);
}

.note-body blockquote {
    border-left: 3px solid var(--primary);
    padding-left: var(--space-3);
    margin: var(--space-2) 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* ---- Calendar ---- */
.cal-nav {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.cal-month-title {
    font-size: 1rem;
    font-weight: 700;
    min-width: 160px;
    text-align: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.cal-day-header {
    padding: 8px;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    background: var(--surface);
}

.cal-day {
    min-height: 72px;
    padding: 6px;
    background: var(--card-bg);
    position: relative;
}

.cal-day.other-month {
    opacity: 0.3;
}

.cal-day.today {
    background: color-mix(in srgb, var(--primary) 6%, var(--card-bg));
}

.cal-day.today .cal-day-num {
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.cal-day-num {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cal-task-dot {
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 3px;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: default;
}

.cal-task-dot.priority-high,
.cal-task-dot.priority-urgent {
    background: color-mix(in srgb, var(--danger) 15%, transparent);
    color: var(--danger);
}

.cal-task-dot.priority-medium {
    background: color-mix(in srgb, var(--warning) 15%, transparent);
    color: var(--warning);
}

.cal-task-dot.priority-low {
    background: color-mix(in srgb, var(--success) 15%, transparent);
    color: var(--success);
}

.cal-task-dot.completed {
    text-decoration: line-through;
    opacity: 0.5;
}

.cal-more {
    font-size: 0.6rem;
    color: var(--primary);
    font-weight: 600;
}

/* ---- Global Search Overlay ---- */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-modal) + 10);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    animation: fadeIn 0.15s ease;
}

.search-modal {
    width: 90%;
    max-width: 560px;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-12px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-modal-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border);
}

.search-modal-header input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    outline: none;
    color: var(--text-primary);
}

.search-close-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.search-close-btn kbd {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-tertiary);
    font-family: inherit;
}

.search-results {
    max-height: 360px;
    overflow-y: auto;
    padding: var(--space-2);
}

.search-section {
    padding: var(--space-1) 0;
}

.search-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    padding: var(--space-1) var(--space-2);
    display: block;
}

.search-result {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 10px var(--space-3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.15s ease;
}

.search-result:hover {
    background: var(--surface);
}

.search-result-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.5;
}

.search-result-icon svg {
    width: 16px;
    height: 16px;
}

.search-result-text {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-sub {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    display: block;
}

.search-result-arrow {
    width: 14px;
    height: 14px;
    opacity: 0.2;
    flex-shrink: 0;
}

.search-empty,
.search-hint {
    text-align: center;
    padding: var(--space-5) var(--space-3);
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.search-hint kbd {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    font-family: inherit;
    margin: 0 2px;
}

.search-more {
    font-size: 0.75rem;
    color: var(--primary);
    padding: var(--space-1) var(--space-3);
    display: block;
}

/* ---- Contacts ---- */
.contacts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.contact-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.contact-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.contact-info {
    flex: 1;
    min-width: 0;
}

.contact-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    display: block;
}

.contact-company {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    display: block;
}

.contact-detail {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.contact-project-tag {
    font-size: 0.65rem;
    padding: 3px 10px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--project-color, var(--primary)) 12%, transparent);
    color: var(--project-color, var(--primary));
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.form-row {
    display: flex;
    gap: var(--space-3);
}

.form-row .form-group {
    flex: 1;
}

/* ---- Activity Timeline ---- */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.activity-date-group {
    margin-bottom: var(--space-3);
}

.activity-date-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    padding: var(--space-1) 0;
    margin-bottom: var(--space-1);
    border-bottom: 1px solid var(--border);
}

.activity-entry {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 8px 0;
}

.activity-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary);
}

.activity-icon svg {
    width: 14px;
    height: 14px;
}

.activity-icon.task_completed {
    background: color-mix(in srgb, var(--success) 12%, transparent);
    color: var(--success);
}

.activity-icon.task_deleted,
.activity-icon.note_deleted {
    background: color-mix(in srgb, var(--danger) 12%, transparent);
    color: var(--danger);
}

.activity-icon.timer_started,
.activity-icon.timer_stopped {
    background: color-mix(in srgb, var(--warning) 12%, transparent);
    color: var(--warning);
}

.activity-body {
    flex: 1;
    min-width: 0;
}

.activity-message {
    font-size: 0.8rem;
    color: var(--text-primary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-time {
    font-size: 0.65rem;
    color: var(--text-tertiary);
}

/* ---- Active Timer Bar ---- */
.active-timer {
    position: fixed;
    bottom: calc(var(--nav-height) + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-modal);
    background: var(--card-bg);
    border: 2px solid var(--primary);
    border-radius: 99px;
    padding: 8px 16px 8px 12px;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    box-shadow: 0 8px 32px rgba(163, 21, 53, 0.2);
    animation: slideUp 0.3s ease;
    min-width: 220px;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.timer-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--danger);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.timer-info {
    flex: 1;
    min-width: 0;
}

.timer-task-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timer-elapsed {
    font-size: 0.9rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
}

.timer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timer-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.timer-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.timer-stop-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    line-height: 0;
    transition: all 0.2s ease;
}

.timer-stop-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.timer-stop-btn svg {
    width: 14px;
    height: 14px;
}

/* ---- Template Picker ---- */
.template-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-2);
    transition: all 0.2s ease;
}

.template-card:hover {
    border-color: var(--primary-light);
    background: var(--surface);
}

.template-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
}

.template-icon svg {
    width: 20px;
    height: 20px;
}

.template-info {
    flex: 1;
}

.template-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    display: block;
}

.template-desc {
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

.template-use-btn {
    flex-shrink: 0;
}

/* ---- Time Log ---- */
.time-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.time-entry:last-child {
    border-bottom: none;
}

.time-entry-task {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    display: block;
}

.time-entry-date {
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.time-entry-duration {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

/* ---- Quick Capture Bar ---- */
.quick-capture-bar {
    margin-bottom: var(--space-6);
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 6px;
    display: flex;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.quick-capture-bar:focus-within {
    border-color: var(--primary-light);
    box-shadow: 0 8px 24px rgba(163, 21, 53, 0.1);
}

#quick-capture-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 14px;
    font-size: 0.95rem;
    outline: none;
    color: var(--text-primary);
}

.quick-capture-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.quick-capture-btn:hover {
    transform: scale(1.05);
    background: var(--primary-dark);
}

.quick-capture-btn svg {
    width: 20px;
    height: 20px;
}

/* ---- Productivity Heatmap ---- */
.heatmap-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    margin-top: var(--space-6);
}

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(26, 1fr);
    gap: 3px;
    margin-top: var(--space-4);
}

.heatmap-cell {
    aspect-ratio: 1;
    background: var(--surface);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.heatmap-cell[data-level="1"] {
    background: color-mix(in srgb, var(--primary) 25%, var(--surface));
}

.heatmap-cell[data-level="2"] {
    background: color-mix(in srgb, var(--primary) 50%, var(--surface));
}

.heatmap-cell[data-level="3"] {
    background: color-mix(in srgb, var(--primary) 75%, var(--surface));
}

.heatmap-cell[data-level="4"] {
    background: var(--primary);
}

.heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: var(--space-3);
    font-size: 0.65rem;
    color: var(--text-tertiary);
}

.heatmap-legend .heatmap-cell {
    width: 10px;
    height: 10px;
}

.heatmap-container {
    overflow-x: auto;
    padding-bottom: 4px;
}

/* ---- Dashboard Columns Override ---- */
@media (min-width: 992px) {
    .dashboard-columns {
        grid-template-columns: 3fr 2fr;
    }
}

.dashboard-col {
    min-width: 0;
}

.pinned-notes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
}

.pinned-notes-grid .note-card {
    margin-bottom: 0;
}

/* ---- Profile Image Upload ---- */
.profile-avatar-upload {
    position: relative;
    width: 72px;
    height: 72px;
    cursor: pointer;
}

.profile-avatar-upload .avatar-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-light);
}

.profile-avatar-upload .avatar-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
}

.profile-avatar-upload:hover .avatar-overlay {
    opacity: 1;
}

/* ---- Modal Enhancements ---- */
.modal-actions {
    display: flex;
    gap: var(--space-1);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: var(--surface);
    color: var(--text-primary);
}

.section-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

/* ---- Activity Feed Page ---- */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ---- Sub-checklist Styles ---- */
.sub-checklist {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: var(--space-2);
}

.sub-checklist-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

.sub-checklist-item:last-child {
    border-bottom: none;
}

.sub-checklist-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sub-checklist-item.done span {
    text-decoration: line-through;
    opacity: 0.5;
}

.sub-checklist-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.sub-checklist-item span {
    flex: 1;
    font-size: 0.9rem;
}

.remove-subtask {
    opacity: 0;
    transition: opacity 0.2s;
    color: var(--danger);
    padding: 2px;
}

.sub-checklist-item:hover .remove-subtask {
    opacity: 1;
}

.sub-checklist-add {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: rgba(255, 255, 255, 0.02);
}

.sub-checklist-add input {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
}

.sub-checklist-add .icon-btn {
    width: 24px;
    height: 24px;
    color: var(--primary);
}