/* ================================================================
   TaskFlow v2 — Noteflow UI | Cursor-style Dark Mode
   ================================================================ */

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

/* ================================================================
   CSS VARIABLES — LIGHT MODE
   ================================================================ */
:root {
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --bg-base:        #f0f4f8;
    --bg-surface:     #ffffff;
    --bg-elevated:    #ffffff;
    --bg-muted:       #f8fafc;
    --bg-hover:       #f1f5f9;
    --bg-active:      #e8f0fe;

    --text-primary:   #0f172a;
    --text-secondary: #475569;
    --text-muted:     #94a3b8;
    --text-inverse:   #ffffff;

    --border:         #e2e8f0;
    --border-hover:   #cbd5e1;
    --border-focus:   #6366f1;

    --brand-primary:  #6366f1;
    --brand-hover:    #4f46e5;
    --brand-light:    #eef2ff;

    --accent-orange:  #f59e0b;
    --accent-green:   #10b981;
    --accent-blue:    #3b82f6;
    --accent-red:     #ef4444;

    --col-not-started:  #64748b;
    --col-in-progress:  #f59e0b;
    --col-under-review: #3b82f6;
    --col-completed:    #10b981;

    --priority-high-bg:   #fef2f2;
    --priority-high-text: #dc2626;
    --priority-med-bg:    #fffbeb;
    --priority-med-text:  #d97706;
    --priority-low-bg:    #f0fdf4;
    --priority-low-text:  #16a34a;

    --shadow-xs:  0 1px 2px rgba(0,0,0,.05);
    --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md:  0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.05);
    --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
    --shadow-xl:  0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);

    --sidebar-w:  64px;
    --header-h:   60px;
    --transition: 150ms ease;
    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  14px;
    --radius-xl:  18px;
    --radius-full: 9999px;
}

/* ================================================================
   DARK MODE — Cursor IDE style (black/very dark gray tones)
   ================================================================ */
[data-theme="dark"] {
    --bg-base:        #141414;
    --bg-surface:     #1e1e1e;
    --bg-elevated:    #272727;
    --bg-muted:       #1a1a1a;
    --bg-hover:       #2d2d2d;
    --bg-active:      #0d2136;

    --text-primary:   #d4d4d4;
    --text-secondary: #9b9b9b;
    --text-muted:     #5f5f5f;

    --border:         #333333;
    --border-hover:   #444444;
    --border-focus:   #6366f1;

    --brand-primary:  #6366f1;
    --brand-hover:    #818cf8;
    --brand-light:    #1c1c3d;

    --priority-high-bg:   #2a1515;
    --priority-high-text: #f87171;
    --priority-med-bg:    #2a1f0a;
    --priority-med-text:  #fbbf24;
    --priority-low-bg:    #0d1f12;
    --priority-low-text:  #4ade80;

    --shadow-sm:  0 1px 3px rgba(0,0,0,.5);
    --shadow-md:  0 4px 6px -1px rgba(0,0,0,.4);
    --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.4);
    --shadow-xl:  0 20px 25px -5px rgba(0,0,0,.5);
}

/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; font-size: 14px; }
body {
    font-family: var(--font-sans);
    background: var(--bg-base);
    color: var(--text-primary);
    height: 100%;
    overflow: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ================================================================
   LAYOUT
   ================================================================ */
.app-shell { display: flex; height: 100vh; overflow: hidden; }
.main-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.page-content { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 24px; }

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    z-index: 100;
    flex-shrink: 0;
}
.sidebar-top { margin-bottom: 20px; }
.sidebar-logo-icon {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: var(--brand-primary);
    border-radius: var(--radius-md);
    color: white; transition: var(--transition);
}
.sidebar-logo-icon:hover { background: var(--brand-hover); transform: scale(1.05); }
.sidebar-nav { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.sidebar-bottom {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding-top: 12px; border-top: 1px solid var(--border); width: 100%;
}
.sidebar-nav-item {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    background: transparent; border: none; transition: var(--transition);
}
.sidebar-nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar-nav-item.active { background: var(--brand-light); color: var(--brand-primary); }

/* ================================================================
   HEADER
   ================================================================ */
.header {
    height: var(--header-h);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; flex-shrink: 0; z-index: 90;
}
.header-left { display: flex; align-items: center; gap: 24px; }
.header-logo { display: flex; align-items: center; gap: 8px; }
.header-logo-icon {
    width: 28px; height: 28px;
    background: var(--brand-primary);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: white; flex-shrink: 0;
}
.header-logo-text { font-size: 15px; font-weight: 700; color: var(--text-primary); white-space: nowrap; }
.header-nav { display: flex; align-items: center; gap: 2px; }
.header-nav-item {
    padding: 6px 12px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500; color: var(--text-secondary); transition: var(--transition);
}
.header-nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.header-nav-item.active { color: var(--text-primary); font-weight: 600; background: var(--bg-hover); }
.header-right { display: flex; align-items: center; gap: 8px; }
.header-icon-btn {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    border-radius: var(--radius-md);
    background: transparent; border: 1px solid var(--border);
    color: var(--text-secondary); transition: var(--transition); position: relative;
}
.header-icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-hover); }

/* ================================================================
   BRAND SELECTOR
   ================================================================ */
.brand-selector { position: relative; }
.brand-selector-btn {
    display: flex; align-items: center; gap: 6px; padding: 6px 10px;
    border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--bg-surface); color: var(--text-primary);
    font-size: 13px; font-weight: 500; transition: var(--transition); cursor: pointer;
}
.brand-selector-btn:hover { border-color: var(--border-hover); background: var(--bg-hover); }
.brand-dot { width: 8px; height: 8px; border-radius: var(--radius-full); flex-shrink: 0; }
.brand-dropdown {
    position: absolute; top: calc(100% + 6px); right: 0;
    min-width: 200px; background: var(--bg-surface);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl); z-index: 200; display: none; padding: 6px;
}
.brand-dropdown.open { display: block; }
.brand-dropdown-item {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 10px; border-radius: var(--radius-sm);
    font-size: 13px; color: var(--text-primary); transition: var(--transition); cursor: pointer;
}
.brand-dropdown-item:hover { background: var(--bg-hover); }
.brand-dropdown-item.selected { background: var(--brand-light); color: var(--brand-primary); font-weight: 500; }
.brand-dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.brand-dropdown-manage { color: var(--text-secondary); font-size: 12px; }

/* ================================================================
   NOTIFICATIONS
   ================================================================ */
.notif-wrapper { position: relative; }
.notif-btn { position: relative; }
.notif-badge {
    position: absolute; top: -4px; right: -4px;
    width: 18px; height: 18px; border-radius: var(--radius-full);
    background: var(--accent-red); color: white;
    font-size: 10px; font-weight: 700; border: 2px solid var(--bg-surface);
    display: flex; align-items: center; justify-content: center;
}
.notif-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    width: 340px; background: var(--bg-surface);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl); z-index: 300; display: none; overflow: hidden;
}
.notif-dropdown.open { display: block; }
.notif-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px 10px; border-bottom: 1px solid var(--border);
}
.notif-title { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px; border-bottom: 1px solid var(--border);
    cursor: pointer; transition: var(--transition);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-hover); }
