* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'DM Sans', -apple-system, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #dbeafe 0%, #f5f3ff 50%, #dcfce7 100%);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: #2c3e50;
    letter-spacing: 1px;
}

/* ─── Top Bar ───────────────────────────────────── */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 10px;
}

.top-bar h1 {
    margin-bottom: 0;
    font-size: 1.6rem;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 6px 8px 6px 14px;
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.greeting {
    font-size: 14px;
    color: #374151;
    padding-right: 8px;
    border-right: 1px solid #e5e7eb;
    margin-right: 4px;
}

.top-link {
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 999px;
    text-decoration: none;
    color: #4b5563;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.top-link:hover {
    background: #f3f4f6;
    color: #111827;
}

.top-link.logout {
    color: #ef4444;
}

.top-link.logout:hover {
    background: #fef2f2;
    color: #dc2626;
}

.top-link.feedback {
    color: #f59e0b;
}

.top-link.feedback:hover {
    background: #fffbeb;
}

.top-link.dashboard {
    color: #2563eb;
    font-weight: 600;
}

.top-link.dashboard:hover {
    background: #eff6ff;
}

.greeting {
    color: #555;
}

.top-link {
    text-decoration: none;
    color: #3498db;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.top-link:hover {
    background: #ebf5fb;
}

.top-link.logout {
    color: #e74c3c;
}

.top-link.logout:hover {
    background: #fdedec;
}

/* ─── Add Task Button ───────────────────────────── */
.add-task-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.add-task-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(52, 152, 219, 0.3);
}

.add-task-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.add-task-btn:active {
    transform: translateY(0);
}

.add-task-icon {
    font-size: 1.3rem;
    font-weight: 300;
    line-height: 1;
}

/* ─── Search Bar ────────────────────────────────── */
.search-bar {
    max-width: 500px;
    margin: 0 auto 24px;
    padding: 0 16px;
}

.search-bar input {
    width: 100%;
    padding: 10px 16px;
    font-size: 0.88rem;
    font-family: inherit;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    color: #2c3e50;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.12);
}

.search-bar input::placeholder {
    color: #bbb;
}

/* ─── Add Task Modal ────────────────────────────── */
.add-task-modal h2 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: left;
}

.add-task-modal label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    margin-top: 14px;
}

.add-task-modal label:first-of-type {
    margin-top: 0;
}

.add-task-modal input,
.add-task-modal select,
.add-task-modal textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.92rem;
    font-family: inherit;
    outline: none;
    transition: border 0.2s;
    background: #fafafa;
}

.add-task-modal input:focus,
.add-task-modal select:focus,
.add-task-modal textarea:focus {
    border-color: #3498db;
    background: #fff;
}

.add-task-modal textarea {
    resize: vertical;
    min-height: 90px;
}

.modal-form-row {
    display: flex;
    gap: 14px;
    margin-top: 14px;
}

.modal-form-col {
    flex: 1;
}

.modal-form-col label {
    margin-top: 0;
}

.btn-create {
    background: #3498db;
    color: #fff;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-create:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

/* ─── Board ─────────────────────────────────────── */
.board {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
}

/* ─── Columns ───────────────────────────────────── */
.column {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    width: 300px;
    min-height: 500px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.column h2 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #eee;
}

#todo h2       { border-color: #e74c3c; color: #e74c3c; }
#inprogress h2 { border-color: #f39c12; color: #f39c12; }
#done h2       { border-color: #2ecc71; color: #2ecc71; }

/* ─── Cards ─────────────────────────────────────── */
.card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    cursor: grab;
    position: relative;
    border-left: 4px solid #3498db;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.card-header strong {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card strong {
    font-size: 0.95rem;
    color: #2c3e50;
    flex: 1;
}

.card p {
    font-size: 0.85rem;
    color: #777;
    line-height: 1.4;
    margin-bottom: 8px;
}

.deadline {
    font-size: 0.78rem;
    color: #999;
    margin-top: 6px;
}

