/* AccuFlow - Main Stylesheet */

:root {
    --sidebar-width: 260px;
    --primary-color: #4f46e5;
    --sidebar-bg: #1e1b4b;
    --sidebar-hover: #312e81;
}

* { box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f1f5f9;
    margin: 0;
}

/* Layout */
.wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #e2e8f0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s;
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
}

.sidebar-nav {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.5rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-nav .nav-section {
    padding: 1rem 1.5rem 0.35rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 600;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-area { flex: 1; }

/* Navbar */
.navbar { min-height: 60px; }

/* User avatar & menu (login theme) */
.user-avatar {
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}
.user-avatar-sm { width: 38px; height: 38px; font-size: 0.85rem; }
.user-avatar-md { width: 44px; height: 44px; font-size: 0.95rem; }
.user-avatar-lg { width: 52px; height: 52px; font-size: 1.05rem; }

.user-menu-dropdown .user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.85rem 0.35rem 0.35rem;
    color: #1e293b;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.user-menu-dropdown .user-menu-trigger:hover,
.user-menu-dropdown .user-menu-trigger.show {
    border-color: #c7d2fe;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.user-menu-name { font-size: 0.875rem; font-weight: 600; line-height: 1.2; color: #0f172a; }
.user-menu-role { font-size: 0.72rem; color: #64748b; line-height: 1.2; }

.user-dropdown-menu {
    min-width: 280px;
    padding: 0.5rem;
    border-radius: 14px;
    margin-top: 0.5rem !important;
}
.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem;
    background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
    border-radius: 10px;
    margin-bottom: 0.25rem;
}
.user-dropdown-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.user-dropdown-info strong {
    font-size: 0.95rem;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-dropdown-info > span:not(.badge) {
    font-size: 0.78rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-role-badge {
    align-self: flex-start;
    margin-top: 0.25rem;
    background: linear-gradient(135deg, #4f46e5, #6366f1) !important;
    font-weight: 500;
    font-size: 0.68rem;
    padding: 0.3em 0.65em;
}
.user-dropdown-menu .dropdown-item {
    border-radius: 8px;
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem;
}
.user-dropdown-menu .dropdown-item i { margin-right: 0.5rem; opacity: 0.75; }

/* Profile page hero */
.profile-hero-card {
    background: linear-gradient(145deg, #1e1b4b 0%, #312e81 40%, #4f46e5 100%);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}
.profile-hero-card::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}
.profile-hero-card .user-avatar-lg {
    width: 72px; height: 72px;
    font-size: 1.5rem;
    background: rgba(255,255,255,0.2);
    box-shadow: none;
    border: 2px solid rgba(255,255,255,0.35);
    position: relative;
    z-index: 1;
}
.profile-hero-info { position: relative; z-index: 1; flex: 1; min-width: 0; }
.profile-hero-info h2 { font-size: 1.5rem; font-weight: 700; margin: 0 0 0.25rem; }
.profile-hero-info p { margin: 0; opacity: 0.85; font-size: 0.9rem; }
.profile-hero-badge {
    display: inline-block;
    margin-top: 0.5rem;
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}
.profile-hero-logo {
    position: relative;
    z-index: 1;
    max-height: 48px;
    max-width: 140px;
    object-fit: contain;
    background: #fff;
    padding: 6px 12px;
    border-radius: 10px;
}

.notification-dropdown { width: 320px; max-height: 400px; overflow-y: auto; }

/* Auth Pages — Split Layout */
.auth-body {
    margin: 0;
    min-height: 100vh;
    background: #f8fafc;
}

.auth-page {
    display: flex;
    min-height: 100vh;
}

.auth-brand-panel {
    flex: 1;
    background: linear-gradient(145deg, #1e1b4b 0%, #312e81 40%, #4f46e5 100%);
    color: #fff;
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-brand-panel::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 400px; height: 400px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.auth-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 300px; height: 300px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.auth-brand-content { position: relative; z-index: 1; max-width: 420px; }

.auth-brand-logo-link { display: inline-block; margin-bottom: 1.25rem; text-decoration: none; }
.auth-brand-logo { max-height: 56px; max-width: 180px; object-fit: contain; background: #fff; padding: 8px 14px; border-radius: 12px; }
.auth-brand-icon {
    width: 56px; height: 56px;
    background: rgba(255,255,255,0.15);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
}

.auth-brand-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.auth-brand-tagline {
    color: rgba(255,255,255,0.75);
    font-size: 1rem;
    line-height: 1.65;
    margin-bottom: 2rem;
}

.auth-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.auth-feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: rgba(255,255,255,0.9);
    font-size: 0.92rem;
}

.auth-feature-list i {
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.12);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.auth-brand-stats {
    display: flex;
    gap: 2rem;
}

.auth-brand-stats div strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
}

.auth-brand-stats div span {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-brand-footer {
    position: relative;
    z-index: 1;
}

.auth-brand-footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.auth-brand-footer a:hover { color: #fff; }

.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #fff;
}

.auth-form-inner {
    width: 100%;
    max-width: 420px;
}

.auth-form-header { margin-bottom: 1.75rem; }
.auth-form-erp-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4f46e5;
    background: #eef2ff;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}
.auth-form-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.35rem;
}
.auth-form-header p { color: #64748b; margin: 0; font-size: 0.95rem; }

.auth-input-group {
    position: relative;
}

.auth-input-group i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    z-index: 2;
}

.auth-input-group .form-control {
    padding-left: 42px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    font-size: 0.925rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input-group .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

.auth-submit-btn {
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    border: none;
    box-shadow: 0 4px 14px rgba(79,70,229,0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79,70,229,0.45);
    background: linear-gradient(135deg, #4338ca, #4f46e5);
}

.auth-link { color: var(--primary-color); text-decoration: none; font-size: 0.875rem; font-weight: 500; }
.auth-link:hover { text-decoration: underline; }

.auth-form-footer {
    margin-top: 1.5rem;
    color: #64748b;
    font-size: 0.9rem;
}

.auth-form-footer a { color: var(--primary-color); font-weight: 600; text-decoration: none; }
.auth-alert { border-radius: 10px; font-size: 0.9rem; border: none; }

/* Landing Page */
.landing-body {
    background: #0f172a;
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.landing-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1rem 0;
    background: rgba(15,23,42,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.landing-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: #fff;
}

.landing-brand-logo { height: 36px; max-width: 140px; object-fit: contain; }
.landing-brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, #4f46e5, #818cf8);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}
.landing-brand-icon.sm { width: 32px; height: 32px; font-size: 0.95rem; }
.landing-brand-text { font-weight: 700; font-size: 1.15rem; }

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.landing-nav-links a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.landing-nav-links a:hover { color: #fff; }
.landing-nav-toggle {
    background: none; border: none;
    color: #fff; font-size: 1.5rem;
}

.landing-nav-mobile {
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.landing-nav-mobile a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 0.5rem 0;
}

.landing-hero {
    padding: 140px 0 80px;
    background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    position: relative;
    overflow: hidden;
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: #c7d2fe;
}

.landing-hero-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.landing-hero-title span {
    background: linear-gradient(90deg, #818cf8, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-hero-text {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 520px;
}

.landing-hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.landing-hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

.landing-hero-trust i { color: #34d399; margin-right: 0.35rem; }

.landing-dashboard-preview {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
}

.preview-header {
    background: #f1f5f9;
    padding: 12px 16px;
    display: flex;
    gap: 6px;
}

.preview-header span {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
}

.preview-header span:first-child { background: #ef4444; }
.preview-header span:nth-child(2) { background: #f59e0b; }
.preview-header span:nth-child(3) { background: #10b981; }

.preview-body { padding: 1.25rem; color: #1e293b; }

.preview-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.preview-stat {
    background: #f8fafc;
    border-radius: 10px;
    padding: 0.75rem;
}

.preview-stat small { display: block; color: #94a3b8; font-size: 0.7rem; }
.preview-stat strong { font-size: 1.1rem; color: #1e293b; }

.preview-chart {
    height: 80px;
    background: linear-gradient(to top, rgba(79,70,229,0.15), transparent);
    border-radius: 8px;
    margin-bottom: 1rem;
    border-bottom: 2px solid #4f46e5;
}

.preview-list-item {
    font-size: 0.8rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-list-item .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot.green { background: #10b981; }
.dot.yellow { background: #f59e0b; }
.dot.blue { background: #4f46e5; }

.landing-stats {
    padding: 3rem 0;
    background: #fff;
    color: #1e293b;
}

.landing-stat-box h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.landing-stat-box p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

.landing-section {
    padding: 5rem 0;
    background: #f8fafc;
    color: #1e293b;
}

.landing-section-dark {
    background: linear-gradient(135deg, #1e1b4b, #0f172a);
}

.landing-section-head { margin-bottom: 3rem; }
.landing-section-label {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.landing-section-head h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.landing-section-head p { color: #64748b; max-width: 560px; margin: 0 auto; }

.landing-feature-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.75rem;
    height: 100%;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.landing-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.landing-feature-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: var(--primary-color);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.landing-feature-card h5 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.landing-feature-card p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

.landing-module-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
}

.landing-module-list li {
    padding: 0.45rem 0;
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
}

.landing-module-list i { color: #34d399; margin-right: 0.5rem; }

.landing-module-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.landing-module-chip {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.landing-module-chip:hover { background: rgba(255,255,255,0.12); }
.landing-module-chip i { color: #818cf8; }

.landing-cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    text-align: center;
}

.landing-cta h2 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.landing-cta p {
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.landing-footer {
    padding: 2.5rem 0;
    background: #0f172a;
    border-top: 1px solid rgba(255,255,255,0.06);
}

@media (max-width: 991px) {
    .landing-nav-links { display: none; }
    .auth-brand-panel { display: none; }
    .auth-form-panel { flex: 1; }
    .landing-hero { padding-top: 110px; }
    .landing-dashboard-preview { transform: none; margin-top: 1rem; }
    .landing-module-grid { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .auth-form-panel { padding: 1.25rem; }
    .landing-hero-actions .btn { width: 100%; }
}

/* Legacy auth-card (fallback) */
.auth-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo h2 {
    color: var(--primary-color);
    font-weight: 700;
}

/* Dashboard Cards */
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.stat-card:hover { transform: translateY(-2px); }

.stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
}

.stat-card .stat-label {
    color: #64748b;
    font-size: 0.85rem;
}

/* Status Badges & Pills */
.badge-draft { background: #94a3b8 !important; }
.badge-pending { background: #f59e0b !important; }
.badge-paid { background: #10b981 !important; }
.badge-overdue { background: #ef4444 !important; }
.badge-cancelled { background: #6b7280 !important; }

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}
.status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.85;
}
.status-draft { background: #f1f5f9; color: #64748b; }
.status-pending { background: #fef3c7; color: #b45309; }
.status-paid { background: #d1fae5; color: #047857; }
.status-overdue { background: #fee2e2; color: #b91c1c; }
.status-cancelled { background: #f3f4f6; color: #6b7280; }
.status-active { background: #d1fae5; color: #047857; }
.status-inactive { background: #f1f5f9; color: #64748b; }
.status-new { background: #dbeafe; color: #1d4ed8; }
.status-contacted { background: #e0e7ff; color: #4338ca; }
.status-won { background: #d1fae5; color: #047857; }
.status-product { background: #dbeafe; color: #1d4ed8; }
.status-service { background: #f3e8ff; color: #7c3aed; }

/* List Pages */
.list-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.list-stat-item {
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1.15rem;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: box-shadow 0.2s, transform 0.2s;
}
.list-stat-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}
.list-stat-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.list-stat-item .label { font-size: 0.78rem; color: #64748b; margin-bottom: 2px; }
.list-stat-item .value { font-size: 1.25rem; font-weight: 700; color: #1e293b; line-height: 1.2; }

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.filter-pill {
    padding: 0.45rem 1rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #64748b;
    background: #fff;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all 0.2s;
}
.filter-pill:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #eef2ff;
}
.filter-pill.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(79,70,229,0.35);
}

/* Data List Card */
.data-list-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
}
.data-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.35rem;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(to bottom, #fafbfc, #fff);
    flex-wrap: wrap;
    gap: 0.75rem;
}
.data-list-header h6 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
}
.data-list-header .record-count {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
}
.data-list-card .table { margin-bottom: 0; }
.data-list-card .table thead th {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.85rem 1.25rem;
    white-space: nowrap;
}
.data-list-card .table tbody td {
    padding: 0.95rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 0.875rem;
}
.data-list-card .table tbody tr {
    transition: background 0.15s;
}
.data-list-card .table tbody tr:hover {
    background: #f8fafc;
}
.data-list-card .table tbody tr:last-child td {
    border-bottom: none;
}

.list-avatar {
    width: 38px; height: 38px;
    border-radius: 10px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.list-contact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.list-contact-name {
    display: block;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.3;
}
.list-contact-name:hover { color: var(--primary-color); }
.list-contact-sub {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.3;
}

.list-ref {
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
}
.list-ref:hover { text-decoration: underline; color: #4338ca; }
.list-ref-sub { display: block; font-size: 0.72rem; color: #94a3b8; font-weight: 400; }

.list-money {
    font-weight: 700;
    font-size: 0.875rem;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
}
.list-money.text-success { color: #059669 !important; }
.list-money.text-muted { color: #94a3b8 !important; font-weight: 500; }

.list-date {
    display: block;
    font-size: 0.875rem;
    color: #334155;
}
.list-date-sub {
    display: block;
    font-size: 0.72rem;
    color: #94a3b8;
}

.list-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}
.list-action-btn {
    width: 34px; height: 34px;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    background: #fff !important;
    transition: all 0.15s;
}
.list-action-btn:hover {
    background: #eef2ff !important;
    border-color: #c7d2fe !important;
    color: var(--primary-color) !important;
}
.list-action-btn.btn-danger-hover:hover {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #dc2626 !important;
}
.list-action-btn.btn-success-hover:hover {
    background: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
    color: #059669 !important;
}

.list-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #94a3b8;
}
.list-empty i { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; opacity: 0.5; }
.list-empty p { margin: 0; font-size: 0.9rem; }

/* DataTables empty row — must have 1 td per column (no colspan) */
.list-empty-row td { border-bottom: none !important; vertical-align: middle; }
.list-empty-row td.list-empty-filler { padding: 0; border: none; width: 0; font-size: 0; line-height: 0; }
.list-empty-row td:first-child { text-align: center; }

.list-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
}

/* DataTables custom */
.data-list-card .dataTables_wrapper .dataTables_filter input {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}
.data-list-card .dataTables_wrapper .dataTables_length select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.3rem 0.5rem;
}
.data-list-card .dataTables_wrapper .dataTables_info,
.data-list-card .dataTables_wrapper .dataTables_paginate {
    padding: 0.85rem 1.25rem;
    font-size: 0.82rem;
}
.data-list-card .dataTables_wrapper .pagination .page-link {
    border-radius: 6px !important;
    margin: 0 2px;
    font-size: 0.82rem;
}
.data-list-card .dataTables_wrapper .pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Tables (legacy) */
.table-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
}

.table-card .card-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
}

/* Invoice Items Table */
.invoice-items-table input { min-width: 80px; }
.invoice-items-table .form-control { padding: 0.35rem 0.5rem; font-size: 0.875rem; }

/* Invoice logo & print */
#invoicePrint {
    font-size: 0.8125rem;
    line-height: 1.45;
}
#invoicePrint .invoice-company-name { font-size: 1rem; }
#invoicePrint .invoice-doc-title { font-size: 1.125rem; }
#invoicePrint .inv-doc-number { font-size: 0.9rem; }
#invoicePrint .inv-header-company .small,
#invoicePrint .inv-header-company p { font-size: 0.75rem; }
#invoicePrint h6 { font-size: 0.8125rem; margin-bottom: 0.35rem; }
#invoicePrint .invoice-table-bi { font-size: 0.8125rem; }
#invoicePrint .invoice-table-bi th { font-size: 0.72rem; padding: 0.4rem 0.5rem; }
#invoicePrint .invoice-table-bi td { padding: 0.4rem 0.5rem; }
#invoicePrint .inv-ar-sub { font-size: 0.65rem; }
#invoicePrint .inv-ar-inline { font-size: 0.78em; }
#invoicePrint .inv-company-ar { font-size: 0.85rem; }
#invoicePrint .invoice-amount-words { font-size: 0.8125rem; }
#invoicePrint .invoice-qr-code { width: 80px !important; height: 80px !important; }

.invoice-logo-wrap { flex-shrink: 0; }
.invoice-logo { display: block; }
.invoice-company-name { font-size: 1.25rem; font-weight: 700; color: #1e293b; }
.invoice-doc-title { font-size: 1.5rem; font-weight: 700; color: #64748b; }

/* Bilingual invoice labels (English + Arabic) */
.inv-company-ar,
.inv-ar-sub,
.inv-ar-inline {
    font-family: 'Noto Sans Arabic', 'Plus Jakarta Sans', sans-serif;
}
.inv-company-ar {
    font-size: 0.95rem;
    color: #475569;
    direction: rtl;
    text-align: inherit;
}
.inv-ar-sub {
    font-size: 0.72rem;
    font-weight: 500;
    color: #64748b;
    text-transform: none;
    line-height: 1.35;
}
.inv-ar-inline {
    font-size: 0.85em;
    color: #64748b;
    margin-inline-start: 0.25rem;
}
.invoice-company-header {
    position: relative;
}
.inv-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: nowrap;
    padding-right: 0;
}
.inv-header-top:has(.inv-qr-top) {
    padding-right: 92px;
}
.inv-header-company {
    flex: 1 1 auto;
    min-width: 0;
}
.inv-qr-top {
    position: absolute;
    top: 0;
    right: 0;
    display: block;
    text-align: center;
    flex-shrink: 0;
    z-index: 1;
}
.inv-header-title {
    text-align: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}
.inv-header-title .inv-company-ar {
    text-align: center;
}
.inv-doc-number {
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}
.invoice-table-bi th {
    vertical-align: middle;
    line-height: 1.35;
    white-space: nowrap;
}
.text-md-end .inv-company-ar,
.text-end .inv-company-ar {
    text-align: right;
}

.logo-preview-box {
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-preview-img { max-height: 100px; max-width: 100%; object-fit: contain; }
.logo-preview-empty { color: #94a3b8; }
.logo-preview-empty i { font-size: 2rem; display: block; margin-bottom: 0.5rem; }

@media print {
    .sidebar, .navbar, .no-print, .btn { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .content-area { padding: 0 !important; }
    #invoicePrint { box-shadow: none !important; border: none !important; }
    .invoice-logo { max-height: 60px !important; }
    .inv-header-top:has(.inv-qr-top) {
        padding-right: 92px !important;
    }
    .inv-qr-top {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        page-break-inside: avoid;
    }
    .inv-header-company {
        max-width: calc(100% - 110px);
    }
    .inv-header-title {
        page-break-inside: avoid;
        page-break-before: avoid;
    }
    .invoice-qr-code {
        width: 80px !important;
        height: 80px !important;
    }
}

.invoice-amount-words {
    font-style: italic;
    color: #334155;
    line-height: 1.5;
}
.invoice-qr-code {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px;
    background: #fff;
}
.invoice-footer-block { page-break-inside: avoid; }

/* Mobile */
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* Forms */
.form-label { font-weight: 500; font-size: 0.875rem; color: #475569; }

.btn-primary { background: var(--primary-color); border-color: var(--primary-color); }
.btn-primary:hover { background: #4338ca; border-color: #4338ca; }

/* Calendar */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.calendar-day { min-height: 80px; background: #fff; padding: 4px; font-size: 0.8rem; }
.calendar-day.today { background: #eef2ff; }
.calendar-event { background: var(--primary-color); color: #fff; padding: 2px 4px; border-radius: 3px; margin-top: 2px; font-size: 0.7rem; cursor: pointer; }
