/* ============================================================
   TAPP CRM — Design System
   Orange-accented, RTL-first, mobile-first
   Inspired by TAPP mobile app aesthetic
   ============================================================ */

/* ── CSS Variables ───────────────────────────────────────── */
:root {
    --orange: #FF6B00;
    --orange-dark: #E55A00;
    --orange-light: #FFF3E8;
    --orange-mid: #FFD4B0;
    --sidebar-bg: #1A1A2E;
    --sidebar-w: 260px;
    --topnav-h: 60px;
    --card-radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow-sm: 0 1px 4px rgba(0,0,0,.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,.10);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
    --bg: #F4F5F7;
    --card-bg: #ffffff;
    --border: #E8E9EC;
    --text: #1A1A2E;
    --text-muted: #6B7280;
    --text-secondary: #374151;
    --font-ar: 'Tajawal', 'Cairo', sans-serif;
    --font-he: 'Frank Ruhl Libre', 'Arial Hebrew', sans-serif;
}

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

html {
    font-size: 15px;
}

body {
    font-family: var(--font-ar);
    background: linear-gradient(135deg, rgb(255, 245, 240) 0%, rgb(255, 228, 214) 100%);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

    body.font-hebrew {
        font-family: var(--font-he);
    }

a {
    color: var(--orange);
    text-decoration: none;
}

    a:hover {
        color: var(--orange-dark);
    }

/* ── Layout ───────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--sidebar-bg);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    flex-direction: column;
}

    .sidebar::-webkit-scrollbar {
        display: none;
    }

.main-wrapper {
    margin-right: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@media (max-width: 991.98px) {
    .main-wrapper {
        margin-right: 0;
    }
}

/* ── Sidebar Brand ───────────────────────────────────────── */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: var(--orange);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 900;
    color: #fff;
    font-size: 18px;
}

.brand-fallback {
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

/* ── Sidebar User ────────────────────────────────────────── */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(255,255,255,.05);
    margin: 12px 12px 0;
    border-radius: var(--radius-sm);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
}