/* ─── Priority Card Border Colors ───────────────── */
.card.priority-low      { border-left-color: #95a5a6; }
.card.priority-medium   { border-left-color: #3498db; }
.card.priority-high     { border-left-color: #f39c12; }
.card.priority-urgent   { border-left-color: #e74c3c; }
.card.priority-fire     { border-left-color: #c0392b; }

/* ─── Priority Badges ───────────────────────────── */
.priority-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.priority-badge.low     { background: #ecf0f1; color: #7f8c8d; }
.priority-badge.medium  { background: #d6eaf8; color: #2980b9; }
.priority-badge.high    { background: #fef9e7; color: #f39c12; }
.priority-badge.urgent  { background: #fadbd8; color: #e74c3c; }
.priority-badge.fire    { background: #f9ebea; color: #c0392b; }

/* ─── Modal Overlay ─────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.15s ease;
}

.modal-overlay.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ─── Modal Box ─────────────────────────────────── */
.modal {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    width: 460px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: slideUp 0.2s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.modal-header h2 {
    font-size: 1.2rem;
    color: #2c3e50;
    flex: 1;
}

.modal-description {
    font-size: 0.92rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 14px;
    min-height: 20px;
}

.modal-deadline {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 20px;
}

/* ─── Modal Actions ─────────────────────────────── */
.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.modal-actions button {
    padding: 9px 14px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.modal-actions button:hover {
    transform: translateY(-1px);
}

.btn-edit   { background: #3498db; color: #fff; }
.btn-edit:hover   { background: #2980b9; }

.btn-delete { background: #e74c3c; color: #fff; }
.btn-delete:hover { background: #c0392b; }

.btn-close  { background: #ecf0f1; color: #555; margin-left: auto; }
.btn-close:hover  { background: #dde1e4; }

/* ─── Edit Mode Form ────────────────────────────── */
#edit-mode h2 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 18px;
}

#edit-mode label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    margin-top: 14px;
}

#edit-mode input,
#edit-mode select,
#edit-mode textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.92rem;
    font-family: inherit;
    outline: none;
    transition: border 0.2s;
    background: #fafafa;
}

#edit-mode input:focus,
#edit-mode select:focus,
#edit-mode textarea:focus {
    border-color: #3498db;
    background: #fff;
}

#edit-mode textarea {
    resize: vertical;
    min-height: 80px;
}

/* ─── Utility ───────────────────────────────────── */
.hidden {
    display: none !important;
}

/* ─── Created Date ──────────────────────────────── */
.created-date {
    font-size: 0.75rem;
    color: #bbb;
    margin-top: 6px;
}

/* ─── Counter ───────────────────────────────────── */
.counter {
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 5px;
    padding: 3px 0;
}

.counter.remaining  { color: #27ae60; }
.counter.open       { color: #7f8c8d; }
.counter.due-today  { color: #f39c12; }
.counter.overdue    { color: #e74c3c; font-weight: 700; }

/* ─── Modal Counter & Created ───────────────────── */
.modal-counter {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.modal-created {
    font-size: 0.82rem;
    color: #aaa;
    margin-bottom: 4px;
}

/* ─── Sort Bar ──────────────────────────────────── */
/* ─── Column Toolbar (Sort + Filter) ────────────── */
.column-toolbar {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.toolbar-select {
    flex: 1;
    padding: 6px 10px;
    font-size: 0.74rem;
    font-weight: 600;
    color: #777;
    background: #f5f6f8;
    border: 1.5px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23aaa'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 26px;
    transition: all 0.2s;
}

.toolbar-select:hover {
    background-color: #eef0f4;
    border-color: #d0d0d0;
    color: #555;
}

.toolbar-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.15);
    color: #444;
}

.toolbar-select.active-sort {
    background-color: #eaf2fb;
    border-color: #3498db;
    color: #2980b9;
}

.toolbar-select.active-filter {
    border-color: #2c3e50;
    color: #2c3e50;
    background-color: #f0f1f3;
}

.toolbar-select.active-filter.filter-low    { border-color: #95a5a6; color: #7f8c8d; background-color: #f4f6f6; }
.toolbar-select.active-filter.filter-medium { border-color: #3498db; color: #2980b9; background-color: #eaf2fb; }
.toolbar-select.active-filter.filter-high   { border-color: #f39c12; color: #e67e22; background-color: #fef9e7; }
.toolbar-select.active-filter.filter-urgent { border-color: #e74c3c; color: #c0392b; background-color: #fdf0ef; }
.toolbar-select.active-filter.filter-fire   { border-color: #c0392b; color: #c0392b; background-color: #f9ebea; }


/* ─── Filter Bar ────────────────────────────────── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 14px;
}

.filter-btn {
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    border: 2px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f0f2f5;
    color: #888;
    letter-spacing: 0.3px;
}

.filter-btn:hover {
    transform: translateY(-1px);
}

.filter-btn.active {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}

.filter-btn.low.active    { background: #95a5a6; border-color: #95a5a6; color: #fff; }
.filter-btn.medium.active { background: #3498db; border-color: #3498db; color: #fff; }
.filter-btn.high.active   { background: #f39c12; border-color: #f39c12; color: #fff; }
.filter-btn.urgent.active { background: #e74c3c; border-color: #e74c3c; color: #fff; }
.filter-btn.fire.active   { background: #c0392b; border-color: #c0392b; color: #fff; }

.filter-btn.low:hover    { background: #ecf0f1; color: #7f8c8d; border-color: #95a5a6; }
.filter-btn.medium:hover { background: #d6eaf8; color: #2980b9; border-color: #3498db; }
.filter-btn.high:hover   { background: #fef9e7; color: #f39c12; border-color: #f39c12; }
.filter-btn.urgent:hover { background: #fadbd8; color: #e74c3c; border-color: #e74c3c; }
.filter-btn.fire:hover   { background: #f9ebea; color: #c0392b; border-color: #c0392b; }

/* ─── URL / Long word fix ───────────────────────── */
.card p,
.modal-description {
    overflow-wrap: break-word;
    word-break: break-word;
}

.card p a,
.modal-description a {
    color: #3498db;
    text-decoration: underline;
}

.card p a:hover,
.modal-description a:hover {
    color: #2980b9;
}


/* ═══════════════════════════════════════════════════
   AUTH PAGES — Login / Register
   ═══════════════════════════════════════════════════ */

.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
}

.auth-logo {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ─── CSS Logo Mark (S) ─────────────────────────── */
.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 8px;
    flex-shrink: 0;
}

.logo-mark-sm {
    width: 28px;
    height: 28px;
    font-size: 0.95rem;
    border-radius: 7px;
}

.auth-card h1 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 4px;
}

.auth-subtitle {
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 28px;
}

/* ─── Form Groups ───────────────────────────────── */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.form-group .optional {
    font-weight: 400;
    text-transform: none;
    color: #aaa;
    font-size: 0.78rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.92rem;
    font-family: inherit;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
    background: #fafafa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.form-group input:disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: #bbb;
    margin-top: 4px;
}

/* ─── Primary Button ────────────────────────────── */
.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    margin-top: 6px;
}

.btn-primary:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ─── Auth Footer ───────────────────────────────── */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.88rem;
    color: #999;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ─── Alerts ────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.alert a {
    font-weight: 600;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-success a {
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


/* ═══════════════════════════════════════════════════
   PROFILE PAGE
   ═══════════════════════════════════════════════════ */

.profile-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* ─── Profile Nav ───────────────────────────────── */
.profile-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.back-link,
.logout-link {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.2s;
}

.back-link {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.25);
}

.logout-link {
    color: #ffcccc;
}

.logout-link:hover {
    background: rgba(255, 100, 100, 0.15);
}

/* ─── Profile Header ────────────────────────────── */
.profile-header {
    text-align: center;
    margin-bottom: 30px;
}

.avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.profile-header h1 {
    color: #fff;
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.member-since {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.profile-age {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
}

/* ─── Stats Grid ────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 16px 10px;
    text-align: center;
    backdrop-filter: blur(4px);
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* ─── Profile Sections ──────────────────────────── */
.profile-section {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.profile-section h2 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f2f5;
    text-align: left;
}

/* ═══════════════════════════════════════════════════
   REGISTRATION FORM — Wide Layout
   ═══════════════════════════════════════════════════ */

.auth-container-wide {
    max-width: 520px;
}

/* ─── Two-Column Row ────────────────────────────── */
.form-row {
    display: flex;
    gap: 14px;
}

.form-row .form-group {
    flex: 1;
}

@media (max-width: 540px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ─── Required / Optional Indicators ────────────── */
.required {
    color: #e74c3c;
    font-weight: 400;
}

/* ─── Terms Checkbox ────────────────────────────── */
.terms-group {
    margin-top: 4px;
    margin-bottom: 22px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #555;
    cursor: pointer;
    text-transform: none;
    font-weight: 400;
    letter-spacing: 0;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.checkbox-label a:hover {
    text-decoration: underline;
}


/* ═══════════════════════════════════════════════════
   FEEDBACK PAGE
   ═══════════════════════════════════════════════════ */

.feedback-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.feedback-header {
    text-align: center;
    margin-bottom: 28px;
}

.feedback-header h1 {
    color: #fff;
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.feedback-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.92rem;
}

.feedback-section {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.feedback-section h2 {
    font-size: 1.05rem;
    color: #2c3e50;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f2f5;
}

/* ─── Feedback Link in Top Bar ──────────────────── */
.top-link.feedback {
    color: #f39c12;
}

.top-link.feedback:hover {
    background: #fef9e7;
}

/* ─── Feedback List ─────────────────────────────── */
.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feedback-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px;
    border-left: 4px solid #ddd;
}

.feedback-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 8px;
}

.feedback-message {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 8px;
}

.feedback-date {
    font-size: 0.78rem;
    color: #bbb;
}

/* ─── Feedback Type Badges ──────────────────────── */
.feedback-type-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-feedback        { background: #d6eaf8; color: #2980b9; }
.type-suggestion      { background: #d5f5e3; color: #27ae60; }
.type-feature_request { background: #fef9e7; color: #f39c12; }
.type-bug             { background: #fadbd8; color: #e74c3c; }

/* ─── Feedback Status Badges ────────────────────── */
.feedback-status {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-new         { background: #ebf5fb; color: #3498db; }
.status-read        { background: #f0f2f5; color: #7f8c8d; }
.status-in_progress { background: #fef9e7; color: #f39c12; }
.status-resolved    { background: #d5f5e3; color: #27ae60; }
.status-dismissed   { background: #f0f2f5; color: #bbb; }

/* ─── Feedback Item Border Colors by Type ───────── */
.feedback-item.fb-type-feedback        { border-left-color: #3498db; }
.feedback-item.fb-type-suggestion      { border-left-color: #27ae60; }
.feedback-item.fb-type-feature_request { border-left-color: #f39c12; }
.feedback-item.fb-type-bug             { border-left-color: #e74c3c; }


/* ═══════════════════════════════════════════════════
   LEGAL / PRIVACY PAGE
   ═══════════════════════════════════════════════════ */

.legal-container {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.legal-nav {
    margin-bottom: 24px;
}

.legal-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.legal-card h1 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 6px;
}

.legal-updated {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 30px;
}

.legal-card h2 {
    font-size: 1.05rem;
    color: #2c3e50;
    margin-top: 28px;
    margin-bottom: 10px;
    text-align: left;
}

.legal-card p {
    font-size: 0.92rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 10px;
}


/* ═══════════════════════════════════════════════════
   COOKIE CONSENT BANNER
   ═══════════════════════════════════════════════════ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #1a1a2e;
    padding: 0;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-text {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    flex: 1;
}

.cookie-text a {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
}

.cookie-text a:hover {
    color: #93c5fd;
}

.cookie-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cookie-accept {
    background: #3498db;
    color: #fff;
}

.cookie-accept:hover {
    background: #2980b9;
}

.cookie-decline {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.cookie-decline:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

@media (max-width: 640px) {
    .cookie-inner {
        flex-direction: column;
        text-align: center;
        padding: 16px 20px;
    }

    .cookie-buttons {
        width: 100%;
    }

    .cookie-btn {
        flex: 1;
    }
}

.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    margin-top: 40px;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
    color: #9ca3af;
}

.app-footer a {
    color: #9ca3af;
    text-decoration: none;
}

.app-footer a:hover {
    color: #4f46e5;
}

/* ─── Hamburger & Mobile Menu ───────────────────── */
.mobile-menu-wrapper {
    display: none;
}

.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.15s;
}

.hamburger-btn:hover {
    background: #f3f4f6;
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: #4b5563;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
    display: none;
}

.mobile-col-edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.82rem;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.15s;
}

.mobile-col-edit-btn:hover {
    background: #f1f5f9;
}

/* ═══════════════════════════════════════════════════
   MOBILE BOARD — Swipeable columns
   ═══════════════════════════════════════════════════ */

   @media (max-width: 768px) {

    /* ─── Notifications ── */
    .notif-panel {
        position: fixed;
        top: unset;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 60vh;
        border-radius: 16px 16px 0 0;
        z-index: 2000;
        background: #fff;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
    }

    .notif-bell {
        padding: 4px 6px;
    }

    /* ─── Top bar ── */
    .top-bar-right {
        display: none;
    }
    
    .mobile-menu-wrapper {
        display: flex;
        align-items: center;
        gap: 4px;
    }
    
    .mobile-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 260px;
        height: 100vh;
        background: #fff;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
        z-index: 3000;
        padding: 20px 0;
        display: flex;
        flex-direction: column;
        animation: slideInMenu 0.2s ease;
    }
    
    .mobile-menu.hidden {
        display: none !important;
    }
    
    @keyframes slideInMenu {
        from { transform: translateX(100%); }
        to   { transform: translateX(0); }
    }
    
    .mobile-menu-greeting {
        font-size: 0.85rem;
        color: #374151;
        padding: 10px 20px 12px;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 2px;
    }
    
    .mobile-menu-link {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 11px 20px;
        font-size: 0.88rem;
        font-weight: 500;
        color: #374151;
        text-decoration: none;
        transition: background 0.15s;
        position: relative;
    }
    
    .mobile-menu-link:hover,
    .mobile-menu-link:active {
        background: #f9fafb;
    }
    
    .mobile-menu-link.dashboard {
        color: #2563eb;
        font-weight: 600;
    }
    
    .mobile-menu-link.logout {
        color: #ef4444;
        margin-top: 8px;
        border-top: 1px solid #f0f0f0;
    }
    
    .mobile-menu-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 2999;
        animation: fadeIn 0.15s ease;
    }

    .top-link {
        font-size: 0.75rem;
        padding: 4px 7px;
    }

    .greeting {
        font-size: 0.78rem;
        padding-right: 6px;
    }

    /* ─── New task button ── */
    .add-task-bar {
        padding: 10px 14px;
    }

    .add-task-btn {
        width: 100%;
        justify-content: center;
    }

    /* ─── Search bar ── */
    .search-bar {
        padding: 0 14px;
        margin-bottom: 16px;
    }

    .search-bar input {
        font-size: 0.82rem;
        padding: 9px 14px;
    }

    /* ─── Column indicator dots ── */
    .column-indicator {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        padding: 8px 0 4px;
    }

    .column-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #cbd5e1;
        transition: all 0.2s;
        cursor: pointer;
    }

    .column-dot.active {
        background: #2563eb;
        width: 22px;
        border-radius: 4px;
    }

    /* ─── Column label shown above cards ── */
    .mobile-column-label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px 8px;
        font-size: 0.78rem;
        color: #94a3b8;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mobile-col-nav {
        display: flex;
        gap: 6px;
    }

    .mobile-col-btn {
        background: #f1f5f9;
        border: none;
        border-radius: 6px;
        padding: 4px 10px;
        font-size: 0.78rem;
        color: #64748b;
        cursor: pointer;
        font-weight: 600;
    }

    .mobile-col-btn:disabled {
        opacity: 0.3;
        cursor: default;
    }

    /* ─── Board becomes a swipeable container ── */
    .board {
        display: block;
        overflow: hidden;
        padding: 0;
        position: relative;
    }

    .board-swipe-wrapper {
        display: flex;
        transition: transform 0.3s ease;
        will-change: transform;
    }

    /* ─── Each column takes full width ── */
    .column {
        min-width: 100%;
        width: 100%;
        flex-shrink: 0;
        padding: 0 12px 80px;
        box-sizing: border-box;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }

    /* Hide the h2 column title on mobile (shown in indicator) */
    .column h2 {
        display: none;
    }

    /* Mobile rename container */
    .mobile-rename-wrap {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        padding: 10px;
        margin-bottom: 10px;
        background: #fff;
        border: 1.5px solid #e2e8f0;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

    .mobile-rename-wrap .col-rename-input {
        width: 100%;
        flex: none;
        margin-bottom: 4px;
    }

    .mobile-column-label {
        display: grid;
        grid-template-columns: auto 1fr auto auto;
        align-items: center;
        gap: 6px;
    }
    
    #mobile-col-title {
        text-align: center;
    }
    

    /* ─── Column toolbar ── */
    .column-toolbar {
        gap: 5px;
        margin-bottom: 10px;
    }

    .toolbar-select {
        font-size: 0.72rem;
        padding: 5px 8px;
        padding-right: 24px;
    }

    /* ─── Cards ── */
    .card {
        margin-bottom: 10px;
        padding: 14px;
        height: 180px;
    }

    /* ─── Move To button — mobile only ── */
    .move-to-btn {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        margin-top: 10px;
        padding: 6px 12px;
        background: #f1f5f9;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        font-size: 0.78rem;
        font-weight: 600;
        color: #475569;
        cursor: pointer;
        width: 100%;
        justify-content: center;
    }

    .move-to-btn:active {
        background: #e2e8f0;
    }

    /* ─── Move to dropdown ── */
    .move-to-dropdown {
        display: none;
        position: absolute;
        bottom: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        z-index: 50;
        overflow: hidden;
    }

    .move-to-dropdown.open {
        display: block;
    }

    .move-to-option {
        display: block;
        width: 100%;
        padding: 13px 16px;
        border: none;
        background: none;
        text-align: left;
        font-size: 0.88rem;
        font-weight: 500;
        color: #374151;
        cursor: pointer;
        border-bottom: 1px solid #f1f5f9;
    }

    .move-to-option:last-child {
        border-bottom: none;
    }

    .move-to-option:active {
        background: #f8fafc;
    }

    .move-to-option.current {
        color: #94a3b8;
        pointer-events: none;
    }

    .card-move-wrap {
        position: relative;
    }

    /* ─── Footer ── */
    .app-footer {
        padding: 12px 16px;
        font-size: 0.75rem;
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    /* ─── Modals ── */
    .modal {
        width: 95vw;
        max-width: 95vw;
        margin: 10px auto;
        padding: 20px 16px;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* ─── Onboarding tour ── */
    .tour-modal {
        padding: 22px 20px;
        max-width: 320px;
    }

    .tour-tooltip {
        max-width: 260px;
    }

    .add-column-placeholder {
        min-height: 400px;
        padding-top: 120px;
        border: none;
        background: transparent;
    }

    .add-column-placeholder {
        display: none;
    }

}

@keyframes slideUpNotif {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* Hide move-to button on desktop */
@media (min-width: 769px) {
    .move-to-btn         { display: none !important; }
    .move-to-dropdown    { display: none !important; }
    .card-move-wrap      { display: none !important; }
    .column-indicator    { display: none !important; }
    .mobile-column-label { display: none !important; }
    .board-swipe-wrapper { display: contents; }
}

/* ═══════════════════════════════════════════════════
   CUSTOM FORM CONTROLS — Select & Date
   ═══════════════════════════════════════════════════ */

/* ─── Base style for both select and date inputs ── */
.modal select,
.modal input[type="date"] {
    width: 100%;
    padding: 11px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #1a1a2e;
    background-color: #f8fafc;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.modal select:focus,
.modal input[type="date"]:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modal select:hover,
.modal input[type="date"]:hover {
    border-color: #94a3b8;
    background: #fff;
}

/* ─── Custom arrow for select ── */
.modal-form-col {
    position: relative;
}

.modal-form-col select {
    padding-right: 40px; /* space for arrow */
}

.modal-form-col::after {
    content: '▾';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.85rem;
    pointer-events: none;
    margin-top: 10px; /* offset for the label above */
}

/* ─── Calendar icon for date input ── */
.modal input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.5;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: opacity 0.2s;
}

.modal input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background: #e0e7ff;
}

/* ─── Labels above controls ── */
.modal label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 6px;
    margin-top: 14px;
}

.modal label:first-child {
    margin-top: 0;
}

/* ─── Text inputs in modal ── */
.modal input[type="text"],
.modal textarea {
    width: 100%;
    padding: 11px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #1a1a2e;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
    resize: vertical;
}

.modal input[type="text"]:focus,
.modal textarea:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modal input[type="text"]:hover,
.modal textarea:hover {
    border-color: #94a3b8;
    background: #fff;
}

/* ─── Priority select — color coded options ── */
.modal select option[value="low"]    { color: #64748b; }
.modal select option[value="medium"] { color: #2563eb; }
.modal select option[value="high"]   { color: #f59e0b; }
.modal select option[value="urgent"] { color: #ef4444; }
.modal select option[value="fire"]   { color: #991b1b; }

/* ─── Priority select — color the select itself based on value ── */
.modal select.priority-low    { border-color: #e5e7eb; color: #64748b; }
.modal select.priority-medium { border-color: #bfdbfe; color: #2563eb; background: #eff6ff; }
.modal select.priority-high   { border-color: #fde68a; color: #d97706; background: #fffbeb; }
.modal select.priority-urgent { border-color: #fecaca; color: #ef4444; background: #fef2f2; }
.modal select.priority-fire   { border-color: #fca5a5; color: #991b1b; background: #fff1f1; }

/* ─── Required star ── */
.required {
    color: #ef4444;
    margin-left: 2px;
}

/* ─── Modal form row (priority + date side by side) ── */
.modal-form-row {
    display: flex;
    gap: 14px;
    margin-top: 14px;
}

.modal-form-col {
    flex: 1;
    min-width: 0;
}

/* ─── Show More Button ──────────────────────────── */
.show-more-btn {
    display: none;
    width: 100%;
    padding: 8px 0;
    margin-top: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #3498db;
    background: #f0f7ff;
    border: 1.5px dashed #bdd8f1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.show-more-btn:hover {
    background: #e1effc;
    border-color: #3498db;
    color: #2980b9;
}

/* ─── Onboarding Tour ───────────────────────────── */
.tour-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    transition: opacity 0.3s;
}

.tour-modal {
    position: fixed;
    z-index: 2002;
    background: #fff;
    border-radius: 14px;
    padding: 28px 30px;
    max-width: 380px;
    width: 90vw;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.25s ease;
}

.tour-modal h2 {
    font-size: 1.15rem;
    color: #2c3e50;
    margin-bottom: 8px;
}

.tour-modal p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.tour-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tour-btn {
    padding: 9px 22px;
    border: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tour-btn-primary {
    background: #3498db;
    color: #fff;
}

.tour-btn-primary:hover {
    background: #2980b9;
}

.tour-skip {
    font-size: 0.82rem;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
    padding: 6px 10px;
}

.tour-skip:hover {
    color: #666;
}

.tour-tooltip {
    position: fixed;
    z-index: 2002;
    background: #fff;
    border-radius: 12px;
    padding: 18px 22px;
    max-width: 300px;
    width: 85vw;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.2s ease;
}

.tour-tooltip p {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 14px;
}

.tour-tooltip .tour-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tour-highlight {
    position: relative;
    z-index: 2001;
    border-radius: 10px;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.4), 0 0 20px rgba(52, 152, 219, 0.15);
    transition: box-shadow 0.3s;
}

.tour-step-dots {
    display: flex;
    gap: 5px;
    margin-right: 12px;
}

.tour-step-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ddd;
}

.tour-step-dot.active {
    background: #3498db;
    width: 16px;
    border-radius: 3px;
}

/* ─── What's New Link ───────────────────────────── */
.top-link.whatsnew {
    color: #8b5cf6;
    position: relative;
}

.top-link.whatsnew:hover {
    background: #f5f3ff;
}

.new-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 7px;
    height: 7px;
    background: #ef4444;
    border-radius: 50%;
    border: 1.5px solid #fff;
}

/* ─── Notification Bell ─────────────────────────── */
.notif-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.notif-bell {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    color: #6b7280;
    display: flex;
    align-items: center;
    position: relative;
    transition: background 0.15s, color 0.15s;
}

.notif-bell:hover {
    background: #f3f4f6;
    color: #374151;
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 1.5px solid #fff;
    line-height: 1;
}

/* ─── Notification Panel ────────────────────────── */
.notif-panel {
    position: fixed;
    top: 60px;
    right: 16px;
    width: 340px;
    max-height: 420px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    z-index: 2000;
    animation: fadeIn 0.15s ease;
}

.notif-panel.hidden {
    display: none;
}

.notif-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.notif-panel-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #2c3e50;
}

.notif-mark-all {
    background: none;
    border: none;
    font-size: 0.75rem;
    color: #3498db;
    cursor: pointer;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s;
}

.notif-mark-all:hover {
    background: #eaf2fb;
}

/* ─── Notification List ─────────────────────────── */
.notif-list {
    overflow-y: auto;
    max-height: 360px;
}

.notif-empty {
    padding: 30px 16px;
    text-align: center;
    font-size: 0.85rem;
    color: #bbb;
}

.notif-item {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
    position: relative;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item:hover {
    background: #f9fafb;
}

.notif-icon {
    font-size: 16px;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f0f2f5;
}

.notif-type-overdue .notif-icon { background: #fef2f2; }
.notif-type-stale .notif-icon { background: #fef9e7; }
.notif-type-welcome_back .notif-icon { background: #eaf2fb; }
.notif-type-announcement .notif-icon { background: #f5f3ff; }

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
}

.notif-message {
    font-size: 0.78rem;
    color: #777;
    line-height: 1.4;
}

.notif-time {
    font-size: 0.68rem;
    color: #bbb;
    margin-top: 4px;
}

.notif-dismiss {
    background: none;
    border: none;
    color: #ccc;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
    align-self: flex-start;
    transition: color 0.15s;
}

.notif-dismiss:hover {
    color: #e74c3c;
}

.card {
    height: 180px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card p {
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 4px;
}

.card .deadline,
.card .counter,
.card .created-date {
    flex-shrink: 0;
}

/* ─── Profile Progress Bar ──────────────────────── */
.progress-section {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 16px;
    margin-bottom: 30px;
    backdrop-filter: blur(4px);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-pct {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.progress-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s ease;
    min-width: 0;
}

.progress-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
    text-align: center;
}

/* ─── Column Rename ─────────────────────────────── */
.column-title-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    position: relative;
}

.col-rename-field {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin-top: 8px;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
}

.col-rename-input {
    flex: 1;
    padding: 5px 8px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    border: 1.5px solid #d0d5dd;
    border-radius: 6px;
    outline: none;
    min-width: 0;
    transition: border-color 0.2s;
}

.col-rename-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.12);
}

.col-rename-save {
    padding: 5px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.col-rename-save:hover {
    background: #2980b9;
}

.col-rename-cancel {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 1rem;
    padding: 2px 4px;
    transition: color 0.15s;
}

.col-rename-cancel:hover {
    color: #e74c3c;
}

.col-rename-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px;
    border-radius: 4px;
    color: #d5d8dc;
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
    display: flex;
    align-items: center;
}

.column-title-wrap:hover .col-rename-btn {
    opacity: 1;
}

.col-rename-btn:hover {
    color: #666;
    background: #f0f2f5;
}

/* ─── Column Task Count Badge ───────────────────── */
.col-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}

#col-count-todo {
    background: #fdf0ef;
    color: #e74c3c;
}

#col-count-inprogress {
    background: #fef9e7;
    color: #f39c12;
}

#col-count-done {
    background: #eafaf1;
    color: #2ecc71;
}

/* ─── Add Column Button ─────────────────────────── */
.add-column-placeholder {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
    background: transparent;
    box-shadow: none;
    border: 2px dashed #d0d5dd;
    border-radius: 12px;
    min-height: 300px;
    transition: border-color 0.2s, background 0.2s;
}

.add-column-placeholder:hover {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.03);
}

.add-column-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s, transform 0.2s;
}

.add-column-btn:hover {
    color: #3498db;
    transform: scale(1.05);
}

.add-column-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 300;
    color: #999;
    transition: background 0.2s, color 0.2s;
}

.add-column-btn:hover .add-column-icon {
    background: #eaf2fb;
    color: #3498db;
}

.add-column-btn span:last-child {
    font-size: 0.85rem;
    font-weight: 600;
}

/* ─── Color Picker ──────────────────────────────── */
.color-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
    margin-bottom: 8px;
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.active {
    border-color: #2c3e50;
    transform: scale(1.15);
}

/* ─── Add Column Modal ──────────────────────────── */
.add-column-modal h2 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

/* ─── Mobile: Add column dot ────────────────────── */
.column-dot.add-dot {
    background: #e2e8f0;
    color: #94a3b8;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.column-dot.add-dot:hover {
    background: #3498db;
    color: #fff;
}

/* ─── Delete Column Button ──────────────────────── */
.col-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px;
    border-radius: 4px;
    color: #d5d8dc;
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
    display: flex;
    align-items: center;
}

.col-delete-btn:hover {
    color: #e74c3c;
    background: #fef2f2;
}

/* ─── Delete Column Modal ───────────────────────── */
.delete-column-modal h2 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 12px;
}

.delete-col-warning {
    font-size: 0.92rem;
    color: #555;
    margin-bottom: 16px;
}

.delete-col-info {
    font-size: 0.88rem;
    color: #666;
    margin-bottom: 14px;
    line-height: 1.5;
}

.delete-col-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}

.delete-col-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #374151;
    cursor: pointer;
}

.delete-col-option input[type="radio"] {
    accent-color: #3498db;
}

.delete-col-select {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.88rem;
    font-family: inherit;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
    outline: none;
    margin-top: 4px;
    margin-bottom: 4px;
    transition: border-color 0.2s;
}

.delete-col-select:focus {
    border-color: #3498db;
}

/* ─── Due Date Card Highlights ──────────────────── */
.card.due-today {
    background: #fff8e1;
    border-left-width: 4px;
}

.card.due-today .deadline {
    color: #f39c12;
    font-weight: 700;
}

.card.overdue {
    background: #fff5f5;
    border-left-width: 4px;
}

.card.overdue .deadline {
    color: #e74c3c;
    font-weight: 700;
}

/* ─── Overdue pulse ─────────────────────────────── */
.card.overdue {
    background: #fff5f5;
    animation: overduePulse 2s ease-in-out infinite;
}

.card.overdue .deadline {
    color: #e74c3c;
    font-weight: 700;
}

@keyframes overduePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.3); }
    50%      { box-shadow: 0 0 0 6px rgba(231, 76, 60, 0); }
}

/* ─── Due today pulse (softer) ──────────────────── */
.card.due-today {
    background: #fff8e1;
    animation: dueTodayPulse 2.5s ease-in-out infinite;
}

.card.due-today .deadline {
    color: #f39c12;
    font-weight: 700;
}

@keyframes dueTodayPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.25); }
    50%      { box-shadow: 0 0 0 8px rgba(243, 156, 18, 0); }
}

.col-complete-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s;
}

.col-complete-toggle:hover {
    color: #27ae60;
}

.col-complete-toggle input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #27ae60;
    cursor: pointer;
}

.col-complete-toggle input[type="checkbox"]:checked + span {
    color: #27ae60;
}

.complete-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 5px 12px;
    background: #d5f5e3;
    border: 1.5px solid #27ae60;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #27ae60;
    cursor: pointer;
    transition: all 0.15s;
}

.complete-btn:hover {
    background: #27ae60;
    color: #fff;
}

.btn-complete {
    background: #27ae60;
    color: #fff;
}

.btn-complete:hover {
    background: #219a52;
}

.complete-btn {
    display: none;
}

.auth-back-link {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.auth-back-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.avatar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.avatar-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: white;
    position: relative;
    overflow: hidden;
}

.avatar-circle.has-image {
    background: transparent;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-upload-btn {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid white;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
    z-index: 2;
}

.avatar-upload-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.avatar-remove-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.avatar-remove-btn:hover {
    color: white;
}

.avatar-status {
    font-size: 0.85rem;
    min-height: 1.2em;
    text-align: center;
}

.avatar-status.error { color: #ff6b6b; }
.avatar-status.success { color: #51cf66; }
.avatar-status.loading { color: rgba(255, 255, 255, 0.7); }

/* ═══════════ Boards Bar ═══════════ */
.boards-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 16px 24px 0;
    max-width: 1400px;
    margin: 0 auto;
}

.board-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.board-pill:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

.board-pill.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

.board-pill.active:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.board-pill-name {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Add Board button — distinct from regular boards */
.board-pill-add {
    color: #64748b;
    border-style: dashed;
}

.board-pill-add:hover {
    color: #3b82f6;
    border-color: #3b82f6;
    background: #eff6ff;
}

.board-pill-add-icon {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

/* Mobile: tighter spacing, slightly smaller pills */
@media (max-width: 768px) {
    .boards-bar {
        padding: 12px 16px 0;
        gap: 6px;
        justify-content: center;
    }

    .board-pill {
        padding: 6px 12px;
        font-size: 13px;
    }

    .board-pill-name {
        max-width: 140px;
    }
}

/* ─── Tablet: same hamburger treatment as mobile ──── */
@media (min-width: 769px) and (max-width: 1024px) {
    .top-bar-right {
        display: none;
    }

    .mobile-menu-wrapper {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    /* Pull mobile menu styles forward for tablets */
    .mobile-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: #fff;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
        z-index: 3000;
        padding: 20px 0;
        flex-direction: column;
        animation: slideInMenu 0.2s ease;
    }

    .mobile-menu:not(.hidden) {
        display: flex;
    }

    .mobile-menu.hidden {
        display: none !important;
    }

    .mobile-menu-greeting {
        font-size: 0.9rem;
        color: #374151;
        padding: 10px 20px 12px;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 2px;
    }

    .mobile-menu-link {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px 20px;
        font-size: 0.92rem;
        font-weight: 500;
        color: #374151;
        text-decoration: none;
        transition: background 0.15s;
    }

    .mobile-menu-link:hover {
        background: #f9fafb;
    }

    .mobile-menu-link.dashboard {
        color: #2563eb;
        font-weight: 600;
    }

    .mobile-menu-link.logout {
        color: #ef4444;
        margin-top: 8px;
        border-top: 1px solid #f0f0f0;
    }

    .mobile-menu-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 2999;
        animation: fadeIn 0.15s ease;
    }
}

/* ─── Tablet board: horizontal scroll instead of overflow ──── */
@media (min-width: 769px) and (max-width: 1024px) {
    .board {
        overflow-x: auto;
        overflow-y: visible;
        padding: 0 16px 16px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }

    .board-swipe-wrapper {
        display: flex;
        gap: 16px;
        padding-bottom: 8px;
        min-width: max-content;
    }

    .column {
        flex-shrink: 0;
        width: 280px;
        scroll-snap-align: start;
    }

    /* Add Column placeholder follows the same sizing rule */
    .add-column-placeholder {
        flex-shrink: 0;
        width: 280px;
    }

    /* Subtle scrollbar styling so it's discoverable but not intrusive */
    .board::-webkit-scrollbar {
        height: 8px;
    }

    .board::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.04);
        border-radius: 4px;
    }

    .board::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.15);
        border-radius: 4px;
    }

    .board::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.25);
    }
}

/* ─── Board pill wrapper (positioning context for menu) ─── */
.board-pill-wrap {
    position: relative;
    display: inline-flex;
}

/* The caret inside the pill */
.board-pill-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    padding: 0 4px;
    font-size: 12px;
    line-height: 1;
    border-radius: 4px;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.15s, background 0.15s;
}

.board-pill-caret:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.08);
}

.board-pill.active .board-pill-caret:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Dropdown menu */
.board-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 140px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 100;
    animation: fadeIn 0.12s ease;
}

.board-menu.hidden {
    display: none;
}

.board-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 14px;
    background: none;
    border: none;
    text-align: left;
    font-size: 13px;
    font-family: inherit;
    color: #374151;
    cursor: pointer;
    transition: background 0.12s;
}

.board-menu-item:hover {
    background: #f3f4f6;
}

.board-menu-item-danger {
    color: #ef4444;
}

.board-menu-item-danger:hover {
    background: #fef2f2;
}

/* Inline rename field (replaces pill while editing) */
.board-rename-field {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    background: #fff;
    border: 1.5px solid #3b82f6;
    border-radius: 8px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.board-rename-field.hidden {
    display: none;
}

.board-rename-input {
    flex: 1;
    min-width: 0;
    width: 140px;
    padding: 4px 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: #1e293b;
    border: none;
    outline: none;
    background: transparent;
}

.board-rename-save {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.12s;
}

.board-rename-save:hover {
    background: #2563eb;
}

.board-rename-cancel {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 16px;
    padding: 0 6px;
    line-height: 1;
    transition: color 0.12s;
}

.board-rename-cancel:hover {
    color: #ef4444;
}

/* When rename is active, hide the pill itself */
.board-pill-wrap.renaming .board-pill {
    display: none;
}

/* Mobile: dropdown stays in bounds */
@media (max-width: 768px) {
    .board-menu {
        right: auto;
        left: 0;
    }
}

/* ─── Add Board Modal ───────────────────────────── */
.add-board-modal h2 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

.add-board-hint {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.5;
    margin-top: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #cbd5e1;
}

/* ─── Task Tags (chips on cards) ───────────────── */
.task-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 8px 0;
}

.task-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.2px;
    white-space: nowrap;
    user-select: none;
    /* Cursor stays default for now — clicking does nothing.
       Step 6 will set this to 'pointer' when we wire up filtering. */
}

/* ─── Tag Picker (typeahead) ──────────────────── */
.tag-picker-hint {
    font-size: 12px;
    font-weight: 400;
    color: #888;
    margin-left: 4px;
}

.tag-picker {
    position: relative;
    margin-bottom: 12px;
    /* The whole field looks like an input */
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    padding: 4px;
    cursor: text;
    transition: border-color 0.15s ease;
    min-height: 38px;
    box-sizing: border-box;
}

.tag-picker:focus-within {
    border-color: #3498db;
}

/* Chips + input live in this flex container, side-by-side and wrapping. */
.tag-picker-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

/* Selected tag chips inside the picker. Reuses the .task-tag look but a touch bigger. */
.tag-picker-chips .task-tag {
    padding: 3px 4px 3px 10px;
    font-size: 12px;
    cursor: default;
}

.tag-picker-chip-remove {
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0 4px;
    font-size: 14px;
    line-height: 1;
    margin-left: 2px;
}

.tag-picker-chip-remove:hover {
    opacity: 1;
}

/* The text input grows to fill the remaining row space. */
.tag-picker-input {
    flex: 1;
    min-width: 120px;
    border: none;
    outline: none;
    padding: 4px 6px;
    font-size: 13px;
    background: transparent;
    color: inherit;
    font-family: inherit;
}

.tag-picker-input:disabled {
    cursor: not-allowed;
    color: #aaa;
}

/* Suggestions dropdown. Anchored below the picker, full width. */
.tag-picker-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 100;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    padding: 4px;
}

.tag-picker-suggestion {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.tag-picker-suggestion:hover,
.tag-picker-suggestion.highlighted {
    background: #f0f3f7;
}

.tag-picker-suggestion-swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tag-picker-suggestion-name {
    flex: 1;
}

/* Match-highlight styling: bold the typed substring */
.tag-picker-suggestion-name strong {
    font-weight: 700;
}

.tag-picker-suggestion-create {
    color: #3498db;
    font-weight: 500;
}

.tag-picker-suggestion-create::before {
    content: "+ ";
    font-weight: 700;
}

.tag-picker-empty {
    padding: 10px 12px;
    color: #888;
    font-size: 13px;
    text-align: center;
}

/* Keep modals from clipping the suggestions */
.modal {
    overflow: visible;
}

/* Already-added suggestion: greyed out, not clickable */
.tag-picker-suggestion.already {
    cursor: default;
    opacity: 0.55;
}

.tag-picker-suggestion.already:hover {
    background: transparent;
}

.tag-picker-suggestion-meta {
    font-size: 11px;
    color: #888;
    margin-left: auto;
    font-style: italic;
}

/* ─── Tag chip cursor (now that they're clickable) ─── */
.task-tag {
    cursor: pointer;
    transition: transform 0.1s ease, opacity 0.1s ease;
}

.task-tag:hover {
    opacity: 0.85;
}

.task-tag:active {
    transform: scale(0.96);
}

/* Inside the picker and modals, chips shouldn't act clickable */
.tag-picker .task-tag,
.modal .task-tag {
    cursor: default;
}

.tag-picker .task-tag:hover,
.modal .task-tag:hover {
    opacity: 1;
}

/* ─── "Filtered by" pill above a column ─── */
.tag-filter-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    margin: 0 0 8px;
    background: #f5f7fa;
    border: 1px solid #e1e5eb;
    border-radius: 6px;
    font-size: 12px;
}

.tag-filter-pill-label {
    color: #666;
    font-weight: 500;
    flex-shrink: 0;
}

.tag-filter-pill-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag-filter-pill-clear {
    background: transparent;
    border: none;
    color: #888;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    margin-left: auto;
    flex-shrink: 0;
}

.tag-filter-pill-clear:hover {
    color: #333;
}

/* ═══════════════════════════════════════════════════
   CHECKLIST
   ═══════════════════════════════════════════════════ */

/* ─── Toggle (Create Task modal) ───────────────── */
.checklist-toggle-wrap {
    margin-top: 10px;
    margin-bottom: 4px;
}

.checklist-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
}

.checklist-toggle-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #3498db;
    cursor: pointer;
}

/* ─── Section wrapper ───────────────────────────── */
.checklist-section {
    margin-top: 14px;
}

.checklist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.checklist-header label {
    margin: 0;
}

/* ─── Progress ──────────────────────────────────── */
.checklist-progress {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 20px;
}

.checklist-progress-bar-wrap {
    height: 4px;
    background: #e5e7eb;
    border-radius: 4px;
    margin-bottom: 12px;
    overflow: hidden;
}

.checklist-progress-bar {
    height: 100%;
    background: #3498db;
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

/* ─── Rows ──────────────────────────────────────── */
.checklist-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    border-radius: 6px;
    transition: background 0.15s;
}

.checklist-row:hover {
    background: #f8fafc;
}

.checklist-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3498db;
    cursor: pointer;
    flex-shrink: 0;
}

/* View mode label */
.checklist-row-label {
    flex: 1;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.4;
}

.checklist-row-label.checked {
    text-decoration: line-through;
    color: #9ca3af;
}

/* Edit/add mode text input */
.checklist-row-input {
    flex: 1;
    padding: 6px 10px;
    font-size: 0.88rem;
    font-family: inherit;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    outline: none;
    background: #fff;
    color: #374151;
    transition: border-color 0.2s;
}

.checklist-row-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

/* Remove (×) button */
.checklist-row-remove {
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    flex-shrink: 0;
    transition: color 0.15s;
}

.checklist-row-remove:hover {
    color: #e74c3c;
}

/* ─── Add item button ───────────────────────────── */
.checklist-add-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    color: #3498db;
    background: #f0f7ff;
    border: 1.5px dashed #bdd8f1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    width: 100%;
    justify-content: center;
}

.checklist-add-btn:hover {
    background: #e1effc;
    border-color: #3498db;
}

/* ─── Scrollable modal content ──────────────────── */
.modal {
    max-height: 90vh;
    overflow-y: auto;
}

/* ─── Checklist row — mobile overflow fix ───────── */
.checklist-row {
    min-width: 0;
}

.checklist-row-input {
    min-width: 0;
    width: 100%;
}

.checklist-row-remove {
    flex-shrink: 0;
}

/* ─── Checklist row — edit mode fix ─────────────── */
#edit-checklist-items .checklist-row,
#add-checklist-items .checklist-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

#edit-checklist-items .checklist-row-input,
#add-checklist-items .checklist-row-input {
    flex: 1 1 0;
    min-width: 0;
    width: 0; /* forces flex to control the width, not content */
    box-sizing: border-box;
}

#edit-checklist-items .checklist-row input[type="checkbox"],
#add-checklist-items .checklist-row input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

#edit-checklist-items .checklist-row-remove,
#add-checklist-items .checklist-row-remove {
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

/* ─── Checklist indicator on card ───────────────── */
.checklist-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 2px 8px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
}

.checklist-indicator.complete {
    color: #27ae60;
    background: #eafaf1;
    border-color: #a9dfbf;
}

/* ─── Auto-complete toggle ───────────────────────── */
.auto-complete-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.auto-complete-toggle-wrap input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #27ae60;
    cursor: pointer;
    flex-shrink: 0;
}

.auto-complete-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    user-select: none;
    text-transform: none;
    letter-spacing: 0;
}

.auto-complete-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #27ae60;
    cursor: pointer;
}

