/* ═══════════════════════════════════════════════
   TTS Group CRM — Professional CRM Stylesheet
   ═══════════════════════════════════════════════ */

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

:root {
    /* Core palette */
    --bg-body: #f0f2f5;
    --bg-sidebar: #1b2537;
    --bg-sidebar-hover: #263044;
    --bg-sidebar-active: #33415c;
    --bg-card: #ffffff;
    --bg-input: #f8f9fb;
    --bg-table-stripe: #f8f9fb;

    /* Text */
    --text-primary: #1a1d23;
    --text-secondary: #5f6b7a;
    --text-muted: #9ca3af;
    --text-sidebar: #94a3b8;
    --text-sidebar-active: #ffffff;
    --text-on-primary: #ffffff;

    /* Accent */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    --primary-subtle: #eff6ff;

    /* Status colors */
    --success: #059669;
    --success-bg: #ecfdf5;
    --warning: #d97706;
    --warning-bg: #fffbeb;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --info: #0891b2;
    --info-bg: #ecfeff;

    /* Borders & shadows */
    --border: #e2e5ea;
    --border-light: #f0f1f3;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.1);

    /* Sizing */
    --sidebar-width: 250px;
    --topbar-height: 56px;
    --radius: 8px;
    --radius-lg: 12px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.55;
    min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* ── Layout ── */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: var(--text-sidebar);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    transition: transform .25s ease;
}
.sidebar-brand {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-brand .brand-icon {
    width: 36px; height: 36px;
    background: var(--primary);
    border-radius: 10px;
    display: grid; place-items: center;
    color: #fff; font-weight: 700; font-size: 15px;
}
.sidebar-brand h1 {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.3px;
}
.sidebar-brand small {
    display: block;
    font-size: 10px;
    color: var(--text-sidebar);
    font-weight: 400;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-top: 1px;
}
.sidebar-nav { padding: 16px 12px; flex: 1; }
.sidebar-nav .nav-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,.25);
    padding: 16px 12px 8px;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--text-sidebar);
    font-weight: 400;
    font-size: 13.5px;
    transition: all .15s;
    text-decoration: none;
    margin-bottom: 2px;
}
.sidebar-nav a:hover {
    background: var(--bg-sidebar-hover);
    color: #e2e8f0;
    text-decoration: none;
}
.sidebar-nav a.active {
    background: var(--bg-sidebar-active);
    color: var(--text-sidebar-active);
    font-weight: 500;
}
.sidebar-nav a .nav-icon {
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    opacity: .7;
    flex-shrink: 0;
}
.sidebar-nav a.active .nav-icon { opacity: 1; }
.sidebar-nav a .badge {
    margin-left: auto;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
}
.sidebar-user {
    padding: 16px 18px;
    border-top: 1px solid rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-user .user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 600;
    font-size: 12px;
    color: #fff;
    flex-shrink: 0;
}
.sidebar-user .user-info { flex: 1; min-width: 0; }
.sidebar-user .user-name { color: #e2e8f0; font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .user-role { font-size: 11px; color: var(--text-sidebar); text-transform: capitalize; }

/* ── Main content ── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* ── Top Bar ── */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-search {
    flex: 1;
    max-width: 440px;
    position: relative;
}
.topbar-search input {
    width: 100%;
    padding: 8px 14px 8px 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.topbar-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.topbar-search .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* ── Page Container ── */
.page-container {
    padding: 28px;
}
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-header h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.3px;
    color: var(--text-primary);
}
.page-header .subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 400;
    margin-top: 2px;
}

/* ── Cards ── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-header h3 {
    font-size: 15px;
    font-weight: 600;
}
.card-body { padding: 22px; }
.card-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-table-stripe);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ── Stat Cards ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
}
.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.stat-card .stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
}
.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -.5px;
    line-height: 1.1;
}
.stat-card .stat-change {
    font-size: 12px;
    margin-top: 6px;
    font-weight: 500;
}
.stat-card .stat-change.up { color: var(--success); }
.stat-card .stat-change.down { color: var(--danger); }
.stat-card .stat-icon {
    float: right;
    width: 42px; height: 42px;
    border-radius: 10px;
    display: grid; place-items: center;
}

/* ── Tables ── */
.table-wrapper { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
}
thead th {
    padding: 11px 16px;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-secondary);
    background: var(--bg-table-stripe);
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}
tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}
tbody tr:hover { background: var(--primary-subtle); }
tbody tr:last-child td { border-bottom: none; }

