/* ============================================================
   style.css — Task Manager Global Styles
   Black Grapes Softech, Indore
   Design: Corporate-Industrial, DM Sans + JetBrains Mono
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Variables ─────────────────────────────────────── */
:root {
    /* Core Palette */
    --bg-main:      #0d1117;
    --bg-sidebar:   #0a0e14;
    --bg-card:      #161b24;
    --bg-card-2:    #1c2333;
    --bg-input:     #1c2333;
    --border:       #2a3347;
    --border-light: #1f2b3e;

    /* Text */
    --text-primary:   #e8edf5;
    --text-secondary: #7d8fa8;
    --text-muted:     #4a5568;
    --text-accent:    #f5a623;

    /* Accent Colors */
    --accent:         #f5a623;  /* Amber — primary CTA */
    --accent-dim:     rgba(245,166,35,0.12);
    --accent-hover:   #f7b84e;
    --blue:           #3b82f6;
    --blue-dim:       rgba(59,130,246,0.12);
    --green:          #22c55e;
    --green-dim:      rgba(34,197,94,0.12);
    --red:            #ef4444;
    --red-dim:        rgba(239,68,68,0.12);
    --purple:         #a855f7;
    --purple-dim:     rgba(168,85,247,0.12);

    /* Priority Colors */
    --priority-low:      #22c55e;
    --priority-medium:   #3b82f6;
    --priority-high:     #f5a623;
    --priority-critical: #ef4444;

    /* Status Colors */
    --status-todo:        #7d8fa8;
    --status-in-progress: #3b82f6;
    --status-review:      #a855f7;
    --status-done:        #22c55e;

    /* Layout */
    --sidebar-w:    240px;
    --topbar-h:     60px;
    --radius:       8px;
    --radius-lg:    12px;
    --shadow:       0 4px 20px rgba(0,0,0,0.4);
    --shadow-sm:    0 2px 8px rgba(0,0,0,0.25);

    /* Transitions */
    --t:  0.18s ease;
    --t2: 0.28s cubic-bezier(.4,0,.2,1);
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

code, .mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82em;
}

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-sidebar); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Layout Shell ───────────────────────────────────────── */
.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    grid-template-rows: var(--topbar-h) 1fr;
    height: 100vh;
}

#sidebar-wrap { grid-row: 1 / -1; grid-column: 1; }

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    height: var(--topbar-h);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.brand-text { line-height: 1.2; }
.brand-name  { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); letter-spacing: 0.02em; }
.brand-sub   { font-size: 0.68rem; color: var(--text-muted); }

.sidebar-nav { padding: 12px 0; flex: 1; }

.nav-section-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 8px 18px 4px;
    margin-top: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--t);
    border-left: 2px solid transparent;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.04);
}

.nav-link.active {
    color: var(--accent);
    background: var(--accent-dim);
    border-left-color: var(--accent);
}

.nav-link .nav-icon {
    font-size: 1rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--accent);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

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

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--t);
}

.user-card:hover { background: rgba(255,255,255,0.05); }

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #000;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-info { flex: 1; min-width: 0; }
.user-name  { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role  { font-size: 0.68rem; color: var(--text-muted); text-transform: capitalize; }

/* ── Topbar ─────────────────────────────────────────────── */
.topbar {
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title { font-size: 1rem; font-weight: 600; flex: 1; }

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

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--t);
    position: relative;
}

.icon-btn:hover { color: var(--text-primary); border-color: var(--text-muted); }

.notif-dot {
    width: 7px; height: 7px;
    background: var(--accent);
    border-radius: 50%;
    position: absolute;
    top: 6px; right: 6px;
    border: 2px solid var(--bg-main);
}

/* ── Main Content ───────────────────────────────────────── */
.main-content {
    padding: 24px;
    overflow-y: auto;
    min-height: 0;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.page-header-left h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.page-header-left p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ── Cards ──────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ── Stat Cards ─────────────────────────────────────────── */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform var(--t), border-color var(--t);
}

.stat-card:hover { transform: translateY(-2px); border-color: var(--text-muted); }

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--text-secondary); margin-top: 3px; }
.stat-change { font-size: 0.72rem; margin-top: 4px; }
.stat-change.up   { color: var(--green); }
.stat-change.down { color: var(--red); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--t);
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #0d1117;
    border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
    background: var(--bg-card-2);
    color: var(--text-primary);
    border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--text-muted); }