.auto-complete-toggle-wrap label.auto-complete-label {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    user-select: none;
    text-transform: none !important;
    letter-spacing: 0;
    margin-top: 0;
}

.checklist-toggle-wrap label.checklist-toggle-label {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    text-transform: none !important;
    letter-spacing: 0;
    cursor: pointer;
    user-select: none;
    margin-top: 0;
}

.auto-complete-toggle-wrap {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.auto-complete-toggle-wrap .auto-complete-label {
    white-space: normal;
    word-break: break-word;
}

/* ─── Modal scroll + suggestion overflow fix ─── */
.modal {
    overflow: visible;
    max-height: 90vh;
}

.add-task-modal,
#modal-overlay .modal {
    overflow-y: auto;
}

.auto-complete-toggle-wrap,
.auto-complete-toggle-wrap * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    display: initial;
}

.auto-complete-toggle-wrap {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px !important;
    width: 100%;
}

.auto-complete-toggle-wrap input[type="checkbox"] {
    display: inline-block !important;
    width: 15px !important;
    height: 15px !important;
    flex-shrink: 0;
}

.auto-complete-toggle-wrap label {
    display: inline !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    margin: 0 !important;
    cursor: pointer;
}

/* ─── Archive pill in boards bar ───────────────── */
.board-pill-archive {
    text-decoration: none;
    color: #64748b;
    font-size: 13px;
    border-style: solid;
    border-color: #e2e8f0;
}

