/* ============================================================
   TAPP CRM — Visual Enhancement Layer
   File: wwwroot/css/tapp-crm-enhanced.css
   Add AFTER tapp-crm.css in _Layout.cshtml
   ============================================================ */

/* ── Richer Background ───────────────────────────────────── */
:root {
    --bg: #EFF1F5;
    --card-bg: #FFFFFF;
    --shadow-sm: 0 2px 8px rgba(0,0,0,.07);
    --shadow-md: 0 6px 20px rgba(0,0,0,.10);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.14);
}

body {
    background: linear-gradient(135deg, rgb(255, 245, 240) 0%, rgb(255, 228, 214) 100%);
}
/* body::before removed - caused z-index stacking issues */
.main-wrapper {
    position: relative;
}

/* ── Richer Sidebar ──────────────────────────────────────── */
.sidebar {
    background: linear-gradient(175deg, #141428 0%, #1A1A2E 40%, #1C1830 100%);
    border-left: 1px solid rgba(255,255,255,.05);
}

    .sidebar::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 200px;
        background: radial-gradient(ellipse at 50% -30%, rgba(255,107,0,.15) 0%, transparent 70%);
        pointer-events: none;
    }

.brand-icon {
    background: linear-gradient(135deg, var(--orange) 0%, #FF9A3C 100%);
    box-shadow: 0 4px 12px rgba(255,107,0,.4);
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(255,107,0,.18) 0%, rgba(255,107,0,.06) 100%);
}

.sidebar-user {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.08);
}