/* ── Sidebar Nav ─────────────────────────────────────────── */
.sidebar-nav {
    padding: 12px 0;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-section-label {
    color: rgba(255,255,255,.3);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 12px 20px 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: rgba(255,255,255,.65);
    transition: all .2s;
    font-size: 14px;
    position: relative;
    cursor: pointer;
    text-decoration: none;
}

    .sidebar-link i {
        font-size: 17px;
        width: 20px;
        text-align: center;
        flex-shrink: 0;
    }

    .sidebar-link:hover {
        color: #fff;
        background: rgba(255,255,255,.06);
    }

    .sidebar-link.active {
        color: var(--orange);
        background: rgba(255,107,0,.12);
        font-weight: 600;
    }

        .sidebar-link.active::before {
            content: '';
            position: absolute;
            right: 0;
            top: 0;
            width: 3px;
            height: 100%;
            background: var(--orange);
            border-radius: 3px 0 0 3px;
        }

.nav-badge {
    margin-right: auto;
    background: var(--orange);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

.nav-badge-warning {
    background: #F59E0B;
}

.nav-badge-info {
    background: #3B82F6;
}

.sidebar-bottom {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.text-danger-light {
    color: rgba(239,68,68,.7) !important;
}

    .text-danger-light:hover {
        color: #EF4444 !important;
    }

.notif-badge-sidebar {
    margin-right: auto;
    background: #EF4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

/* ── Mobile Sidebar ──────────────────────────────────────── */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1998;
    display: none;
}

    .sidebar-overlay.show {
        display: block;
    }

.sidebar-mobile {
    position: fixed;
    top: 0;
    right: -290px;
    width: 280px;
    height: 100vh;
    background: var(--sidebar-bg);
    z-index: 1999;
    transition: right .3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

    .sidebar-mobile.show {
        right: 0;
    }

.btn-close-sidebar {
    background: none;
    border: none;
    color: rgba(255,255,255,.6);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

/* ── Top Nav ─────────────────────────────────────────────── */
.topnav {
    height: var(--topnav-h);
    background: var(--card-bg);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: solid 3px;
    border-image: linear-gradient(135deg, #ff6618 0%, #ff8f4a 100%) 1;
}

.btn-hamburger {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.topnav-actions {
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-topnav {
    background: none;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .2s;
    position: relative;
}

    .btn-topnav:hover {
        background: var(--bg);
        color: var(--orange);
    }

.notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--orange);
    color: #fff;
    font-size: 9px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.btn-avatar {
    width: 36px;
    height: 36px;
    background: var(--orange);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

    .btn-avatar::after {
        display: none !important;
    }

/* ── Notifications Dropdown ──────────────────────────────── */
.notif-dropdown {
    width: 320px;
}

.notif-header, .notif-footer {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-header {
    border-bottom: 1px solid var(--border);
}

.notif-footer {
    border-top: 1px solid var(--border);
    text-align: center;
    justify-content: center;
}

.notif-list {
    max-height: 320px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .15s;
}

    .notif-item:hover {
        background: var(--orange-light);
    }

    .notif-item.unread {
        background: #FFFBF5;
    }

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--orange);
    flex-shrink: 0;
    margin-top: 4px;
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
    font-size: 13px;
}

.breadcrumb-item a {
    color: var(--text-muted);
}

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

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

/* ── Page Content ────────────────────────────────────────── */
.page-content {
    flex: 1;
    padding: 20px;
    padding-bottom: calc(72px + 20px);
}

@media (min-width: 992px) {
    .page-content {
        padding-bottom: 24px;
    }
}

/* ── Page Header ─────────────────────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
}

.page-subtitle {
    font-size: 13px;
    margin: 2px 0 0;
}

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

/* ── Card Panel ──────────────────────────────────────────── */
.card-panel {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

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

.panel-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
}

.btn-panel-link {
    color: var(--orange);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.panel-body {
    padding: 16px 18px;
}

/* ── Stat Cards ──────────────────────────────────────────── */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all .2s;
    position: relative;
    overflow: hidden;
    color: inherit;
}

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        color: inherit;
    }

.stat-icon {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-orange {
    border-top: 3px solid var(--orange);
}

    .stat-orange .stat-icon, .stat-orange .stat-value {
        color: var(--orange);
    }

.stat-red {
    border-top: 3px solid #EF4444;
}

    .stat-red .stat-icon, .stat-red .stat-value {
        color: #EF4444;
    }

.stat-blue {
    border-top: 3px solid #3B82F6;
}

    .stat-blue .stat-icon, .stat-blue .stat-value {
        color: #3B82F6;
    }

.stat-yellow {
    border-top: 3px solid #F59E0B;
}

    .stat-yellow .stat-icon, .stat-yellow .stat-value {
        color: #F59E0B;
    }

.stat-green {
    border-top: 3px solid #10B981;
}

    .stat-green .stat-icon, .stat-green .stat-value {
        color: #10B981;
    }

.stat-purple {
    border-top: 3px solid #8B5CF6;
}

    .stat-purple .stat-icon, .stat-purple .stat-value {
        color: #8B5CF6;
    }

/* ── Task Row (Dashboard) ────────────────────────────────── */
.task-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
    cursor: pointer;
}

    .task-row:last-child {
        border-bottom: none;
    }

    .task-row:hover {
        background: var(--orange-light);
    }

.task-priority-bar {
    width: 3px;
    height: 36px;
    border-radius: 3px;
    flex-shrink: 0;
}

.task-info {
    min-width: 0;
}

.task-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: block;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .task-title:hover {
        color: var(--orange);
    }

.task-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 3px;
}

.meta-tag {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.task-actions-right {
    flex-shrink: 0;
}

/* ── Priority ────────────────────────────────────────────── */
.priority-low {
    background: #10B981;
}

.priority-medium {
    background: #F59E0B;
}

.priority-high {
    background: #EF4444;
}

.priority-critical {
    background: #7C3AED;
}

.priority-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.priority-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}

    .priority-badge.priority-low {
        background: #D1FAE5;
        color: #065F46;
    }

    .priority-badge.priority-medium {
        background: #FEF3C7;
        color: #92400E;
    }

    .priority-badge.priority-high {
        background: #FEE2E2;
        color: #991B1B;
    }

    .priority-badge.priority-critical {
        background: #EDE9FE;
        color: #5B21B6;
    }

/* ── Status Badges ───────────────────────────────────────── */
.badge-status {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    gap: 3px;
}

.badge-status-new {
    background: #EFF6FF;
    color: #1D4ED8;
}

.badge-status-progress {
    background: #FFF7ED;
    color: #C2410C;
}

.badge-status-waiting {
    background: #FEF9C3;
    color: #854D0E;
}

.badge-status-review {
    background: #FAF5FF;
    color: #6D28D9;
}

.badge-status-done {
    background: #DCFCE7;
    color: #15803D;
}

.badge-status-rejected {
    background: #FEF2F2;
    color: #DC2626;
}

.badge-status-cancelled {
    background: #F3F4F6;
    color: #6B7280;
}

.badge-status-draft {
    background: #F8FAFC;
    color: #64748B;
    border: 1px solid var(--border);
}

.badge-status-published {
    background: #ECFDF5;
    color: #059669;
}

.badge-status-default {
    background: #F3F4F6;
    color: var(--text-muted);
}

/* ── Table ───────────────────────────────────────────────── */
.table-crm {
    width: 100%;
    border-collapse: collapse;
}

    .table-crm thead tr {
        background: var(--bg);
        border-bottom: 2px solid var(--border);
    }

    .table-crm th {
        padding: 10px 14px;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .5px;
        color: var(--text-muted);
        white-space: nowrap;
    }

    .table-crm td {
        padding: 12px 14px;
        border-bottom: 1px solid var(--border);
        vertical-align: middle;
        font-size: 13px;
    }

    .table-crm tbody tr {
        cursor: pointer;
        transition: background .1s;
    }

        .table-crm tbody tr:hover {
            background: var(--orange-light);
        }

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

.row-overdue {
    background: #FEF2F2 !important;
}

.btn-row-action {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
}

    .btn-row-action:hover {
        background: var(--bg);
        color: var(--text);
    }

/* ── Filter Tabs ─────────────────────────────────────────── */
.filter-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }

.filter-tab {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--card-bg);
    border: 1px solid var(--border);
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
}

    .filter-tab:hover {
        border-color: var(--orange);
        color: var(--orange);
    }

    .filter-tab.active {
        background: var(--orange);
        color: #fff;
        border-color: var(--orange);
    }

.filter-tab-danger.active {
    background: #EF4444;
    border-color: #EF4444;
}

/* ── Search Box ──────────────────────────────────────────── */
.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 12px;
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.search-input {
    padding-right: 36px !important;
    border-radius: var(--radius-sm) !important;
    border: 1px solid var(--border);
    font-size: 13px;
}

/* ── View Toggle ─────────────────────────────────────────── */
.view-toggle {
    display: flex;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 3px;
    gap: 2px;
}

.btn-view-toggle {
    padding: 6px 10px;
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    transition: all .15s;
}

    .btn-view-toggle:hover {
        color: var(--text);
    }

    .btn-view-toggle.active {
        background: var(--card-bg);
        color: var(--orange);
        box-shadow: var(--shadow-sm);
    }

/* ── Kanban ──────────────────────────────────────────────── */
.kanban-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    align-items: flex-start;
    min-height: 500px;
}

    .kanban-board::-webkit-scrollbar {
        height: 6px;
    }

    .kanban-board::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 3px;
    }

.kanban-column {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
}

.kanban-header {
    padding: 10px 14px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-bottom: none;
}

.kanban-count {
    font-size: 11px;
    font-weight: 700;
    background: rgba(0,0,0,.07);
    padding: 1px 8px;
    border-radius: 20px;
}

.kanban-new {
    border-top: 3px solid #3B82F6;
}

.kanban-progress {
    border-top: 3px solid var(--orange);
}

.kanban-waiting {
    border-top: 3px solid #F59E0B;
}

.kanban-review {
    border-top: 3px solid #8B5CF6;
}

.kanban-done {
    border-top: 3px solid #10B981;
}

.kanban-cards {
    flex: 1;
    background: #EAECF0;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 200px;
}

.kanban-card {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all .2s;
    display: flex;
}

    .kanban-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-1px);
    }

