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

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.08);
    --bg: #ffffff;
    --surface: #f5f5f5;
    --surface-raised: #ffffff;
    --text: #111827;
    --text-muted: #6b7280;
    --border: #e5e5e5;
    --border-light: #f0f0f0;
    --error: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --sidebar-width: 260px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
    --transition: 0.15s ease;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111111;
        --surface: #1a1a1a;
        --surface-raised: #1a1a1a;
        --text: #f0f0f0;
        --text-muted: #888888;
        --border: #2a2a2a;
        --border-light: #1e1e1e;
        --primary-light: rgba(99, 102, 241, 0.15);
        --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
        --shadow-md: 0 2px 8px rgba(0,0,0,0.25);
        --shadow-lg: 0 8px 24px rgba(0,0,0,0.3);
    }
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 400;
    font-style: normal;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
    font-size: 0.9375rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

.app-container {
    display: flex;
    height: 100vh;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar {
    width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: auto;
    min-width: 200px;
    max-width: 360px;
    resize: horizontal;
}

.sidebar-header {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
}

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

.logoimg {
    max-width: 90px;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem;
    overflow-y: auto;
}

.nav-item {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text);
    text-decoration: none;
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    transition: all var(--transition);
    font-size: 0.875rem;
    font-weight: 450;
}

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

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-section {
    margin-bottom: 1.25rem;
}

.nav-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 0.75rem;
}

.nav-folder {
    margin-bottom: 2px;
}

.folder-toggle {
    cursor: pointer;
    user-select: none;
}

.folder-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.folder-content.open {
    max-height: 500px;
}

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

.new-project-btn {
    width: 100%;
    padding: 0.625rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition);
    font-size: 0.875rem;
}

.new-project-btn:hover {
    background: var(--primary-dark);
}

/* ==========================================================================
   Header
   ========================================================================== */

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

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.view-toggle {
    display: flex;
    background: var(--surface);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    padding: 2px;
}

.view-toggle button {
    padding: 0.375rem 0.875rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.view-toggle button.active {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.settings-btn {
    background: transparent;
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text);
    transition: all var(--transition);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    text-decoration: none;
    font-size: 0.8125rem;
}

.settings-btn:hover {
    background: var(--surface);
    border-color: var(--text-muted);
    color: var(--text);
}

.new-task-btn {
    padding: 0.375rem 0.875rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
}

.new-task-btn:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Mobile Navigation
   ========================================================================== */

.mobile-nav {
    display: none;
}

/* ==========================================================================
   Icon Buttons
   ========================================================================== */

.btn-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.header-btn {
    padding: 0.375rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
}

.header-btn:hover {
    background: var(--surface);
    border-color: var(--text-muted);
    color: var(--text);
}

/* ==========================================================================
   Forms
   ========================================================================== */

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

.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 0.875rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    font-family: inherit;
}

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

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

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.8125rem;
}

.checkbox-item:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.checkbox-item input[type="checkbox"] {
    width: auto;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-align: center;
    font-size: 0.8125rem;
    font-family: inherit;
    gap: 0.375rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

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

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

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

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

/* ==========================================================================
   Task List (todo-style) & Admin Tables
   ========================================================================== */

.task-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    border: none;
}

.task-table thead {
    display: none;
}

.task-table tbody {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.task-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.875rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
    transition: all var(--transition);
    cursor: pointer;
}

.task-row:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.task-row.overdue {
    border-left: 3px solid var(--error);
    background: rgba(239, 68, 68, 0.04);
}

.task-row.due-today {
    border-left: 3px solid var(--warning);
    background: rgba(245, 158, 11, 0.04);
}

.task-row td {
    padding: 0;
    border: none;
    font-size: 0.875rem;
}

/* First column (task name) takes remaining space */
.task-row td:first-child {
    flex: 1;
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Actions column (last) */
.task-row td:last-child {
    flex-shrink: 0;
}

/* Other metadata columns */
.task-row td:not(:first-child):not(:last-child) {
    flex-shrink: 0;
}

/* Admin tables keep traditional style */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-raised);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
}

.admin-table th {
    background: var(--surface);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-actions {
    display: flex;
    gap: 0.375rem;
    flex-wrap: nowrap;
}

/* ==========================================================================
   Kanban Board
   ========================================================================== */

.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    height: 100%;
    min-height: 0;
}

.kanban-column {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
}