.table-name {
    display: flex;
    align-items: center;
    gap: 10px;
}
.table-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 600;
    font-size: 12px;
    color: #fff;
    flex-shrink: 0;
}
.table-name-text .primary-text { font-weight: 500; color: var(--text-primary); }
.table-name-text .secondary-text { font-size: 12px; color: var(--text-secondary); }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary {
    background: var(--primary);
    color: var(--text-on-primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
}
.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-input); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost { background: transparent; color: var(--text-secondary); border: none; padding: 6px 10px; }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-input); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 10px 22px; font-size: 15px; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 5px;
}
.form-control {
    width: 100%;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-primary);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* ── Badges / Pills ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .2px;
    white-space: nowrap;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-gray { background: #f3f4f6; color: #6b7280; }

/* ── Pipeline / Kanban ── */
.pipeline-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    min-height: 500px;
}
.pipeline-column {
    min-width: 280px;
    width: 280px;
    flex-shrink: 0;
    background: var(--bg-input);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
}
.pipeline-column-header {
    padding: 14px 16px;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--border);
}
.pipeline-column-header .stage-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
}
.pipeline-column-header .count {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: var(--text-secondary);
}
.pipeline-column-body {
    padding: 12px;
    flex: 1;
    min-height: 100px;
}
.pipeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
    cursor: grab;
    transition: box-shadow .15s, transform .15s;
}
.pipeline-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.pipeline-card .deal-name { font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.pipeline-card .deal-company { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.pipeline-card .deal-amount { font-weight: 700; color: var(--primary); font-size: 14px; }
.pipeline-card .deal-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--text-muted);
}
.pipeline-card.dragging { opacity: .5; transform: rotate(2deg); }
.pipeline-column-body.drag-over { background: var(--primary-subtle); border-radius: var(--radius); }
.pipeline-totals {
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-light);
}

/* ── Tabs ── */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 22px;
    gap: 0;
}
.tabs a {
    padding: 10px 18px;
    font-weight: 500;
    font-size: 13.5px;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .15s;
    text-decoration: none;
}
.tabs a:hover { color: var(--text-primary); }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Detail Page ── */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}
.detail-sidebar .info-group { margin-bottom: 18px; }
.detail-sidebar .info-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 3px;
}
.detail-sidebar .info-value { font-size: 13.5px; color: var(--text-primary); }
.detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.detail-header .detail-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 700; font-size: 20px; color: #fff;
}
.detail-header h2 { margin-bottom: 2px; }

/* ── Activity Timeline ── */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 10px; top: 0; bottom: 0;
    width: 2px;
    background: var(--border);
}
.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding-bottom: 0;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -22px; top: 6px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid var(--bg-card);
}
.timeline-item.type-deal::before { background: var(--primary); }
.timeline-item.type-note::before { background: var(--warning); }
.timeline-item.type-task::before { background: var(--success); }
.timeline-item.type-email::before { background: var(--info); }
.timeline-item .tl-time { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.timeline-item .tl-text { font-size: 13px; }
.timeline-item .tl-text strong { font-weight: 600; }

/* ── Notes ── */
.note-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}
.note-item:last-child { border-bottom: none; }
.note-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}
.note-content { font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; }
.note-pinned { border-left: 3px solid var(--warning); padding-left: 12px; }

/* ── Filters Bar ── */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.filters-bar .filter-select {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    font-size: 13px;
    cursor: pointer;
}
.filters-bar .filter-search {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    min-width: 200px;
}