.btn-danger {
    background: var(--red-dim);
    color: var(--red);
    border-color: rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.22); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}
.btn-ghost:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }

.btn-sm { padding: 5px 11px; font-size: 0.78rem; }
.btn-lg { padding: 11px 22px; font-size: 0.93rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

/* ── Form Elements ──────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.88rem;
    padding: 9px 12px;
    transition: border-color var(--t), box-shadow var(--t);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-control::placeholder { color: var(--text-muted); }

select.form-control { cursor: pointer; }

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

input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.5) sepia(1) saturate(0); }

/* ── Tables ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: 11px 14px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover td { background: rgba(255,255,255,0.025); }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.73rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-todo        { background: rgba(125,143,168,0.15); color: var(--status-todo);        }
.badge-in-progress { background: var(--blue-dim);         color: var(--status-in-progress); }
.badge-review      { background: var(--purple-dim);       color: var(--status-review);      }
.badge-done        { background: var(--green-dim);        color: var(--status-done);        }
.badge-active      { background: var(--green-dim);        color: var(--green);              }
.badge-on-hold     { background: rgba(125,143,168,0.15); color: var(--text-secondary);     }
.badge-completed   { background: var(--blue-dim);         color: var(--blue);               }
.badge-cancelled   { background: var(--red-dim);          color: var(--red);                }

.badge-low      { background: rgba(34,197,94,0.12);  color: var(--priority-low);      }
.badge-medium   { background: var(--blue-dim);        color: var(--priority-medium);   }
.badge-high     { background: var(--accent-dim);      color: var(--priority-high);     }
.badge-critical { background: var(--red-dim);         color: var(--priority-critical); }

/* ── Progress Bar ───────────────────────────────────────── */
.progress {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 3px;
    background: var(--accent);
    transition: width 0.6s cubic-bezier(.4,0,.2,1);
}

.progress-bar.done   { background: var(--green); }
.progress-bar.danger { background: var(--red);   }
.progress-bar.blue   { background: var(--blue);  }

/* ── Modal ──────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--t2);
    padding: 16px;
}

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

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.97);
    transition: transform var(--t2);
}

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

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

.modal-title { font-size: 1rem; font-weight: 700; }

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    padding: 4px;
    border-radius: 4px;
    transition: color var(--t);
}
.modal-close:hover { color: var(--text-primary); }

.modal-body   { padding: 20px; }
.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ── Tags ───────────────────────────────────────────────── */
.tag {
    display: inline-flex;
    align-items: center;
    background: var(--bg-card-2);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    gap: 4px;
}

/* ── Toast Notifications ─────────────────────────────────── */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-card-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    min-width: 260px;
    max-width: 360px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-shadow: var(--shadow);
    animation: toastIn 0.28s cubic-bezier(.4,0,.2,1) both;
    border-left-width: 3px;
}

.toast.success { border-left-color: var(--green); }
.toast.error   { border-left-color: var(--red);   }
.toast.warning { border-left-color: var(--accent); }
.toast.info    { border-left-color: var(--blue);  }

.toast-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.toast-text { flex: 1; }
.toast-title   { font-size: 0.83rem; font-weight: 600; }
.toast-message { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Empty State ────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}
.empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-title { font-size: 0.95rem; font-weight: 600; color: var(--text-secondary); }
.empty-desc  { font-size: 0.82rem; margin-top: 4px; }

/* ── Loading Skeleton ───────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-2) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius);
}
@keyframes shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

/* ── Grids ──────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ── Utility ────────────────────────────────────────────── */
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.items-center{ align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mb-16  { margin-bottom: 16px; }
.text-sm    { font-size: 0.82rem; }
.text-xs    { font-size: 0.72rem; }
.text-muted { color: var(--text-secondary); }
.text-accent{ color: var(--accent); }
.font-600   { font-weight: 600; }
.truncate   { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Divider ─────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border-light); margin: 16px 0; }

/* ── Search ─────────────────────────────────────────────── */
.search-wrap {
    position: relative;
}
.search-wrap .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}
.search-wrap .form-control {
    padding-left: 32px;
}