.column-header {
    font-weight: 600;
    font-size: 0.8125rem;
    margin-bottom: 0.75rem;
    padding: 0.375rem 0.25rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.task-card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all var(--transition);
}

.task-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.task-card.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
}

.kanban-column.drag-over {
    background-color: var(--primary-light);
    border: 2px dashed var(--primary);
}

.task-card-header {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.task-card-header .btn {
    opacity: 0;
    transition: opacity var(--transition);
}

.task-card:hover .task-card-header .btn {
    opacity: 1;
}

.task-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;
    align-items: center;
}

/* ==========================================================================
   Badges
   ========================================================================== */

.priority-badge,
.status-badge {
    padding: 0.125rem 0.5rem;
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.priority-urgent { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.priority-high { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.priority-medium { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.priority-low { background: rgba(34, 197, 94, 0.1); color: #16a34a; }

.status-backlog { background: rgba(100, 116, 139, 0.1); color: #64748b; }
.status-scheduled { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.status-in-progress { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.status-awaiting-feedback { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

.tag-badge {
    padding: 0.125rem 0.5rem;
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: white;
}

/* ==========================================================================
   User Avatars
   ========================================================================== */

.assignee-avatars {
    display: flex;
    gap: 0.125rem;
}

.avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 600;
}

.avatar.large {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
}

/* ==========================================================================
   Modals
   ========================================================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
}

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

.modal-content {
    background: var(--surface-raised);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

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

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.close-btn:hover {
    color: var(--text);
    background: var(--surface);
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.08);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.08);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ==========================================================================
   Settings Page Specific
   ========================================================================== */

.settings-section {
    background: var(--surface-raised);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.settings-section h2 {
    margin-bottom: 1.25rem;
    font-size: 1.125rem;
    font-weight: 600;
}

/* ==========================================================================
   Login Page Specific
   ========================================================================== */

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    background: var(--surface-raised);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin: 1rem;
    box-shadow: var(--shadow-lg);
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
}

.hidden {
    display: none;
}

.toggle-form {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.toggle-form a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.toggle-form a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */

/* Desktop: Hide mobile navigation */
.mobile-bottom-nav {
    display: none;
}

.mobile-header-nav {
    display: none;
}

@media (max-width: 768px) {
    body {
        overflow: hidden;
    }

    .app-container {
        flex-direction: column;
        overflow: hidden;
    }

    .sidebar {
        display: none;
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s;
        width: 280px;
        resize: none;
    }

    .sidebar.open {
        display: flex;
        left: 0;
    }

    .mobile-bottom-nav {
        position: fixed;
        bottom: 0.75rem;
        bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
        left: 1rem;
        right: 1rem;
        background: rgba(255, 255, 255, 0.72);
        border: 1px solid rgba(0, 0, 0, 0.06);
        border-radius: 16px;
        padding: 0.5rem 0.75rem;
        display: flex !important;
        justify-content: space-around;
        z-index: 1000;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    }

    @media (prefers-color-scheme: dark) {
        .mobile-bottom-nav {
            background: rgba(26, 26, 26, 0.72);
            border-color: rgba(255, 255, 255, 0.08);
            box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
        }
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: var(--text-muted);
        font-size: 0.6875rem;
        font-weight: 500;
        transition: color var(--transition);
        position: relative;
        padding: 0.25rem 0.75rem;
    }

    .mobile-nav-item.active {
        color: var(--text);
    }

    .mobile-nav-item:before {
        content: '';
        width: 22px;
        height: 22px;
        margin-bottom: 0.125rem;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        opacity: 0.35;
    }

    .mobile-nav-item.active:before {
        opacity: 0.9;
    }

    /* Light mode icons */
    .mobile-nav-item.dashboard:before {
        background-image: url('/assets/img/home.png');
    }

    .mobile-nav-item.projects:before {
        background-image: url('/assets/img/archive.png');
    }

    .mobile-nav-item.settings:before {
        background-image: url('/assets/img/settings.png');
    }

    /* Projects dropdown */
    .projects-dropdown {
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: var(--surface-raised);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 0.375rem 0;
        margin-bottom: 0.5rem;
        min-width: 200px;
        max-height: 300px;
        overflow-y: auto;
        display: none;
        z-index: 1001;
        box-shadow: var(--shadow-lg);
    }

    .projects-dropdown.show {
        display: block;
    }

    .projects-dropdown a {
        display: block;
        padding: 0.625rem 1rem;
        text-decoration: none;
        color: var(--text);
        font-size: 0.875rem;
        border-bottom: 1px solid var(--border-light);
    }

    .projects-dropdown a:last-child {
        border-bottom: none;
    }

    .projects-dropdown a:hover {
        background: var(--primary-light);
    }

    .mobile-nav {
        display: none;
    }

    .main-content {
        flex: 1;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .content {
        flex: 1;
        padding: 1rem;
        padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* --- Kanban board: stacked columns on mobile --- */
    .kanban-board {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        height: auto;
        min-height: 0;
        min-width: 0;
        overflow: visible;
    }

    .kanban-column {
        min-width: 0;
        width: 100%;
        flex: none;
        overflow-y: visible;
        border-radius: var(--radius-md);
    }

    .column-header {
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .column-header::after {
        content: '';
        width: 0;
        height: 0;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 5px solid var(--text-muted);
        transition: transform var(--transition);
    }

    .kanban-column.collapsed .column-header::after {
        transform: rotate(-90deg);
    }

    .kanban-column-cards {
        transition: max-height 0.3s ease;
        overflow: hidden;
    }

    .kanban-column.collapsed .kanban-column-cards,
    .kanban-column.collapsed .task-card {
        display: none;
    }

    /* Empty state in collapsed view */
    .kanban-column.collapsed div[style*="text-align: center"] {
        display: none;
    }

    .task-card {
        margin-bottom: 0.5rem;
    }

    .header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
        padding: 0.75rem 1rem;
    }

    .header-left {
        display: block;
    }

    .header-left h1 {
        margin-bottom: 0.75rem;
        font-size: 1.125rem;
    }

    .mobile-header-nav {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 0;
    }

    .header-actions {
        display: none;
    }

    .task-table {
        display: none;
    }

    .mobile-task-list {
        display: block;
    }

    .mobile-task-card {
        background: var(--surface-raised);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        margin-bottom: 0.25rem;
        padding: 0.625rem 0.75rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .mobile-task-card.overdue {
        border-left: 3px solid var(--error);
        background: rgba(239, 68, 68, 0.04);
    }

    .mobile-task-card.due-today {
        border-left: 3px solid var(--warning);
        background: rgba(245, 158, 11, 0.04);
    }

    .mobile-task-title {
        font-weight: 500;
        font-size: 0.875rem;
        margin-bottom: 0;
        line-height: 1.3;
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-task-meta {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.25rem;
        align-items: center;
        flex-shrink: 0;
    }

    .mobile-task-row {
        display: inline-flex;
        align-items: center;
        padding: 0;
    }

    .mobile-task-label {
        display: none;
    }

    .mobile-task-value {
        text-align: right;
        font-size: 0.75rem;
        color: var(--text-muted);
    }

    .mobile-task-actions {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        display: flex;
        gap: 0.25rem;
        flex-shrink: 0;
    }

    .mobile-task-actions .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.6875rem;
    }

    .settings-section {
        padding: 1rem;
    }

    .table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        margin-top: 1rem;
        position: relative;
    }

    .admin-table {
        min-width: 600px;
        margin-top: 0;
        border: none;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.625rem 0.5rem;
        white-space: nowrap;
        font-size: 0.8125rem;
    }

    .admin-table th:first-child,
    .admin-table td:first-child {
        padding-left: 1rem;
        position: sticky;
        left: 0;
        background: var(--surface-raised);
        z-index: 1;
        box-shadow: 2px 0 5px rgba(0,0,0,0.06);
    }

    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }

    .modal-content {
        margin: 0.75rem;
        width: calc(100% - 1.5rem);
        max-height: calc(100vh - 1.5rem);
        border-radius: var(--radius-lg);
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevent iOS zoom */
    }

    .view-toggle {
        border-radius: var(--radius-sm);
    }
}

/* Dark mode icons */
@media (max-width: 768px) and (prefers-color-scheme: dark) {
    .mobile-nav-item.dashboard:before {
        background-image: url('/assets/img/home-dm.png');
    }

    .mobile-nav-item.projects:before {
        background-image: url('/assets/img/archive-dm.png');
    }

    .mobile-nav-item.settings:before {
        background-image: url('/assets/img/settings-dm.png');
    }
}

@media (min-width: 769px) {
    .mobile-task-list {
        display: none;
    }

    .kanban-board {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
        height: 100%;
    }

    .kanban-column {
        overflow-y: auto;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