.board-pill-archive:hover {
    color: #7c3aed;
    border-color: #7c3aed;
    background: #f5f3ff;
}

/* ─── Archive button in task modal ─────────────── */
.btn-archive {
    background: #f5f3ff;
    color: #7c3aed;
    border: 1.5px solid #ddd6fe;
}

.btn-archive:hover {
    background: #ede9fe;
    border-color: #7c3aed;
}

/* ─── Archive page ──────────────────────────────── */
.archive-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.archive-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.archive-header h2 {
    font-size: 1.3rem;
    color: #2c3e50;
    font-weight: 700;
}

.archive-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    padding: 7px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    transition: all 0.15s;
}

.archive-back:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

.archive-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 0.95rem;
}

.archive-empty span {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 12px;
}

/* ─── Archive table ─────────────────────────────── */
.archive-table {
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    border-collapse: collapse;
    overflow: hidden;
}

.archive-table thead th {
    padding: 12px 16px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    background: #f8fafc;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.archive-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.12s;
}

.archive-table tbody tr:last-child {
    border-bottom: none;
}

.archive-table tbody tr:hover {
    background: #f8fafc;
}

.archive-table tbody td {
    padding: 13px 16px;
    font-size: 0.88rem;
    color: #374151;
    vertical-align: middle;
}