/* ── Notification Panel ──────────────────────────────────── */
.notif-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    z-index: 200;
    display: none;
}
.notif-panel.open { display: block; }
.notif-panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.notif-item {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background var(--t);
}
.notif-item:hover { background: rgba(255,255,255,0.03); }
.notif-item.unread { background: rgba(245,166,35,0.04); }
.notif-item:last-child { border-bottom: none; }
.notif-item-title   { font-size: 0.82rem; font-weight: 600; }
.notif-item-msg     { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }
.notif-item-time    { font-size: 0.7rem;  color: var(--text-muted); margin-top: 3px; }

/* ── Page-specific overrides & auth pages ────────────────── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(245,166,35,0.05) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(59,130,246,0.05) 0%, transparent 50%);
    padding: 24px;
}

.auth-box {
    width: 100%;
    max-width: 420px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo-icon {
    width: 52px;
    height: 52px;
    background: var(--accent);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 12px;
}

.auth-logo h1 {
    font-size: 1.3rem;
    font-weight: 700;
}

.auth-logo p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.auth-tabs {
    display: flex;
    background: var(--bg-main);
    border-radius: var(--radius);
    padding: 3px;
    margin-bottom: 20px;
}

.auth-tab {
    flex: 1;
    padding: 7px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--t);
    border: none;
    background: none;
}

.auth-tab.active {
    background: var(--bg-card-2);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* ── Kanban Board ────────────────────────────────────────── */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: start;
}

.kanban-col {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    min-height: 200px;
}

.kanban-col-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kanban-col-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kanban-col-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.kanban-col-count {
    font-size: 0.72rem;
    background: var(--bg-card-2);
    border: 1px solid var(--border);
    padding: 2px 7px;
    border-radius: 10px;
    color: var(--text-secondary);
}

.kanban-items { padding: 10px; display: flex; flex-direction: column; gap: 8px; }

.kanban-card {
    background: var(--bg-card-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    cursor: grab;
    transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--text-muted);
}

.kanban-card:active { cursor: grabbing; }

.kanban-card-title   { font-size: 0.85rem; font-weight: 600; line-height: 1.4; }
.kanban-card-project { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.kanban-card-footer  { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }

.kanban-card .due-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}
.kanban-card .due-date.overdue { color: var(--red); }

.kanban-card .mini-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Drag-and-drop styles */
.kanban-col.drag-over {
    background: rgba(245,166,35,0.04);
    border-color: var(--accent);
}

.kanban-card.dragging {
    opacity: 0.4;
    transform: scale(0.97);
}

/* ── Milestone Timeline ──────────────────────────────────── */
.milestone-list { display: flex; flex-direction: column; gap: 0; }

.milestone-item {
    display: flex;
    gap: 14px;
    position: relative;
    padding-bottom: 20px;
}

.milestone-item:last-child { padding-bottom: 0; }

.milestone-item:last-child .milestone-line { display: none; }

.milestone-dot-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.milestone-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg-card);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    z-index: 1;
}

.milestone-dot.completed { background: var(--green);  border-color: var(--green);  }
.milestone-dot.in-progress{ background: var(--blue);  border-color: var(--blue);   }
.milestone-dot.pending    { background: var(--bg-card-2); border-color: var(--border); }

.milestone-line {
    width: 1px;
    flex: 1;
    background: var(--border);
    margin: 3px 0;
}

.milestone-content { flex: 1; padding-top: 0; }
.milestone-header  { display: flex; align-items: center; justify-content: space-between; }
.milestone-title   { font-size: 0.88rem; font-weight: 600; }
.milestone-meta    { font-size: 0.75rem; color: var(--text-muted); margin-top: 3px; }
.milestone-progress-wrap { margin-top: 8px; }

/* ── Dropdown ────────────────────────────────────────────── */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: var(--bg-card-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 160px;
    box-shadow: var(--shadow);
    z-index: 300;
    display: none;
    overflow: hidden;
}
.dropdown-menu.open { display: block; }
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-size: 0.83rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--t);
}
.dropdown-item:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.dropdown-item.danger { color: var(--red); }
.dropdown-item.danger:hover { background: var(--red-dim); }
.dropdown-divider { height: 1px; background: var(--border-light); margin: 4px 0; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .kanban-board { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root { --sidebar-w: 0px; }
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .kanban-board { grid-template-columns: 1fr; }
}