/* ── Flash Messages ── */
.flash {
    padding: 12px 18px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    font-weight: 500;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: flashIn .3s ease;
}
@keyframes flashIn { from { opacity:0; transform:translateY(-8px); } }
.flash-success { background: var(--success-bg); color: var(--success); border: 1px solid #a7f3d0; }
.flash-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #fecaca; }
.flash-info { background: var(--info-bg); color: var(--info); border: 1px solid #a5f3fc; }

/* ── Pagination ── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 0;
}
.pg-btn {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    font-size: 13px;
    font-weight: 500;
    transition: all .15s;
    text-decoration: none;
    color: var(--text-primary);
}
.pg-btn:hover { background: var(--bg-input); border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pg-info { font-size: 13px; color: var(--text-secondary); }

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn .2s ease;
}
.modal-overlay.active { display: flex; }
@keyframes fadeIn { from { opacity:0; } }
.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 560px;
    max-width: 92vw;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp .25s ease;
}
@keyframes slideUp { from { opacity:0; transform:translateY(16px); } }
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h3 { font-size: 17px; font-weight: 600; }
.modal-close {
    width: 32px; height: 32px;
    display: grid; place-items: center;
    border-radius: 8px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 18px;
}
.modal-close:hover { background: var(--bg-input); }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ── Login Page ── */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #1b2537 0%, #0f172a 100%);
}
.login-card {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 48px 44px;
    width: 420px;
    max-width: 92vw;
}
.login-card .login-brand {
    text-align: center;
    margin-bottom: 32px;
}
.login-card .login-brand .brand-icon {
    width: 52px; height: 52px;
    background: var(--primary);
    border-radius: 14px;
    display: inline-grid; place-items: center;
    color: #fff; font-weight: 700; font-size: 22px;
    margin-bottom: 14px;
}
.login-card .login-brand .login-logo {
    max-width: 220px;
    height: auto;
    margin-bottom: 18px;
}
.login-card .login-brand h1 { font-size: 24px; font-weight: 700; }
.login-card .login-brand p { color: var(--text-secondary); font-size: 14px; margin-top: 4px; }
.login-card .form-group { margin-bottom: 20px; }
.login-card .form-control { padding: 11px 14px; font-size: 14px; }
.login-card .btn-primary { width: 100%; justify-content: center; padding: 11px; font-size: 14.5px; }

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; opacity: .4; }
.empty-state h4 { font-size: 16px; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ── Inline tag ── */
.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    gap: 4px;
    color: #fff;
}

/* ── Dashboard Specific ── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.chart-placeholder {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-subtle), var(--bg-input));
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    color: var(--text-muted);
}
.activity-mini { max-height: 380px; overflow-y: auto; }

/* ── Task list ── */
.task-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}
.task-item:last-child { border-bottom: none; }
.task-checkbox {
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
    display: grid; place-items: center;
    transition: all .15s;
}
.task-checkbox:hover { border-color: var(--primary); }
.task-checkbox.completed { background: var(--success); border-color: var(--success); }
.task-checkbox.completed::after { content: '✓'; color: #fff; font-size: 11px; font-weight: 700; }
.task-info { flex: 1; }
.task-title { font-weight: 500; font-size: 13.5px; }
.task-title.done { text-decoration: line-through; color: var(--text-muted); }
.task-details { font-size: 12px; color: var(--text-secondary); margin-top: 2px; display: flex; gap: 12px; }

/* ── Quick Actions ── */
.quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}
.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    min-width: 90px;
}
.quick-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
}
.quick-action-btn .qa-icon { font-size: 22px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .detail-layout { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .form-row { grid-template-columns: 1fr; }
    .pipeline-board { flex-direction: column; }
    .pipeline-column { width: 100%; min-width: unset; }
}

/* ── Utility ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.fw-600 { font-weight: 600; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Notifications ── */
.notification-bell {
    position: relative;
    font-size: 18px;
    padding: 6px 10px;
}
.notification-badge {
    position: absolute;
    top: 2px; right: 2px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 14px;
    animation: notifPulse 2s ease infinite;
}
@keyframes notifPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: var(--primary-subtle); margin: 0 -22px; padding: 14px 22px; border-radius: var(--radius); }
.notif-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 16px;
    flex-shrink: 0;
}
.notif-icon.overdue { background: var(--danger-bg); }
.notif-icon.upcoming { background: var(--warning-bg); }
.notif-icon.general { background: var(--info-bg); }
.notif-content { flex: 1; }
.notif-message { font-size: 13.5px; color: var(--text-primary); line-height: 1.45; }
.notif-message strong { font-weight: 600; }
.notif-time { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.notif-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }

/* ── Meeting Dropdown ── */
.meeting-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    min-width: 220px;
    z-index: 100;
}
.meeting-dropdown.active { display: block; animation: fadeIn .15s ease; }
.meeting-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: background .12s;
}
.meeting-dropdown a:hover { background: var(--bg-input); text-decoration: none; }

/* ── Company Favicon in Avatar ── */
.table-avatar img, .detail-avatar img {
    object-fit: contain;
}