.notif-item-dot {
    width: 8px; height: 8px; border-radius: var(--radius-full);
    background: var(--accent-red); flex-shrink: 0; margin-top: 4px;
}
.notif-item-dot.warning { background: var(--accent-orange); }
.notif-item-dot.info    { background: var(--brand-primary); }
.notif-item-title { font-size: 12px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.notif-item-meta  { font-size: 11px; color: var(--text-muted); }
.notif-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ================================================================
   USER AVATAR DROPDOWN
   ================================================================ */
.user-avatar-wrapper { position: relative; }
.user-avatar {
    width: 32px; height: 32px; border-radius: var(--radius-full);
    background: var(--brand-primary); color: white;
    font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; user-select: none; border: none;
    transition: var(--transition);
}
.user-avatar:hover { transform: scale(1.08); }
.user-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    width: 220px; background: var(--bg-surface);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl); z-index: 300; display: none; overflow: hidden;
}
.user-dropdown.open { display: block; }
.user-dropdown-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 14px 10px; border-bottom: 1px solid var(--border);
}
.user-avatar-lg {
    width: 36px; height: 36px; border-radius: var(--radius-full);
    background: var(--brand-primary); color: white;
    font-size: 15px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.user-dropdown-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.user-dropdown-role { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.user-dropdown-divider { height: 1px; background: var(--border); }
.user-dropdown-item {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; font-size: 13px; color: var(--text-primary);
    transition: var(--transition); cursor: pointer; width: 100%;
    border: none; background: none; text-align: left;
}
.user-dropdown-item:hover { background: var(--bg-hover); }

/* ================================================================
   SEARCH OVERLAY — Glassmorphism, ortalanmış
   ================================================================ */
.search-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    z-index: 500; display: none;
    align-items: center; justify-content: center;
    padding: 0;
}
.search-overlay.open { display: flex; flex-direction: column; gap: 0; }

.search-box {
    background: rgba(30,30,30,.92);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-xl);
    width: min(600px, 90vw);
    padding: 16px 20px;
    display: flex; align-items: center; gap: 12px;
    box-shadow: 0 32px 64px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.05);
}
[data-theme="light"] .search-box {
    background: rgba(255,255,255,.96);
    border-color: rgba(0,0,0,.1);
    box-shadow: 0 32px 64px rgba(0,0,0,.2);
}
.search-box svg { color: var(--text-muted); flex-shrink: 0; }
.search-box input {
    flex: 1; border: none; background: transparent; outline: none;
    font-size: 16px; color: var(--text-primary);
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box kbd {
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-sm); padding: 2px 8px;
    font-size: 11px; color: var(--text-muted); font-family: monospace;
}
[data-theme="light"] .search-box kbd {
    background: var(--bg-muted); border-color: var(--border);
}
.search-results {
    width: min(600px, 90vw);
    background: rgba(24,24,24,.96);
    border: 1px solid rgba(255,255,255,.1);
    border-top: none;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    overflow: hidden; max-height: 320px; overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,.4);
}
[data-theme="light"] .search-results {
    background: rgba(255,255,255,.98);
    border-color: rgba(0,0,0,.1);
    box-shadow: 0 20px 40px rgba(0,0,0,.12);
}
.search-result-item { display: flex; align-items: center; gap: 10px; padding: 10px 18px; cursor: pointer; transition: var(--transition); }
.search-result-item:hover { background: var(--bg-hover); }

/* ================================================================
   PAGE HEADER
   ================================================================ */
.page-header { margin-bottom: 24px; }
.page-greeting { font-size: 26px; font-weight: 700; color: var(--text-primary); line-height: 1.2; margin-bottom: 4px; }
.page-subtitle { font-size: 13px; color: var(--text-secondary); }

/* ================================================================
   OVERVIEW
   ================================================================ */