/* ── Richer Topnav ───────────────────────────────────────── */
.topnav {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 12px rgba(0,0,0,.06);
    border-bottom: solid 3px;
    border-image: linear-gradient(135deg, #ff6618 0%, #ff8f4a 100%) 1;
}

/* ── Richer Cards ────────────────────────────────────────── */
.card-panel {
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(232,233,236,.7);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s;
}

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

.panel-header {
    background: linear-gradient(90deg, rgba(255,107,0,.03) 0%, transparent 60%);
    border-bottom: 1px solid rgba(232,233,236,.8);
}

/* ── Stat Cards — Gradient accents ───────────────────────── */
.stat-card {
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(232,233,236,.6);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

    .stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
    }

.stat-orange::before {
    background: linear-gradient(90deg, var(--orange), #FF9A3C);
}

.stat-red::before {
    background: linear-gradient(90deg, #EF4444, #F87171);
}

.stat-blue::before {
    background: linear-gradient(90deg, #3B82F6, #60A5FA);
}

.stat-yellow::before {
    background: linear-gradient(90deg, #F59E0B, #FCD34D);
}

.stat-green::before {
    background: linear-gradient(90deg, #10B981, #34D399);
}

.stat-purple::before {
    background: linear-gradient(90deg, #8B5CF6, #A78BFA);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 10px;
}

.stat-orange .stat-icon {
    background: rgba(255,107,0,.12);
}

.stat-red .stat-icon {
    background: rgba(239,68,68,.12);
}

.stat-blue .stat-icon {
    background: rgba(59,130,246,.12);
}

.stat-yellow .stat-icon {
    background: rgba(245,158,11,.12);
}

.stat-green .stat-icon {
    background: rgba(16,185,129,.12);
}

.stat-purple .stat-icon {
    background: rgba(139,92,246,.12);
}

/* ── Richer Buttons ──────────────────────────────────────── */
.btn-orange {
    background: linear-gradient(135deg, var(--orange) 0%, #FF8C2A 100%);
    color: #fff;
    border: none;
    box-shadow: 0 3px 10px rgba(255,107,0,.30);
    font-weight: 600;
    letter-spacing: .2px;
    transition: all .2s;
}

    .btn-orange:hover {
        background: linear-gradient(135deg, var(--orange-dark) 0%, var(--orange) 100%);
        color: #fff;
        box-shadow: 0 5px 16px rgba(255,107,0,.40);
        transform: translateY(-1px);
    }

    .btn-orange:active {
        transform: none;
    }

/* ── Richer Form Controls ────────────────────────────────── */
.form-control, .form-select {
    border: 1.5px solid #E0E3E9;
    background: #FAFBFC;
    transition: all .2s;
}

    .form-control:focus, .form-select:focus {
        background: #fff;
        border-color: var(--orange);
        box-shadow: 0 0 0 3px rgba(255,107,0,.10);
    }

.form-label {
    color: #374151;
    font-weight: 600;
}

/* ── Richer Page Header ───────────────────────────────────── */
.page-header {
    padding-bottom: 20px;
    position: relative;
}

.page-title {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -.3px;
}

/* ── Task Row Enhancement ────────────────────────────────── */
.task-row {
    border-radius: 8px;
    margin: 2px 8px;
    padding: 11px 14px;
    border-bottom: 1px solid rgba(232,233,236,.5);
    transition: all .15s;
}

    .task-row:hover {
        background: rgba(255,107,0,.05);
        border-radius: 8px;
        transform: translateX(-2px);
    }

/* ── Kanban Column Enhancement ───────────────────────────── */
.kanban-column {
    background: rgba(244,245,247,.8);
    border: 1px solid rgba(232,233,236,.7);
    backdrop-filter: blur(4px);
}

.kanban-header {
    border-bottom: 2px solid rgba(232,233,236,.8);
}

/* ── Badge Enhancement ───────────────────────────────────── */
.badge-status {
    font-weight: 600;
    letter-spacing: .2px;
    border-radius: 8px;
}

.priority-badge {
    font-weight: 700;
    border-radius: 8px;
}

/* ── User Avatar Enhancement ─────────────────────────────── */
.user-card-avatar {
    background: linear-gradient(135deg, var(--orange) 0%, #FF9A3C 100%);
    box-shadow: 0 3px 12px rgba(255,107,0,.30);
}

.user-avatar {
    background: linear-gradient(135deg, var(--orange) 0%, #FF9A3C 100%);
}

.btn-avatar {
    background: linear-gradient(135deg, var(--orange) 0%, #FF9A3C 100%);
    box-shadow: 0 2px 8px rgba(255,107,0,.30);
}

/* ── Goal Progress Bar ───────────────────────────────────── */
.progress-bar {
    background: linear-gradient(90deg, var(--orange) 0%, #FF9A3C 100%);
    border-radius: 8px;
}

.progress {
    border-radius: 8px;
    background: rgba(255,107,0,.12);
}

/* ── Meeting Date Badge ──────────────────────────────────── */
.meeting-date-badge {
    background: linear-gradient(135deg, var(--orange-light) 0%, rgba(255,200,140,.3) 100%);
    border: 1px solid rgba(255,107,0,.20);
}

/* ── Empty State ─────────────────────────────────────────── */
.empty-state .empty-icon {
    font-size: 52px;
    color: rgba(255,107,0,.25);
}

.empty-state .empty-text {
    font-size: 15px;
    color: var(--text-secondary);
}

/* ── TempData Alerts ─────────────────────────────────────── */
.alert-success {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border-color: #A7F3D0;
    color: #065F46;
}

.alert-danger {
    background: linear-gradient(135deg, #FFF1F2 0%, #FFE4E6 100%);
    border-color: #FECACA;
    color: #9F1239;
}

/* ── Mobile Bottom Nav ───────────────────────────────────── */
.bottom-nav {
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(232,233,236,.8);
    box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}

/* ── Sidebar mobile ──────────────────────────────────────── */
.sidebar-mobile {
    background: linear-gradient(175deg, #141428 0%, #1A1A2E 100%);
}

/* ── Login Page Enhancement ──────────────────────────────── */
.login-left {
    background: linear-gradient(145deg, #141428 0%, #1A1A2E 50%, #1C1A30 100%);
}

.login-right {
    background: linear-gradient(135deg, rgb(255, 245, 240) 0%, rgb(255, 228, 214) 100%);
}

.login-logo {
    background: linear-gradient(135deg, var(--orange) 0%, #FF9A3C 100%);
    box-shadow: 0 8px 24px rgba(255,107,0,.40);
}

/* ── Smooth page entrance ────────────────────────────────── */
.page-content {
    animation: pageIn .25s ease;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ── Form section title ──────────────────────────────────── */
.form-section-title {
    background: linear-gradient(90deg, rgba(255,107,0,.06) 0%, transparent 80%);
    border-radius: 6px;
    padding: 6px 10px 8px;
    border-bottom: none;
    border-right: 3px solid var(--orange);
}

/* ── Active Sidebar Glow ─────────────────────────────────── */
.sidebar-link.active::before {
    box-shadow: 0 0 8px rgba(255,107,0,.6);
}

/* ── Table Enhancement ───────────────────────────────────── */
.table thead th {
    background: linear-gradient(90deg, #F8F9FA 0%, #F1F3F5 100%);
    border-bottom: 2px solid var(--border);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .3px;
    color: var(--text-secondary);
}

.table tbody tr:hover {
    background: rgba(255,107,0,.03);
}

/* ── Hebrew Language Support ─────────────────────────────── */
body.font-hebrew {
    font-family: 'Frank Ruhl Libre', 'Arial Hebrew', 'David', serif;
    font-size: 15.5px;
    letter-spacing: 0;
}

    body.font-hebrew .sidebar-link span,
    body.font-hebrew .page-title,
    body.font-hebrew .panel-title,
    body.font-hebrew .fw-bold,
    body.font-hebrew .btn {
        font-family: 'Frank Ruhl Libre', 'Arial Hebrew', serif;
        letter-spacing: 0;
    }

    body.font-hebrew .form-label {
        font-size: 13.5px;
    }

    body.font-hebrew .nav-section-label {
        letter-spacing: .5px;
    }

    /* Hebrew sidebar text stays white and readable */
    body.font-hebrew .sidebar-link {
        font-size: 14px;
    }

    body.font-hebrew .brand-fallback span {
        font-family: var(--font-ar);
    }



.icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1.5px solid #eee;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ccc;
    font-size: 13px;
    transition: all .15s;
    padding: 0;
}




.branch-card:hover {
    border-color: #FF6B00 !important;
    background: #fff8f5 !important;
    box-shadow: 0 2px 8px rgba(255,107,0,.12);
}

.icon-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #aaa;
    font-size: 13px;
    transition: all .15s;
    padding: 0;
}

    .icon-btn:hover {
        border-color: #FF6B00;
        color: #FF6B00;
        background: #fff8f5;
    }

    .icon-btn.active-main {
        color: #FF6B00;
        border-color: #FF6B0040;
    }

    .icon-btn.active-toggle {
        color: #28a745;
        border-color: #28a74540;
    }

    .icon-btn.danger:hover {
        color: #dc3545;
        border-color: #dc354540;
        background: #fff5f5;
    }

    .icon-btn:disabled {
        opacity: .4;
        cursor: default;
    }

    #searchResults > div:hover {
        background: #fff8f5;
    }

    .store-row:last-child {
        border-bottom: none !important;
    }

    .icon-btn:hover {
        border-color: #FF6B00;
        color: #FF6B00;
        background: #fff8f5;
    }

    .icon-btn.active-main {
        color: #FF6B00;
        border-color: #FF6B0060;
        background: #fff5ee;
    }

    .icon-btn.active-toggle {
        color: #22c55e;
        border-color: #22c55e60;
        background: #f0fdf4;
    }

    .icon-btn.danger:hover {
        color: #ef4444;
        border-color: #ef444460;
        background: #fff5f5;
    }

    .icon-btn:disabled {
        opacity: .35;
        cursor: default;
        pointer-events: none;
    }