.archive-task-title {
    font-weight: 600;
    color: #1e293b;
}

.archive-date {
    font-size: 0.8rem;
    color: #94a3b8;
    white-space: nowrap;
}

/* ─── Archive pagination ────────────────────────── */
.archive-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.archive-pagination a,
.archive-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    color: #64748b;
    background: #fff;
    transition: all 0.15s;
}

.archive-pagination a:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

.archive-pagination span.current-page {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.archive-pagination span.disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

/* ─── Recurrence ────────────────────────────────── */
.recurrence-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.recurrence-wrap input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #3498db;
    cursor: pointer;
    flex-shrink: 0;
}

.recurrence-select {
    padding: 4px 10px;
    font-size: 0.82rem;
    font-family: inherit;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    background: #f8fafc;
    color: #374151;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.recurrence-select:focus {
    border-color: #3498db;
}

.recurrence-select.hidden {
    display: none !important;
}

/* ─── Recurrence label override ─────────────────── */
.recurrence-wrap label.auto-complete-label {
    display: inline-flex !important;
    align-items: center;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    margin: 0 !important;
    cursor: pointer;
}

/* ─── Modal actions wrap on overflow ────────────── */
.modal-actions {
    flex-wrap: wrap;
}

.modal-actions button {
    flex-shrink: 0;
}

/* ─── Recurrence wrap fixes ─────────────────────── */
.recurrence-wrap {
    margin-top: 12px;
}

.recurrence-wrap input[type="checkbox"] {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
    display: inline-block !important;
    flex-shrink: 0;
}

.recurrence-wrap label {
    display: inline !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    margin: 0 !important;
    cursor: pointer;
}