.overview-banner {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px 20px; margin-bottom: 24px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: var(--shadow-sm); flex-wrap: wrap; gap: 12px;
}
.overview-banner-left { display: flex; align-items: center; gap: 12px; }
.overview-banner-icon {
    width: 36px; height: 36px; border-radius: var(--radius-md);
    background: var(--brand-light); color: var(--brand-primary);
    display: flex; align-items: center; justify-content: center;
}
.overview-banner-text strong { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.overview-banner-text p { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
.overview-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.overview-stat { text-align: center; padding: 0 16px; border-left: 1px solid var(--border); }
.overview-stat:first-child { border-left: none; }
.overview-stat-value { font-size: 22px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.overview-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.overview-stat-value.overdue { color: var(--accent-red); }

.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 24px; }
.folder-card {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 14px 16px;
    display: flex; align-items: center; gap: 12px;
    cursor: pointer; transition: var(--transition); box-shadow: var(--shadow-xs);
}
.folder-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.folder-card.add-folder { border-style: dashed; color: var(--text-muted); justify-content: center; gap: 8px; }
.folder-card.add-folder:hover { color: var(--brand-primary); border-color: var(--brand-primary); background: var(--brand-light); }
.folder-card-icon { width: 36px; height: 36px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: white; font-size: 13px; font-weight: 700; }
.folder-card-info { flex: 1; min-width: 0; }
.folder-card-count { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.folder-card-name { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }

/* ================================================================
   BOARD BRAND SWITCHER
   ================================================================ */
.board-brand-sw { position: relative; }
.board-brand-sw-btn {
    display: flex; align-items: center; gap: 7px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 13px; font-weight: 600;
    cursor: pointer; transition: var(--transition);
}
.board-brand-sw-btn:hover { background: var(--bg-hover); border-color: var(--border-hover); }
.board-brand-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.board-brand-sw-drop {
    position: absolute; top: calc(100% + 6px); right: 0;
    min-width: 210px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 200; display: none; overflow: hidden; padding: 5px;
}
.board-brand-sw-drop.open { display: block; }
.board-brand-sw-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 13px; color: var(--text-primary);
    cursor: pointer; transition: var(--transition); text-decoration: none;
}
.board-brand-sw-item:hover { background: var(--bg-hover); }
.board-brand-sw-item.active { background: var(--brand-light); color: var(--brand-primary); font-weight: 600; }
.board-brand-sw-item svg:last-child { margin-left: auto; color: var(--brand-primary); }

/* ================================================================
   KANBAN BOARD
   ================================================================ */
.board-toolbar {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.board-toolbar-left {
    display: flex; align-items: center; gap: 4px;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 4px;
}
.view-toggle-btn {
    display: flex; align-items: center; gap: 6px; padding: 6px 12px;
    border-radius: var(--radius-sm); border: none; background: transparent;
    color: var(--text-secondary); font-size: 13px; font-weight: 500; transition: var(--transition);
}
.view-toggle-btn:hover { color: var(--text-primary); background: var(--bg-hover); }
.view-toggle-btn.active { background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.board-toolbar-right { display: flex; align-items: center; gap: 8px; }

.kanban-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; height: calc(100vh - var(--header-h) - 120px); overflow-x: auto; overflow-y: hidden; padding-bottom: 8px; }
.kanban-column { display: flex; flex-direction: column; background: var(--bg-muted); border-radius: var(--radius-lg); min-width: 260px; border: 1px solid var(--border); overflow: hidden; }
.kanban-col-header {
    padding: 12px 14px 10px; display: flex; align-items: center; gap: 8px;
    background: var(--bg-surface); border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.kanban-col-actions { display: flex; gap: 4px; align-items: center; }
.kanban-col-dot { width: 8px; height: 8px; border-radius: var(--radius-full); flex-shrink: 0; }
.kanban-col-title { font-size: 13px; font-weight: 600; color: var(--text-primary); flex: 1; }
.kanban-col-count {
    font-size: 11px; font-weight: 600; padding: 2px 7px;
    border-radius: var(--radius-full); background: var(--bg-muted);
    color: var(--text-secondary); border: 1px solid var(--border);
}
.kanban-col-edit-btn {
    background: none; border: none; color: var(--text-muted); padding: 3px;
    border-radius: var(--radius-sm); opacity: 0; transition: var(--transition); font-size: 12px;
    display: flex; align-items: center;
}
.kanban-col-header:hover .kanban-col-edit-btn { opacity: 1; }
.kanban-col-edit-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.kanban-col-body { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.kanban-col-body.drag-over { background: var(--brand-light); }
.kanban-col-footer { padding: 8px 10px; flex-shrink: 0; }
.add-task-btn {
    display: flex; align-items: center; gap: 6px; width: 100%;
    padding: 7px 10px; border: 1.5px dashed var(--border);
    border-radius: var(--radius-md); background: transparent;
    color: var(--text-muted); font-size: 12px; font-weight: 500; transition: var(--transition);
}
.add-task-btn:hover { border-color: var(--brand-primary); color: var(--brand-primary); background: var(--brand-light); }

/* ================================================================
   TASK CARD
   ================================================================ */
.task-card {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 13px;
    cursor: grab; transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
    position: relative;
}
.task-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-hover); }
.task-card.sortable-chosen { cursor: grabbing; box-shadow: var(--shadow-xl); transform: rotate(1.5deg) scale(1.02); border-color: var(--brand-primary); z-index: 999; }
.task-card.sortable-ghost { opacity: 0.3; }
.task-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.priority-badge { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: var(--radius-full); }
.priority-high   { background: var(--priority-high-bg); color: var(--priority-high-text); }
.priority-medium { background: var(--priority-med-bg);  color: var(--priority-med-text); }
.priority-low    { background: var(--priority-low-bg);  color: var(--priority-low-text); }
.priority-dynamic { /* colors set inline via style attr */ }
.task-card-menu-btn {
    background: none; border: none; color: var(--text-muted); padding: 3px;
    border-radius: var(--radius-sm); opacity: 0; transition: var(--transition);
}
.task-card:hover .task-card-menu-btn { opacity: 1; }
.task-card-menu-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.task-card-title { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.4; margin-bottom: 4px; cursor: pointer; }
.task-card-title:hover { color: var(--brand-primary); }
.task-card-brand { font-size: 11px; font-weight: 500; margin-bottom: 9px; }
.task-card-progress { margin-bottom: 9px; }
.progress-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.progress-bar-track { height: 5px; background: var(--bg-muted); border-radius: var(--radius-full); overflow: hidden; border: 1px solid var(--border); }
.progress-bar-fill { height: 100%; border-radius: var(--radius-full); transition: width 400ms ease; }
.progress-gray   { background: var(--text-muted); }
.progress-orange { background: var(--accent-orange); }
.progress-blue   { background: var(--accent-blue); }
.progress-green  { background: var(--accent-green); }
.task-card-due { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-muted); margin-bottom: 9px; }
.task-card-due.overdue { color: var(--accent-red); font-weight: 500; }
.task-card-footer { display: flex; align-items: center; justify-content: space-between; }
.task-card-meta { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 11px; }
.task-card-meta span { display: flex; align-items: center; gap: 3px; }
.task-card-dropdown {
    position: absolute; top: 34px; right: 10px;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
    z-index: 300; display: none; overflow: hidden; min-width: 140px;
}
.task-card-dropdown.open { display: block; }
.task-card-dropdown button {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 8px 12px; border: none; background: transparent;
    color: var(--text-primary); font-size: 13px; text-align: left; transition: var(--transition);
}
.task-card-dropdown button:hover { background: var(--bg-hover); }
.task-card-dropdown button:last-child { color: var(--accent-red); }
.task-card-dropdown button:last-child:hover { background: var(--priority-high-bg); }

/* ================================================================
   STATUS CHIP
   ================================================================ */
.status-chip {
    display: inline-flex; align-items: center; padding: 3px 8px;
    border-radius: var(--radius-full); font-size: 11px; font-weight: 600;
    white-space: nowrap;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
    border-radius: var(--radius-md); font-size: 13px; font-weight: 600;
    border: 1px solid transparent; cursor: pointer; transition: var(--transition);
    white-space: nowrap; text-decoration: none;
}
.btn-primary { background: #111827; color: white; border-color: #111827; }
.btn-primary:hover { background: #1f2937; }
[data-theme="dark"] .btn-primary { background: var(--brand-primary); border-color: var(--brand-primary); }
[data-theme="dark"] .btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-secondary { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--border-hover); }
.btn-ghost { background: transparent; color: var(--text-secondary); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-danger { background: var(--accent-red); color: white; border-color: var(--accent-red); }
.btn-danger:hover { background: #dc2626; }
.btn-danger-outline { background: transparent; color: var(--accent-red); border-color: var(--accent-red); }
.btn-danger-outline:hover { background: var(--priority-high-bg); }
.btn-icon { padding: 7px; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ================================================================
   MODAL
   ================================================================ */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.55);
    backdrop-filter: blur(3px); z-index: 400;
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.mini-modal-overlay { z-index: 500; }
.modal {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); width: 100%; max-width: 860px;
    max-height: 90vh; display: flex; flex-direction: column;
    box-shadow: var(--shadow-xl); overflow: hidden;
}
.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.modal-title { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.modal-close { background: none; border: none; color: var(--text-muted); padding: 5px; border-radius: var(--radius-sm); transition: var(--transition); }
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.modal-body { flex: 1; overflow-y: auto; padding: 22px; display: grid; grid-template-columns: 1fr 250px; gap: 22px; }
.modal-col-main { display: flex; flex-direction: column; gap: 15px; }
.modal-col-side  { display: flex; flex-direction: column; gap: 13px; }
.modal-footer {
    padding: 14px 22px; border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.modal-footer-right { display: flex; gap: 8px; }

/* ================================================================
   FORM ELEMENTS
   ================================================================ */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label {
    font-size: 11px; font-weight: 600; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.05em;
    display: flex; align-items: center; gap: 6px;
}
.manage-btn {
    background: none; border: none; color: var(--text-muted); padding: 2px;
    border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition);
}
.manage-btn:hover { color: var(--brand-primary); background: var(--brand-light); }
.form-input, .form-textarea, .form-select {
    width: 100%; padding: 8px 11px;
    border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--bg-surface); color: var(--text-primary);
    font-size: 13px; outline: none; transition: border-color var(--transition);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.form-textarea { resize: vertical; min-height: 70px; }
.form-select { cursor: pointer; }
[data-theme="dark"] .form-input, [data-theme="dark"] .form-textarea, [data-theme="dark"] .form-select {
    background: var(--bg-elevated); color: var(--text-primary);
}
[data-theme="dark"] .form-select option { background: var(--bg-elevated); }
.date-input-wrapper { position: relative; display: flex; align-items: center; }
.date-input-wrapper svg { position: absolute; left: 9px; color: var(--text-muted); pointer-events: none; }
.date-input-wrapper .form-input { padding-left: 30px; }
.form-meta-text { font-size: 13px; color: var(--text-secondary); }
.progress-inputs { display: flex; align-items: center; gap: 8px; }
.progress-input { flex: 1; text-align: center; }
.progress-separator { font-size: 16px; font-weight: 600; color: var(--text-muted); }
.modal-progress-track { margin-top: 6px; height: 6px; }

/* ================================================================
   NOTES (task-linked)
   ================================================================ */
.notes-list { display: flex; flex-direction: column; gap: 7px; max-height: 200px; overflow-y: auto; }
.note-item { background: var(--bg-muted); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 9px 11px; position: relative; }
.note-item-content { font-size: 13px; color: var(--text-primary); line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.note-item-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 5px; }
.note-item-date { font-size: 11px; color: var(--text-muted); }
.note-delete-btn { background: none; border: none; color: var(--text-muted); padding: 2px 3px; border-radius: var(--radius-sm); opacity: 0; transition: var(--transition); }
.note-item:hover .note-delete-btn { opacity: 1; }
.note-delete-btn:hover { color: var(--accent-red); }
.notes-add { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }

/* ================================================================
   STANDALONE NOTES PAGE
   ================================================================ */
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.note-card {
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 14px 16px; cursor: pointer; transition: var(--transition);
    box-shadow: var(--shadow-xs); min-height: 140px; display: flex; flex-direction: column;
    position: relative;
}
.note-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-hover); }
.note-card.pinned { border-top: 3px solid var(--brand-primary); }
[data-theme="dark"] .note-card { border-color: var(--border); }
.note-card-header { display: flex; align-items: center; margin-bottom: 8px; min-height: 20px; }
.note-pin-badge { display: flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 600; color: var(--brand-primary); }
.note-card-btn { background: none; border: none; color: var(--text-muted); padding: 3px; border-radius: var(--radius-sm); opacity: 0; transition: var(--transition); }
.note-card:hover .note-card-btn { opacity: 1; }
.note-card-btn:hover { color: var(--brand-primary); }
.note-card-title { font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.note-card-content { font-size: 12px; color: var(--text-secondary); line-height: 1.5; flex: 1; white-space: pre-line; overflow: hidden; }
.note-card-footer { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(0,0,0,.06); font-size: 11px; color: var(--text-muted); }
[data-theme="dark"] .note-card-footer { border-top-color: rgba(255,255,255,.05); }

/* ================================================================
   DARK MODE — Kanban Board Visibility Override
   ================================================================ */
[data-theme="dark"] .kanban-column {
    background: #242424;
    border-color: #3c3c3c;
}
[data-theme="dark"] .kanban-col-header {
    background: #2c2c2c;
    border-bottom-color: #3c3c3c;
}
[data-theme="dark"] .kanban-col-body {
    background: #242424;
}
[data-theme="dark"] .task-card {
    background: #2a2a2a;
    border-color: #3c3c3c;
}
[data-theme="dark"] .task-card:hover {
    background: #323232;
    border-color: #4a4a4a;
    box-shadow: 0 4px 12px rgba(0,0,0,.5);
}
[data-theme="dark"] .progress-bar-track {
    background: #333;
    border-color: #444;
}
[data-theme="dark"] .add-task-btn {
    border-color: #3c3c3c;
    color: var(--text-muted);
}
[data-theme="dark"] .add-task-btn:hover {
    background: #1c1c3d;
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* ================================================================
   ATTACHMENT INLINE PREVIEW
   ================================================================ */
.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.attachment-item {
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.attachment-item.is-image { padding: 0; }
.attachment-image-preview {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
    transition: opacity var(--transition);
}
.attachment-image-preview:hover { opacity: 0.9; }
.attachment-item-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
}
.attachment-item.is-file { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.attachment-thumb { width: 32px; height: 32px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.attachment-icon {
    width: 32px; height: 32px; border-radius: var(--radius-sm);
    background: var(--brand-light); color: var(--brand-primary);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.attachment-info { flex: 1; min-width: 0; }
.attachment-name { font-size: 12px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attachment-meta { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.attachment-delete {
    background: none; border: none; color: var(--text-muted); padding: 3px;
    border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); flex-shrink: 0;
}
.attachment-delete:hover { color: var(--accent-red); }

/* Pending upload */
.attachment-item.pending {
    border-style: dashed;
    border-color: var(--accent-orange);
    opacity: 0.85;
}
.attachment-pending-label {
    font-size: 10px; font-weight: 600;
    color: var(--accent-orange); margin-top: 2px;
}

/* Image zoom overlay */
.img-zoom-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    cursor: zoom-out;
}
.img-zoom-overlay img {
    max-width: 90vw; max-height: 90vh;
    border-radius: var(--radius-md);
    box-shadow: 0 25px 50px rgba(0,0,0,.5);
}

/* ================================================================
   UPLOAD / ATTACHMENTS (old styles kept)
   ================================================================ */
.upload-area {
    border: 2px dashed var(--border); border-radius: var(--radius-md);
    padding: 20px; text-align: center; color: var(--text-muted); font-size: 13px;
    cursor: pointer; transition: var(--transition);
}
.upload-area:hover, .upload-area.drag-over { border-color: var(--brand-primary); background: var(--brand-light); color: var(--brand-primary); }
.upload-area svg { margin-bottom: 6px; }
.upload-browse { color: var(--brand-primary); font-weight: 600; cursor: pointer; text-decoration: underline; }
.upload-hint { font-size: 11px; margin-top: 3px !important; }
.attachments-list { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.attachment-item { display: flex; align-items: center; gap: 9px; padding: 7px 9px; background: var(--bg-muted); border: 1px solid var(--border); border-radius: var(--radius-md); }
.attachment-thumb { width: 34px; height: 34px; border-radius: var(--radius-sm); object-fit: cover; background: var(--border); flex-shrink: 0; }
.attachment-icon { width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--brand-light); color: var(--brand-primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.attachment-info { flex: 1; min-width: 0; }
.attachment-name { font-size: 12px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attachment-meta { font-size: 11px; color: var(--text-muted); }
.attachment-delete { background: none; border: none; color: var(--text-muted); padding: 3px; border-radius: var(--radius-sm); opacity: 0; transition: var(--transition); }
.attachment-item:hover .attachment-delete { opacity: 1; }
.attachment-delete:hover { color: var(--accent-red); }

/* ================================================================
   CONFIRM DIALOG
   ================================================================ */
.confirm-overlay { z-index: 600; }
.confirm-dialog {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 28px 24px;
    max-width: 360px; width: 100%; text-align: center; box-shadow: var(--shadow-xl);
}
.confirm-icon { width: 48px; height: 48px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.confirm-icon-danger { background: var(--priority-high-bg); color: var(--accent-red); }
.confirm-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 7px; }
.confirm-text { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.5; }
.confirm-actions { display: flex; gap: 8px; justify-content: center; }

/* ================================================================
   BRANDS PAGE
   ================================================================ */
.brands-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.brand-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); transition: var(--transition); }
.brand-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-hover); }
.brand-card-top { height: 5px; }
.brand-card-body { padding: 18px; }
.brand-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.brand-logo { width: 42px; height: 42px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: white; font-size: 16px; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.brand-date { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.brand-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; padding: 10px; background: var(--bg-muted); border-radius: var(--radius-md); border: 1px solid var(--border); }
.brand-stat { text-align: center; }
.brand-stat-value { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.brand-stat-label { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.brand-actions { display: flex; gap: 8px; }
.color-swatches { display: flex; gap: 5px; flex-wrap: wrap; }
.color-swatch { width: 22px; height: 22px; border-radius: var(--radius-full); cursor: pointer; border: 2px solid transparent; transition: var(--transition); }
.color-swatch:hover, .color-swatch.selected { border-color: var(--text-primary); transform: scale(1.15); }

/* ================================================================
   TABLE VIEW
   ================================================================ */
.table-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.table-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.table-wrapper { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); overflow-x: auto; }
.tasks-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tasks-table thead tr { background: var(--bg-muted); }
.tasks-table th {
    padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 600;
    color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border); white-space: nowrap; user-select: none;
}
.tasks-table th.sortable { cursor: pointer; }
.tasks-table th.sortable:hover { color: var(--text-primary); }
.sort-icon { opacity: 0.4; font-size: 10px; }
.tasks-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tasks-table tbody tr:last-child td { border-bottom: none; }
.tasks-table tbody tr:hover { background: var(--bg-hover); }
.tasks-table tbody tr { transition: var(--transition); }

/* ================================================================
   CALENDAR VIEW
   ================================================================ */
.calendar-container { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); }
.cal-nav {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px; border-bottom: 1px solid var(--border);
    background: var(--bg-muted);
}
.cal-month-title { font-size: 16px; font-weight: 700; color: var(--text-primary); flex: 1; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-day-name {
    padding: 8px 12px; text-align: center; font-size: 11px;
    font-weight: 600; color: var(--text-muted); text-transform: uppercase;
    border-bottom: 1px solid var(--border); background: var(--bg-muted);
    letter-spacing: 0.04em;
}
.cal-cell {
    min-height: 100px; padding: 6px; border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border); cursor: pointer; transition: var(--transition);
    position: relative;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell:hover { background: var(--bg-hover); }
.cal-cell-empty { background: var(--bg-muted); cursor: default; }
.cal-cell-today { background: var(--brand-light); }
.cal-cell-today:hover { background: var(--brand-light); filter: brightness(0.98); }
.cal-cell-has-tasks { cursor: pointer; }
.cal-day-num {
    font-size: 12px; font-weight: 600; color: var(--text-secondary);
    width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-full);
}
.cal-today-badge { background: var(--brand-primary); color: white; }
.cal-dots { display: flex; gap: 3px; margin-top: 4px; flex-wrap: wrap; }
.cal-task-dot { width: 7px; height: 7px; border-radius: var(--radius-full); }
.cal-more { font-size: 10px; font-weight: 600; color: var(--text-muted); }
.cal-day-tasks {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
    z-index: 50; display: none; padding: 6px; min-width: 200px;
}
.cal-day-tasks.open { display: block; }
.cal-task-item {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    padding: 5px 8px; border-radius: var(--radius-sm);
    cursor: pointer; transition: var(--transition);
}
.cal-task-item:hover { background: var(--bg-hover); }
.cal-task-name { font-size: 12px; font-weight: 500; color: var(--text-primary); flex: 1; }
.cal-task-pri { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: var(--radius-full); flex-shrink: 0; }

/* ================================================================
   SETTINGS PAGE
   ================================================================ */
.settings-grid { display: grid; grid-template-columns: 220px 1fr; gap: 20px; max-width: 900px; }
.settings-sidebar { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 6px; height: fit-content; }
.settings-nav-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 11px;
    border-radius: var(--radius-md); font-size: 13px; font-weight: 500;
    color: var(--text-secondary); cursor: pointer; transition: var(--transition);
    border: none; background: none; width: 100%; text-align: left;
}
.settings-nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.settings-nav-item.active { background: var(--brand-light); color: var(--brand-primary); }
.settings-panel { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.settings-section-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.settings-section-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.settings-row { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.settings-row:last-of-type { border-bottom: none; }
.settings-row-header { display: flex; align-items: center; justify-content: space-between; }
.settings-row-label { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.settings-row-desc { font-size: 12px; color: var(--text-muted); }

/* ================================================================
   COLUMNS / PRIORITIES MANAGE LIST
   ================================================================ */
.manage-list-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px;
    background: var(--bg-muted); border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.manage-list-item-color {
    width: 14px; height: 14px; border-radius: var(--radius-full); flex-shrink: 0;
}
.manage-list-item-name { flex: 1; font-size: 13px; font-weight: 500; color: var(--text-primary); }
.manage-list-item-count { font-size: 11px; color: var(--text-muted); }
.manage-list-actions { display: flex; gap: 3px; }

/* ================================================================
   TOAST NOTIFICATIONS
   ================================================================ */
.toast-container { position: fixed; bottom: 22px; right: 22px; z-index: 1000; display: flex; flex-direction: column; gap: 7px; pointer-events: none; }
.toast {
    display: flex; align-items: center; gap: 9px; padding: 11px 14px;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
    font-size: 13px; color: var(--text-primary); pointer-events: all;
    animation: toastIn 200ms ease; max-width: 320px;
}
.toast.success { border-left: 3px solid var(--accent-green); }
.toast.error   { border-left: 3px solid var(--accent-red); }
.toast.info    { border-left: 3px solid var(--brand-primary); }
.toast.warning { border-left: 3px solid var(--accent-orange); }
@keyframes toastIn  { from { opacity:0; transform:translateY(10px) scale(.95); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes toastOut { from { opacity:1; transform:translateY(0) scale(1); } to { opacity:0; transform:translateY(10px) scale(.95); } }
.toast.removing { animation: toastOut 200ms ease forwards; }

/* ================================================================
   LOADING
   ================================================================ */
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--brand-primary); border-radius: var(--radius-full); animation: spin 600ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-loader { display: flex; align-items: center; justify-content: center; height: 180px; }

/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px 20px; text-align: center; color: var(--text-muted); }
.empty-state svg { margin-bottom: 10px; opacity: 0.35; }
.empty-state p { font-size: 13px; line-height: 1.6; }

/* ================================================================
   CHECKLIST STYLES
   ================================================================ */
.checklist-list {
    display: flex; flex-direction: column; gap: 4px;
    max-height: 220px; overflow-y: auto;
    margin-bottom: 6px;
}
.checklist-item {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 10px;
    background: var(--bg-muted); border: 1px solid var(--border);
    border-radius: var(--radius-md); transition: var(--transition);
}
.checklist-item:hover { border-color: var(--border-hover); }
.checklist-item.done { opacity: 0.65; }
.checklist-label {
    display: flex; align-items: center; gap: 8px; flex: 1; cursor: pointer;
}
.checklist-label input[type="checkbox"] {
    width: 15px; height: 15px; cursor: pointer; accent-color: var(--brand-primary);
    flex-shrink: 0;
}
.checklist-text { font-size: 13px; color: var(--text-primary); }
.checklist-item.done .checklist-text { text-decoration: line-through; color: var(--text-muted); }
.checklist-delete {
    background: none; border: none; color: var(--text-muted);
    padding: 2px 4px; border-radius: var(--radius-sm);
    cursor: pointer; opacity: 0; transition: var(--transition);
    font-size: 14px; line-height: 1;
}
.checklist-item:hover .checklist-delete { opacity: 1; }
.checklist-delete:hover { color: var(--accent-red); }
.checklist-add-row {
    display: flex; gap: 6px; margin-top: 4px;
}
.checklist-add-row .form-input { flex: 1; }
.checklist-pending-badge {
    font-size: 10px; font-weight: 600; color: var(--accent-orange);
    padding: 2px 6px; background: #3b2a0f; border-radius: 4px; margin-left: 4px;
}

/* Progress manual disabled state */
#progressManualInputs.auto-managed {
    opacity: 0.45;
    pointer-events: none;
    user-select: none;
}

/* ================================================================
   CALENDAR — Add Task Button
   ================================================================ */
.cal-cell-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 4px;
}
.cal-add-task-btn {
    width: 20px; height: 20px;
    border-radius: var(--radius-full);
    background: var(--brand-primary);
    color: white; font-size: 14px; line-height: 1;
    border: none; cursor: pointer;
    display: none; align-items: center; justify-content: center;
    transition: var(--transition); flex-shrink: 0;
    font-weight: 400;
}
.cal-cell:hover .cal-add-task-btn { display: flex; }
.cal-add-task-btn:hover { background: var(--brand-hover); transform: scale(1.1); }

/* ================================================================
   DOCUMENT CARD — improved
   ================================================================ */
.doc-card {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    transition: var(--transition); box-shadow: var(--shadow-xs);
}
.doc-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-hover); transform: translateY(-1px); }
.doc-card-thumb { width: 100%; height: 130px; object-fit: cover; display: block; cursor: zoom-in; }
.doc-card-icon-wrap {
    height: 130px; display: flex; align-items: center; justify-content: center;
    background: var(--bg-muted); color: var(--brand-primary); cursor: pointer;
}
.doc-card-body { padding: 10px 12px; }
.doc-card-name { font-size: 12px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-card-task { font-size: 11px; color: var(--text-secondary); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-card-brand { font-size: 10px; font-weight: 600; margin-top: 3px; }
.doc-card-footer { padding: 6px 12px 10px; }

/* Doc preview popup (PDF/iframe) */
.doc-preview-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.8);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.doc-preview-box {
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    width: 90vw; height: 88vh;
    display: flex; flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}
.doc-preview-header {
    padding: 12px 16px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
.doc-preview-iframe { flex: 1; border: none; width: 100%; }

/* ================================================================
   BRAND LOGO UPLOAD
   ================================================================ */
.logo-upload-area {
    width: 72px; height: 72px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; overflow: hidden; transition: var(--transition);
    background: var(--bg-muted); position: relative;
}
.logo-upload-area:hover { border-color: var(--brand-primary); background: var(--brand-light); }
.logo-upload-area img { width: 100%; height: 100%; object-fit: cover; }
.logo-upload-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.5);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: var(--transition); color: white; font-size: 11px; font-weight: 600;
    text-align: center;
}
.logo-upload-area:hover .logo-upload-overlay { opacity: 1; }

/* ================================================================
   DARK MODE — Additional readability fixes
   ================================================================ */
[data-theme="dark"] select option { background: #2a2a2a; color: #d4d4d4; }
[data-theme="dark"] .flatpickr-calendar { background: #1e1e1e !important; border-color: #3a3a3a !important; color: #d4d4d4 !important; box-shadow: 0 10px 40px rgba(0,0,0,.6) !important; }
[data-theme="dark"] .flatpickr-day { color: #d4d4d4; }
[data-theme="dark"] .flatpickr-day:hover { background: #3a3a3a !important; border-color: #3a3a3a !important; color: #fff; }
[data-theme="dark"] .flatpickr-day.selected, [data-theme="dark"] .flatpickr-day.selected:hover { background: var(--brand-primary) !important; border-color: var(--brand-primary) !important; color: #fff; }
[data-theme="dark"] .flatpickr-day.today { border-color: var(--brand-primary) !important; color: var(--brand-primary); }
[data-theme="dark"] .flatpickr-day.prevMonthDay, [data-theme="dark"] .flatpickr-day.nextMonthDay { color: #555; }
[data-theme="dark"] .flatpickr-months { background: #2a2a2a; }
[data-theme="dark"] .flatpickr-month { color: #d4d4d4; fill: #d4d4d4; }
[data-theme="dark"] .flatpickr-weekday { color: #888; background: #2a2a2a; }
[data-theme="dark"] .flatpickr-current-month input.cur-year { color: #d4d4d4; }
[data-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months { background: #2a2a2a; color: #d4d4d4; border: none; }
[data-theme="dark"] .flatpickr-monthDropdown-month { background: #2a2a2a; color: #d4d4d4; }
[data-theme="dark"] .numInputWrapper span { border-color: #3a3a3a; }
[data-theme="dark"] .numInputWrapper span svg { fill: #888; }
[data-theme="dark"] .flatpickr-prev-month, [data-theme="dark"] .flatpickr-next-month { color: #d4d4d4; fill: #d4d4d4; }
[data-theme="dark"] .flatpickr-prev-month:hover, [data-theme="dark"] .flatpickr-next-month:hover { color: #fff; }

/* Folder card — marka adı üste, görev sayısı alta */
.folder-card-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.folder-card-count { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ================================================================
   FLATPICKR DARK MODE (legacy override)
   ================================================================ */
[data-theme="dark"] .flatpickr-calendar {
    background: var(--bg-elevated);
    border-color: var(--border);
    box-shadow: var(--shadow-xl);
    color: var(--text-primary);
}
[data-theme="dark"] .flatpickr-day { color: var(--text-primary); }
[data-theme="dark"] .flatpickr-day:hover { background: var(--bg-hover); border-color: var(--border); }
[data-theme="dark"] .flatpickr-day.selected { background: var(--brand-primary); border-color: var(--brand-primary); color: white; }
[data-theme="dark"] .flatpickr-months { background: var(--bg-muted); }
[data-theme="dark"] .flatpickr-month { color: var(--text-primary); }
[data-theme="dark"] .flatpickr-weekday { color: var(--text-muted); }
[data-theme="dark"] .flatpickr-current-month input { color: var(--text-primary); }
[data-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months { background: var(--bg-elevated); color: var(--text-primary); }
[data-theme="dark"] .numInputWrapper span { border-color: var(--border); }

/* ================================================================
   MODAL TABS
   ================================================================ */
.modal-xl { max-width: 920px; }
.modal-tabs {
    display: flex; gap: 0; padding: 0 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-muted); flex-shrink: 0; overflow-x: auto;
}
.modal-tab {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 14px; font-size: 12px; font-weight: 500;
    color: var(--text-muted); border: none; background: none;
    cursor: pointer; border-bottom: 2px solid transparent;
    transition: var(--transition); white-space: nowrap; flex-shrink: 0;
}
.modal-tab:hover { color: var(--text-primary); }
.modal-tab.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }
.modal-tab-badge {
    background: var(--brand-primary); color: white;
    font-size: 10px; font-weight: 700; padding: 1px 5px;
    border-radius: var(--radius-full); margin-left: 2px;
}
.modal-tab-time {
    font-size: 10px; color: var(--text-muted); margin-left: 2px;
}
.modal-body-tabbed {
    flex: 1; overflow-y: auto; padding: 0;
}
.modal-tab-content {
    padding: 20px 22px;
    display: grid; grid-template-columns: 1fr 250px; gap: 22px;
}
.modal-tab-content:not([id="tab-content-details"]) {
    display: block;
}

/* ================================================================
   TAGS
   ================================================================ */
.tags-container {
    display: flex; flex-wrap: wrap; gap: 5px; min-height: 28px;
    padding: 4px 0;
}
.tag-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 8px 3px 8px; border-radius: var(--radius-full);
    font-size: 11px; font-weight: 600; cursor: default;
    border: none;
}
.tag-pill-remove {
    background: none; border: none; cursor: pointer;
    color: inherit; opacity: 0.6; padding: 0; line-height: 1;
    font-size: 14px;
}
.tag-pill-remove:hover { opacity: 1; }
.tag-search-drop {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
    z-index: 100; display: none; max-height: 200px; overflow-y: auto;
}
.tag-search-drop.open { display: block; }
.tag-drop-item {
    display: flex; align-items: center; gap: 7px;
    padding: 8px 11px; cursor: pointer; font-size: 13px;
    transition: var(--transition);
}
.tag-drop-item:hover { background: var(--bg-hover); }
.tag-drop-item .tag-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.tag-drop-create { color: var(--brand-primary); font-style: italic; }

/* ================================================================
   COMMENTS
   ================================================================ */
.comments-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.comment-item {
    background: var(--bg-muted); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 11px 13px;
}
.comment-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.comment-date { font-size: 11px; color: var(--text-muted); }
.comment-delete { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 2px; opacity: 0; }
.comment-item:hover .comment-delete { opacity: 1; }
.comment-delete:hover { color: var(--accent-red); }
.comment-body { font-size: 13px; color: var(--text-primary); line-height: 1.5; white-space: pre-wrap; }
.comment-reactions {
    display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap;
}
.reaction-btn {
    display: flex; align-items: center; gap: 3px;
    padding: 3px 8px; border-radius: var(--radius-full);
    border: 1px solid var(--border); background: var(--bg-muted);
    font-size: 13px; cursor: pointer; transition: var(--transition);
}
.reaction-btn:hover, .reaction-btn.active { background: var(--brand-light); border-color: var(--brand-primary); }
.reaction-add-btn {
    background: none; border: 1px dashed var(--border);
    border-radius: var(--radius-full); padding: 3px 7px;
    color: var(--text-muted); cursor: pointer; font-size: 13px;
    transition: var(--transition);
}
.reaction-add-btn:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.comment-add-box { display: flex; flex-direction: column; gap: 7px; }
.emoji-picker-drop {
    position: absolute; background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
    z-index: 100; padding: 8px; display: flex; flex-wrap: wrap; gap: 4px;
    width: 200px;
}

/* ================================================================
   TIME TRACKING
   ================================================================ */
.timer-box {
    background: var(--bg-muted); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px; text-align: center;
}
.timer-display {
    font-size: 32px; font-weight: 700; color: var(--text-primary);
    font-family: 'Courier New', monospace; letter-spacing: 2px;
}
.timer-box.running { border-color: var(--accent-green); }
.timer-box.running .timer-display { color: var(--accent-green); }
.time-logs-list { display: flex; flex-direction: column; gap: 6px; }
.time-log-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; background: var(--bg-muted);
    border: 1px solid var(--border); border-radius: var(--radius-md);
}
.time-log-duration { font-size: 13px; font-weight: 700; color: var(--brand-primary); flex-shrink: 0; min-width: 50px; }
.time-log-desc { flex: 1; font-size: 12px; color: var(--text-secondary); }
.time-log-date { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
.time-log-del { background: none; border: none; color: var(--text-muted); cursor: pointer; opacity: 0; padding: 2px; }
.time-log-item:hover .time-log-del { opacity: 1; }
.time-log-del:hover { color: var(--accent-red); }

/* ================================================================
   DEPENDENCIES
   ================================================================ */
.deps-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.dep-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; background: var(--bg-muted);
    border: 1px solid var(--border); border-radius: var(--radius-md);
}
.dep-item.blocked { border-color: var(--accent-orange); background: #3b2a0f20; }
.dep-item.completed { opacity: 0.6; }
.dep-task-name { flex: 1; font-size: 12px; font-weight: 500; }
.dep-status { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; flex-shrink: 0; }
.dep-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; opacity: 0; }
.dep-item:hover .dep-remove { opacity: 1; }
.dep-remove:hover { color: var(--accent-red); }
.dep-search-drop {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
    z-index: 100; display: none; max-height: 200px; overflow-y: auto;
}
.dep-search-drop.open { display: block; }
.dep-drop-item {
    padding: 8px 11px; cursor: pointer; font-size: 12px;
    transition: var(--transition); border-bottom: 1px solid var(--border);
}
.dep-drop-item:last-child { border-bottom: none; }
.dep-drop-item:hover { background: var(--bg-hover); }

/* ================================================================
   BULK OPERATIONS
   ================================================================ */
.bulk-toolbar {
    display: flex; align-items: center; gap: 8px;
    background: var(--brand-light); border: 1px solid var(--brand-primary);
    border-radius: var(--radius-md); padding: 6px 12px;
    animation: fadeIn 200ms ease;
}
.bulk-count { font-size: 12px; font-weight: 600; color: var(--brand-primary); white-space: nowrap; }
@keyframes fadeIn { from { opacity:0; transform:scale(.97); } to { opacity:1; transform:scale(1); } }

/* Task card bulk checkbox */
.task-card-check {
    display: none; position: absolute; top: 10px; left: 10px;
    width: 16px; height: 16px; accent-color: var(--brand-primary);
    cursor: pointer; z-index: 5;
}
.bulk-mode .task-card-check { display: block; }
.bulk-mode .task-card { cursor: default; padding-left: 30px; }
.task-card.bulk-selected { border-color: var(--brand-primary); background: var(--brand-light); }

/* ================================================================
   GANTT VIEW
   ================================================================ */
.gantt-outer {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    height: calc(100vh - var(--header-h) - 130px); display: flex; flex-direction: column;
}
.gantt-controls {
    padding: 10px 16px; border-bottom: 1px solid var(--border);
    background: var(--bg-muted); display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.gantt-scroll-area { flex: 1; overflow: auto; }
.gantt-grid { display: table; border-collapse: collapse; min-width: 100%; }
.gantt-header-row { display: flex; position: sticky; top: 0; z-index: 10; background: var(--bg-muted); border-bottom: 1px solid var(--border); }
.gantt-task-col-h { width: 220px; min-width: 220px; padding: 8px 12px; font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; flex-shrink: 0; border-right: 1px solid var(--border); }
.gantt-days-col-h { display: flex; flex: 1; }
.gantt-day-h { flex-shrink: 0; width: 36px; text-align: center; font-size: 10px; font-weight: 600; color: var(--text-muted); padding: 8px 0; border-right: 1px solid var(--border); }
.gantt-day-h.today { color: var(--brand-primary); background: var(--brand-light); }
.gantt-row { display: flex; border-bottom: 1px solid var(--border); }
.gantt-row:hover { background: var(--bg-hover); }
.gantt-task-name-cell { width: 220px; min-width: 220px; padding: 8px 12px; font-size: 12px; font-weight: 500; color: var(--text-primary); flex-shrink: 0; border-right: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; display: flex; align-items: center; }
.gantt-task-name-cell:hover { color: var(--brand-primary); }
.gantt-timeline-cell { flex: 1; position: relative; height: 38px; }
.gantt-today-line { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--brand-primary); opacity: 0.6; z-index: 2; pointer-events: none; }
.gantt-day-col { position: absolute; top: 0; bottom: 0; width: 36px; border-right: 1px solid var(--border); }
.gantt-day-col.today { background: var(--brand-light); opacity: 0.3; }
.gantt-bar {
    position: absolute; top: 6px; height: 26px;
    border-radius: 5px; cursor: pointer; min-width: 36px;
    display: flex; align-items: center; padding: 0 7px;
    transition: filter 150ms; z-index: 3; overflow: hidden;
}
.gantt-bar:hover { filter: brightness(1.15); }
.gantt-bar-label { font-size: 11px; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ================================================================
   UNDO TOAST
   ================================================================ */
.toast-undo { cursor: pointer; }
.toast-undo-btn {
    background: none; border: 1px solid currentColor;
    border-radius: var(--radius-sm); padding: 2px 8px;
    font-size: 11px; font-weight: 600; cursor: pointer;
    color: inherit; margin-left: 6px; transition: var(--transition);
    flex-shrink: 0;
}
.toast-undo-btn:hover { background: rgba(255,255,255,.15); }

/* ================================================================
   MOBILE RESPONSIVE — ≤ 768px
   ================================================================ */
@media (max-width: 768px) {
    /* Sidebar gizli, hamburger toggle ile açılır */
    .sidebar {
        position: fixed; left: -68px; top: 0; height: 100vh;
        z-index: 500; transition: left 200ms ease;
        box-shadow: none;
    }
    .sidebar.mobile-open {
        left: 0;
        box-shadow: var(--shadow-xl);
    }
    .sidebar-overlay {
        display: none; position: fixed; inset: 0;
        background: rgba(0,0,0,.5); z-index: 499;
    }
    .sidebar-overlay.active { display: block; }

    /* Hamburger butonu */
    .header-hamburger { display: flex !important; }

    /* Header daralt */
    .header { padding: 0 10px; gap: 6px; }
    .header-logo-text { display: none; }
    .header-nav { display: none; }
    .header-right { gap: 4px; }

    /* Main area — sidebar width kadar margin gerek yok */
    .main-area { margin-left: 0; }
    .app-shell { overflow: visible; }

    /* Board — tek sütun */
    .kanban-board {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
        padding-bottom: 80px;
    }
    .kanban-column { min-width: unset; }

    /* Modal — tam ekran */
    .modal-overlay { padding: 0; align-items: flex-end; }
    .modal, .modal-xl {
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        max-height: 92vh;
        max-width: 100vw;
        width: 100vw;
    }
    .modal-body-tabbed { overflow-y: auto; }
    .modal-tab-content { grid-template-columns: 1fr; padding: 16px; }
    .modal-col-side { border-top: 1px solid var(--border); padding-top: 14px; }

    /* Settings grid */
    .settings-grid { grid-template-columns: 1fr; }
    .settings-sidebar { height: auto; }

    /* Board toolbar */
    .board-toolbar { flex-wrap: wrap; gap: 8px; }
    .board-toolbar-left, .board-toolbar-right { flex-wrap: wrap; }

    /* Gantt — horizontal scroll */
    .gantt-outer { height: auto; max-height: calc(100vh - 160px); }

    /* Table — horizontal scroll */
    .table-wrapper { overflow-x: auto; }
    .tasks-table { min-width: 600px; }

    /* Overview */
    .overview-banner { flex-direction: column; align-items: flex-start; }
    .overview-stats { flex-wrap: wrap; }
    .folder-grid { grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); }

    /* Brands grid */
    .brands-grid { grid-template-columns: 1fr; }

    /* Notes grid */
    .notes-grid { grid-template-columns: 1fr; }

    /* Calendar */
    .cal-cell { min-height: 60px; }
    .cal-task-dot { width: 5px; height: 5px; }
    .cal-task-name { font-size: 10px; }

    /* Search overlay */
    .search-box { width: 95vw; }
    .search-results { width: 95vw; }

    /* Doc cards */
    .gantt-task-col-h, .gantt-task-name-cell { width: 140px; min-width: 140px; }
}

@media (max-width: 480px) {
    .page-greeting { font-size: 20px; }
    .modal-tabs { gap: 0; }
    .modal-tab { padding: 8px 10px; font-size: 11px; }
    .kanban-col-body { padding: 6px; }
    .task-card { padding: 10px; }
}

/* Hamburger — desktop'ta gizli */
.header-hamburger {
    display: none;
    align-items: center; justify-content: center;
    width: 34px; height: 34px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
}

/* ================================================================
   UTILITIES
   ================================================================ */
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