.kanban-card-priority {
    width: 4px;
    flex-shrink: 0;
}

.kanban-card-body {
    padding: 10px;
    flex: 1;
    overflow: hidden;
}

.kanban-card-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 6px;
}

.kanban-card-project {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.kanban-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-due {
    font-size: 10px;
    color: var(--text-muted);
}

.kanban-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
    padding: 24px 0;
}

/* ── Meeting Items ───────────────────────────────────────── */
.meeting-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

    .meeting-item:last-child {
        border-bottom: none;
    }

.meeting-date-badge {
    width: 44px;
    height: 44px;
    background: var(--orange-light);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.meeting-day {
    font-size: 16px;
    font-weight: 800;
    color: var(--orange);
    line-height: 1;
}

.meeting-month {
    font-size: 9px;
    color: var(--orange);
    font-weight: 600;
    text-transform: uppercase;
}

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

.progress-bar-fill {
    height: 100%;
    background: var(--orange);
    border-radius: 3px;
    transition: width .6s ease;
}

/* ── Activity Feed ───────────────────────────────────────── */
.activity-item {
    display: flex;
    gap: 10px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border);
}

    .activity-item:last-child {
        border-bottom: none;
    }

.activity-dot {
    width: 8px;
    height: 8px;
    background: var(--orange);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    line-height: 1.4;
}

.activity-time {
    margin-top: 2px;
}

/* ── Project Dot ─────────────────────────────────────────── */
.project-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Timeline ────────────────────────────────────────────── */
.timeline {
    display: flex;
    flex-direction: column;
}

.timeline-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

    .timeline-item:last-child {
        border-bottom: none;
    }

.timeline-internal {
    background: #FFFBEB;
    margin: 0 -18px;
    padding: 12px 18px;
    border-bottom: 1px solid #FDE68A;
}

.timeline-history {
    opacity: .75;
}

.timeline-avatar {
    width: 32px;
    height: 32px;
    background: var(--orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.timeline-icon {
    width: 32px;
    height: 32px;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
    overflow: hidden;
}

.timeline-header {
    display: flex;
    gap: 8px;
    align-items: baseline;
    font-size: 12px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.timeline-text {
    font-size: 13px;
    line-height: 1.5;
}

/* ── Avatar sizes ────────────────────────────────────────── */
.avatar-xs {
    width: 24px;
    height: 24px;
    background: var(--orange-mid);
    color: var(--orange-dark);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    background: var(--orange);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.avatar-badge {
    width: 30px;
    height: 30px;
    background: var(--orange-mid);
    color: var(--orange-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid white;
    cursor: default;
    margin-inline-end: -6px;
}

/* ── Meta List ───────────────────────────────────────────── */
.meta-list {
    display: flex;
    flex-direction: column;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}

    .meta-item:last-child {
        border-bottom: none;
    }

.meta-label {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.meta-value {
    font-size: 13px;
    font-weight: 500;
}

/* ── Sub-task Item ───────────────────────────────────────── */
.subtask-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    transition: background .15s;
}

    .subtask-item:last-child {
        border-bottom: none;
    }

    .subtask-item:hover {
        background: var(--orange-light);
    }

/* ── Attachments ─────────────────────────────────────────── */
.attachments-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    color: var(--text);
    border: 1px solid var(--border);
    transition: all .15s;
    text-decoration: none;
}

    .attachment-item:hover {
        background: var(--orange-light);
        border-color: var(--orange);
        color: var(--text);
    }

.attachment-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.attachment-name {
    font-size: 13px;
    font-weight: 500;
}

.attachment-size {
    font-size: 11px;
}

.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
}

    .upload-area:hover {
        border-color: var(--orange);
        background: var(--orange-light);
    }

/* ── Task Description ────────────────────────────────────── */
.task-description {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ── Procedure Cards ─────────────────────────────────────── */
.card-procedure {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all .2s;
    overflow: hidden;
    color: inherit;
}

    .card-procedure:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
        border-color: var(--orange);
        color: inherit;
    }

.proc-header {
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.proc-icon {
    width: 40px;
    height: 40px;
    background: var(--orange-light);
    color: var(--orange);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.proc-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
}

.proc-footer {
    padding: 10px 16px;
    background: var(--bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
}

/* ── Ideas ───────────────────────────────────────────────── */
.card-idea {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    transition: all .2s;
    height: 100%;
}

    .card-idea:hover {
        box-shadow: var(--shadow-md);
        border-color: #FCD34D;
    }

.idea-bulb {
    width: 36px;
    height: 36px;
    background: #FEF9C3;
    color: #CA8A04;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.idea-title {
    font-size: 15px;
    line-height: 1.3;
}

.idea-desc {
    line-height: 1.5;
}

.idea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

/* ── Goals ───────────────────────────────────────────────── */
.card-goal {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all .2s;
}

    .card-goal:hover {
        box-shadow: var(--shadow-md);
    }

.milestones-mini {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.milestone-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

    .milestone-item.completed {
        color: var(--text-muted);
        text-decoration: line-through;
    }

.goal-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── Meeting Cards ───────────────────────────────────────── */
.card-meeting {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    transition: all .2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

    .card-meeting:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
        color: inherit;
    }

.meeting-card-date {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.meeting-big-date {
    width: 52px;
    height: 52px;
    background: var(--orange);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.meeting-big-day {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.meeting-big-month {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* ── Users ───────────────────────────────────────────────── */
.user-card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all .2s;
}

    .user-card:hover {
        box-shadow: var(--shadow-md);
        border-color: var(--orange);
    }

.user-card-avatar {
    width: 64px;
    height: 64px;
    background: var(--orange);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    margin: 0 auto 12px;
}

.user-card-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.user-card-role {
    font-size: 12px;
    color: var(--text-muted);
}

.user-card-dept {
    font-size: 12px;
    color: var(--orange);
    margin-top: 4px;
}

.user-card-actions {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* ── Department Cards ────────────────────────────────────── */
.dept-card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    transition: all .2s;
    border-right: 4px solid var(--orange);
}

    .dept-card:hover {
        box-shadow: var(--shadow-md);
    }

.dept-icon {
    width: 44px;
    height: 44px;
    background: var(--orange-light);
    color: var(--orange);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}

/* ── Project Cards ───────────────────────────────────────── */
.card-project {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all .2s;
}

    .card-project:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

.project-banner {
    height: 6px;
}

.project-body {
    padding: 18px;
}

.project-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

/* ── Dev Board ───────────────────────────────────────────── */
.dev-board {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 12px;
    align-items: flex-start;
}

    .dev-board::-webkit-scrollbar {
        height: 6px;
    }

    .dev-board::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 3px;
    }

.dev-column {
    flex: 0 0 200px;
}

.dev-column-header {
    padding: 10px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.dev-cards {
    background: #EAECF0;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 180px;
}

.dev-card {
    background: var(--card-bg);
    border-radius: var(--radius-xs);
    padding: 10px 12px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all .2s;
}

    .dev-card:hover {
        box-shadow: var(--shadow-md);
        border-color: var(--orange);
    }

/* ── Bottom Nav (Mobile) ─────────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    z-index: 900;
    box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 4px;
    transition: color .15s;
}

    .bottom-nav-item i {
        font-size: 20px;
    }

    .bottom-nav-item.active {
        color: var(--orange);
    }

    .bottom-nav-item:hover {
        color: var(--orange);
    }

.bottom-nav-center {
    position: relative;
}

.center-btn {
    width: 50px;
    height: 50px;
    background: var(--orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    box-shadow: 0 4px 16px rgba(255,107,0,.4);
    margin-top: -20px;
}

/* ── FAB ─────────────────────────────────────────────────── */
.fab-idea {
    position: fixed;
    bottom: 80px;
    left: 20px;
    width: 52px;
    height: 52px;
    background: #F59E0B;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(245,158,11,.5);
    cursor: pointer;
    z-index: 800;
    transition: all .2s;
}

    .fab-idea:hover {
        transform: scale(1.1);
    }

@media (min-width: 992px) {
    .fab-idea {
        bottom: 30px;
        left: 30px;
    }
}

/* ── Quick Add Modal ─────────────────────────────────────── */
.quick-add-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.quick-add-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all .2s;
    text-align: center;
}

    .quick-add-card:hover {
        border-color: var(--orange);
        background: var(--orange-light);
        color: var(--text);
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }

.quick-add-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.bg-orange-light {
    background: var(--orange-light);
}

.bg-yellow-light {
    background: #FEF9C3;
}

.bg-blue-light {
    background: #EFF6FF;
}

.bg-green-light {
    background: #F0FDF4;
}

.bg-purple-light {
    background: #F5F3FF;
}

.bg-teal-light {
    background: #F0FDFA;
}

.text-orange {
    color: var(--orange) !important;
}

.text-purple {
    color: #8B5CF6 !important;
}

.text-teal {
    color: #0D9488 !important;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-orange {
    background: var(--orange);
    color: #fff;
    border: none;
}

    .btn-orange:hover {
        background: var(--orange-dark);
        color: #fff;
    }

.btn-outline-orange {
    color: var(--orange);
    border-color: var(--orange);
}

    .btn-outline-orange:hover {
        background: var(--orange);
        color: #fff;
    }

.btn-xs {
    padding: 3px 10px;
    font-size: 11px;
    line-height: 1.6;
}

/* ── Login Page ──────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
}

.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.login-left {
    flex: 1;
    background: var(--sidebar-bg);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-decoration {
    position: relative;
    z-index: 2;
    padding: 40px;
}

.login-circles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,107,0,.15);
}

.c1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
}

.c2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    left: -80px;
    background: rgba(255,107,0,.1);
}

.c3 {
    width: 200px;
    height: 200px;
    top: 40%;
    right: 30%;
    background: rgba(255,107,0,.08);
}

.login-brand-area {
    position: relative;
    z-index: 2;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: var(--orange);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo-img {
    max-height: 40px;
    border-radius: 10px;
}

.logo-letter {
    font-size: 40px;
    font-weight: 900;
    color: #fff;
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.8);
    font-size: 14px;
}

.login-right {
    width: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: linear-gradient(135deg, rgb(255, 245, 240) 0%, rgb(255, 228, 214) 100%);
    overflow-y: auto;
}

@media (max-width: 991.98px) {
    .login-left {
        display: none !important;
    }

    .login-right {
        width: 100%;
        padding: 30px 20px 50px;
        align-items: flex-start;
        min-height: 100vh;
    }

    .login-form-wrapper {
        padding-top: 20px;
    }
}

@media (max-height: 700px) {
    .login-right {
        align-items: flex-start;
        padding-top: 24px;
    }
}

.login-form-wrapper {
    width: 100%;
    max-width: 360px;
    transform:translateY(-2px);
}

.input-group-custom {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 14px;
    color: var(--text-muted);
    font-size: 15px;
    pointer-events: none;
    z-index: 2;
}

.form-input-custom {
    padding-right: 42px !important;
    padding-left: 42px;
    height: 48px;
    border-radius: var(--radius-sm) !important;
    font-size: 14px;
    border: 1.5px solid var(--border);
    transition: border-color .2s;
}

    .form-input-custom:focus {
        border-color: var(--orange);
        box-shadow: 0 0 0 3px rgba(255,107,0,.12);
    }

.btn-show-pass {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
}

/* ── Forms ───────────────────────────────────────────────── */
.form-control:focus,
.form-select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255,107,0,.12);
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--orange-light);
    margin-bottom: 16px;
}

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

    .empty-state i {
        display: block;
        margin-bottom: 16px;
        opacity: .35;
    }

    .empty-state h5 {
        color: var(--text-secondary);
        margin-bottom: 8px;
    }

    .empty-state p {
        font-size: 13px;
    }

/* ── Approval Flow ───────────────────────────────────────── */
.approval-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    position: relative;
}

    .approval-step:last-child {
        border-bottom: none;
    }

.approval-step-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.step-pending {
    background: var(--bg);
    color: var(--text-muted);
    border: 2px dashed var(--border);
}

.step-approved {
    background: #DCFCE7;
    color: #15803D;
}

.step-rejected {
    background: #FEF2F2;
    color: #DC2626;
}

.step-active {
    background: var(--orange-light);
    color: var(--orange);
    border: 2px solid var(--orange);
}

/* ── Color Helpers ───────────────────────────────────────── */
.bg-orange {
    background: var(--orange) !important;
}

.bg-orange-light {
    background: var(--orange-light) !important;
}

.text-orange {
    color: var(--orange) !important;
}

.border-orange {
    border-color: var(--orange) !important;
}

.hover-orange:hover {
    color: var(--orange) !important;
}

/* ── Responsive Adjustments ──────────────────────────────── */
@media (max-width: 575.98px) {
    .page-title {
        font-size: 1.2rem;
    }

    .stat-value {
        font-size: 1.6rem;
    }

    .quick-add-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kanban-board {
        gap: 10px;
    }

    .kanban-column {
        flex: 0 0 200px;
    }
}

/* ── Utilities ───────────────────────────────────────────── */
.fw-black {
    font-weight: 900 !important;
}

.rounded-4 {
    border-radius: 16px !important;
}

.gap-xs {
    gap: 6px;
}

.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


