/* ==========================================================================
   SUPERNOVA MARKETING ACCOUNTING SYSTEM - DESIGN SYSTEM (LIGHT THEME)
   ========================================================================== */

:root {
    /* Color Palette */
    --primary: #7c3aed; /* Purple */
    --primary-color: var(--primary);
    --primary-hover: #6d28d9;
    --primary-gradient: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
    --primary-light: rgba(124, 58, 237, 0.08);
    
    --success: #10b981; /* Green */
    --success-light: rgba(16, 185, 129, 0.08);
    
    --warning: #f59e0b; /* Amber */
    --warning-light: rgba(245, 158, 11, 0.08);
    
    --danger: #ef4444; /* Red */
    --danger-light: rgba(239, 68, 68, 0.08);
    
    --info: #3b82f6; /* Blue */
    --info-light: rgba(59, 130, 246, 0.08);

    /* Backgrounds & Text */
    --bg-body: #f8fafc; /* Cool grey background */
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    
    --text-main: #0f172a; /* Slate 900 */
    --text-muted: #64748b; /* Slate 500 */
    --text-light: #94a3b8; /* Slate 400 */
    
    --border-color: #e2e8f0; /* Slate 200 */
    --border-hover: #cbd5e1; /* Slate 300 */
    
    /* Layout Constants */
    --sidebar-width: 260px;
    --header-height: 80px;
    
    /* Typography */
    --font-main: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Outfit', sans-serif;
    
    /* Shadow Systems */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

/* ==========================================================================
   Base & Reset Styles
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-main);
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.brand-logo {
    height: 52px;
    width: auto;
    object-fit: contain;
}

.dashboard-filter-bar {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 24px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-name h2 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-name span {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.menu-item i {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.menu-item:hover {
    color: var(--primary);
    background-color: var(--primary-light);
}

.menu-item:hover i {
    transform: translateX(3px);
}

.menu-item.active {
    color: var(--bg-card);
    background: var(--primary-gradient);
    box-shadow: 0 4px 14px 0 rgba(124, 58, 237, 0.25);
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 32px 40px;
    overflow-x: hidden;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.header-title h1 {
    font-size: 1.85rem;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
}

.status-indicator.online {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

/* ==========================================================================
   UI Controls & Components
   ========================================================================== */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-fast);
}

.btn i {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.15);
}

.btn-primary:hover {
    box-shadow: 0 6px 14px rgba(124, 58, 237, 0.25);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--border-hover);
    background-color: var(--bg-body);
}

.btn-outline-purple {
    background-color: var(--bg-card);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-purple:hover {
    background-color: var(--primary-light);
}

.btn-danger {
    background-color: var(--danger);
    color: #fff;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.15);
}

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
}

.btn-outline-danger {
    background-color: var(--bg-card);
    border-color: var(--danger);
    color: var(--danger);
}

.btn-outline-danger:hover {
    background-color: var(--danger-light);
}

.btn-icon-only {
    padding: 10px;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* Forms */
.form-select, .form-control {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition-fast);
    font-weight: 500;
}

.form-select:focus, .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Dropdown select with action button */
.select-with-btn {
    display: flex;
    gap: 8px;
}

.select-with-btn select {
    flex: 1;
}

/* ==========================================================================
   Views Setup
   ========================================================================== */
.view-content {
    flex: 1;
}

.app-view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.app-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Dashboard View
   ========================================================================== */

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.kpi-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.kpi-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kpi-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-icon i {
    width: 18px;
    height: 18px;
}

.kpi-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.kpi-footer {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Chart Grid layout */
.dashboard-charts {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
}

.chart-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.chart-card.large {
    grid-column: span 2;
}

.chart-card h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.chart-wrapper {
    position: relative;
    height: 320px;
    width: 100%;
}

/* ==========================================================================
   Table & Sheet Views
   ========================================================================== */

/* Sub-panels and Tabs */
.controls-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-group label {
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.control-group label i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.tab-navigation {
    display: flex;
    gap: 6px;
}

.tab-btn {
    border: none;
    background: none;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.tab-btn:hover {
    color: var(--primary);
    background-color: var(--primary-light);
}

.tab-btn.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

/* Sub-views Container */
.sub-view-container {
    animation: fadeIn 0.2s ease;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Client Selection sub-bar */
.client-selection-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
}

.client-dropdown-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.client-dropdown-wrapper label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* Tables styling */
.table-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.table-header h4 {
    font-size: 1.05rem;
    font-weight: 700;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.data-table th {
    background-color: #fafafa;
    color: var(--text-muted);
    font-weight: 700;
    padding: 14px 20px;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background-color: #fafafa;
}

.table-totals {
    font-weight: 700;
    background-color: rgba(248, 250, 252, 0.9);
    border-top: 2px solid var(--border-color);
}

.table-totals td {
    padding: 14px 20px;
}

.actions-col {
    width: 80px;
    text-align: center;
}

/* In-table Interactive elements */
.editable-cell {
    border-bottom: 1px dashed var(--border-hover);
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
    outline: none;
    min-height: 24px;
    word-break: break-word;
}

.editable-cell:hover {
    background-color: var(--primary-light);
    border-bottom-color: var(--primary);
}

.editable-cell:focus {
    background-color: #fff;
    border: 1px solid var(--primary);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
    cursor: text;
}

/* Costs Grid */
.costs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background-color: var(--warning-light);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background-color: var(--danger-light);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Status Select in Table */
.status-select-inline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.75rem;
    outline: none;
    cursor: pointer;
}

.status-select-inline:focus {
    border-color: var(--primary);
}

/* Delete Row button styling */
.btn-delete-row {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 4px;
    border-radius: var(--radius-sm);
}

.btn-delete-row:hover {
    color: var(--danger);
    background-color: var(--danger-light);
}

.btn-delete-row i {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Month Summary Report View
   ========================================================================== */
.summary-sheet-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    max-width: 680px;
    margin: 0 auto 30px auto;
    padding: 40px;
}

.summary-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 20px;
}

.summary-sheet-header h3 {
    font-size: 1.3rem;
}

.report-badge {
    background: var(--primary-gradient);
    color: #fff;
    padding: 6px 14px;
    font-weight: 700;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.15);
}

.summary-details-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.summary-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.summary-detail-row .lbl {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.summary-detail-row .lbl i {
    width: 18px;
    height: 18px;
}

.summary-detail-row .val {
    font-size: 1.05rem;
}

.summary-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 10px 0;
}

.total-revenue-row, .total-expenses-row {
    background-color: #fafafa;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.total-revenue-row .lbl, .total-expenses-row .lbl {
    font-weight: 700;
    color: var(--text-main);
}

.net-profit-row {
    background-color: var(--primary-light);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(124, 58, 237, 0.15);
}

.lbl-large {
    font-size: 1.15rem;
    font-weight: 800;
    font-family: var(--font-display);
}

.val-large {
    font-size: 1.45rem;
    font-family: var(--font-display);
    color: var(--primary);
}

.margin-row {
    padding: 0 20px;
}

/* ==========================================================================
   Collections Filter Bar
   ========================================================================== */
.col-filter-bar {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.col-filter-bar label {
    font-weight: 700;
    font-size: 0.9rem;
}

.w-md {
    width: 240px;
}

/* ==========================================================================
   Backup & Settings View
   ========================================================================== */
.backup-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.settings-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-card.border-danger {
    border-color: rgba(239, 68, 68, 0.3);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background-color: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.card-icon i {
    width: 26px;
    height: 26px;
}

.settings-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.import-wrapper label {
    display: flex;
    width: 100%;
}

/* ==========================================================================
   Modal Dialog Layouts
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: modalFadeIn var(--transition-fast) ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    animation: modalZoomIn var(--transition-normal) cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalZoomIn {
    from { transform: scale(0.9) translateY(10px); }
    to { transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.15rem;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    background-color: #fafafa;
    border-top: 1px solid var(--border-color);
}

/* Helpers & Utilities */
.text-muted { color: var(--text-muted); }
.text-purple { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-red { color: var(--danger); }
.text-green { color: var(--success); }
.text-blue { color: var(--info); }
.text-orange { color: #f97316; }

.bg-purple-light { background-color: var(--primary-light); }
.bg-red-light { background-color: var(--danger-light); }
.bg-green-light { background-color: var(--success-light); }
.bg-blue-light { background-color: var(--info-light); }

.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 800; }
.text-sm { font-size: 0.8rem; }
.text-lg { font-size: 1.1rem; }

.scrollable-tabs {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}
.scrollable-tabs::-webkit-scrollbar {
    display: none;
}

/* Responsive Utilities */
.btn-sidebar-toggle {
    display: none;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.sidebar-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 1024px) {
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
    .chart-card.large {
        grid-column: span 1;
    }
    .costs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .btn-sidebar-toggle {
        display: inline-flex !important;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 260px !important;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        box-shadow: var(--shadow-xl);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 16px !important;
        width: 100%;
    }
    
    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .controls-panel {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    
    .control-group {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .control-group select, .control-group button {
        flex-grow: 1;
    }
    
    .client-selection-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .modal-card {
        width: 95% !important;
        margin: 20px auto;
    }
}

@media (max-width: 576px) {
    .app-header {
        gap: 12px;
    }
    
    .header-title h1 {
        font-size: 1.5rem;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .system-status {
        justify-content: center;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .chart-card {
        padding: 16px;
    }
}

/* Collapsible Tables & Drag and Drop styling */
.table-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.15s ease;
}

.table-header:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-header h4 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.table-header h4::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--text-main);
    border-bottom: 2px solid var(--text-main);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-right: 8px;
    margin-left: 4px;
}

.table-card.collapsed .table-header h4::before {
    transform: rotate(-45deg);
}

.table-card.collapsed .table-responsive {
    display: none;
}

.table-card.collapsed .table-header {
    border-bottom-color: transparent;
}

/* Drag and Drop Dragging & Over States */
.dragging {
    opacity: 0.5;
    background-color: var(--bg-body) !important;
}

.drag-over-above td {
    border-top: 2px solid var(--primary) !important;
}

.drag-over-below td {
    border-bottom: 2px solid var(--primary) !important;
}

/* For tbody drag-over styling (grouped social media management rows) */
tbody.drag-over-above tr:first-child td {
    border-top: 2px solid var(--primary) !important;
}

tbody.drag-over-below tr:last-child td {
    border-bottom: 2px solid var(--primary) !important;
}

/* Drag Grip Handle */
.drag-handle {
    cursor: grab;
    text-align: center;
    color: var(--text-muted);
    opacity: 0.5;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.drag-handle:hover {
    opacity: 1;
    color: var(--primary);
}

.drag-handle:active {
    cursor: grabbing;
}

/* Card Drag and Drop */
.dragging-card {
    opacity: 0.4;
    border: 2px dashed var(--primary) !important;
}

.table-card.drag-over-above {
    border-top: 2px solid var(--primary) !important;
}

.table-card.drag-over-below {
    border-bottom: 2px solid var(--primary) !important;
}

.card-drag-handle {
    opacity: 0.5;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.card-drag-handle:hover {
    opacity: 1;
    color: var(--primary);
}

/* Balances View Dashboard styles */
.balances-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 25px;
}

.kpi-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-icon i {
    width: 24px;
    height: 24px;
}

/* Green theme for USD */
.usd-assets .kpi-icon {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

/* Blue theme for NIS */
.nis-assets .kpi-icon {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

/* Purple theme for Active Count */
.total-accounts .kpi-icon {
    background-color: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.kpi-details {
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.kpi-details h3 {
    margin: 4px 0 0 0;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
}

/* Allocation Bar Segment styles */
.asset-bar-segment {
    height: 100%;
    transition: width 0.3s ease;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

/* Width Utility classes */
.w-xs {
    width: 100px;
}
.w-sm {
    width: 160px;
}

/* Status select coloring */
.status-select-inline {
    padding: 4px 8px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    transition: all var(--transition-fast) ease;
}

.status-select-inline.status-done {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

.status-select-inline.status-in-progress {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
}

.status-select-inline.status-not-started {
    background-color: rgba(100, 116, 139, 0.15);
    color: #64748b;
    border-color: rgba(100, 116, 139, 0.3);
}

/* Status Filter styles */
.status-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
}

.status-filter-group span {
    font-weight: 700;
    font-size: 0.9rem;
    margin-right: 6px;
    color: var(--text-main);
}

.status-filter-btn {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast) ease;
    opacity: 0.4;
    background-color: var(--bg-body);
    color: var(--text-muted);
}

.status-filter-btn:hover {
    opacity: 0.75;
}

.status-filter-btn.active {
    opacity: 1;
}

.status-filter-btn.active[data-status="Done"] {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.4);
}

.status-filter-btn.active[data-status="In Progress"] {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.4);
}

.status-filter-btn.active[data-status="Not Started"] {
    background-color: rgba(100, 116, 139, 0.15);
    color: #64748b;
    border-color: rgba(100, 116, 139, 0.4);
}

/* Cheque Image columns and thumbnails */
.cheque-thumb-wrapper {
    position: relative;
    width: 50px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast) ease;
    display: inline-block;
    vertical-align: middle;
}

.cheque-thumb-wrapper:hover {
    transform: scale(1.05);
    border-color: var(--color-primary);
}

.cheque-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cheque-thumb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast) ease;
}

.cheque-thumb-wrapper:hover .cheque-thumb-overlay {
    opacity: 1;
}

.cheque-thumb-overlay i {
    width: 16px;
    height: 16px;
    color: #ffffff;
}

.cheque-upload-trigger {
    width: 64px;
    height: 36px;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    transition: all var(--transition-fast) ease;
    gap: 2px;
}

.cheque-upload-trigger:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background-color: rgba(124, 58, 237, 0.03);
}

.cheque-upload-trigger i {
    width: 14px;
    height: 14px;
}

.btn-pdf {
    background-color: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: var(--radius-sm);
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast) ease;
    margin-right: 4px;
}

.btn-pdf:hover {
    background-color: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}

.btn-pdf i {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   Payment Request PDF / A4 Invoice Styles
   ========================================================================== */
.invoice-paper {
    background-color: #ffffff;
    width: 210mm;
    min-height: 297mm;
    padding: 20mm;
    box-sizing: border-box;
    color: #1f2937;
    font-family: 'Inter', 'Outfit', system-ui, sans-serif;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    position: relative;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
}

/* Header */
.invoice-paper .invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 20px;
}

.invoice-paper .invoice-logo-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.invoice-paper .invoice-logo-container img {
    height: 48px;
    object-fit: contain;
    align-self: flex-start;
}

.invoice-paper .invoice-company-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.025em;
}

.invoice-paper .invoice-title-container {
    text-align: right;
}

.invoice-paper .invoice-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #4f46e5;
    letter-spacing: -0.025em;
    margin-bottom: 5px;
}

.invoice-paper .invoice-meta {
    font-size: 0.85rem;
    color: #4b5563;
    display: grid;
    grid-template-columns: auto auto;
    gap: 4px 12px;
    text-align: left;
}

/* Billing Info */
.invoice-paper .invoice-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 35px;
}

.invoice-paper .billing-section h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 8px;
}

.invoice-paper .billing-section p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #1f2937;
    margin: 0;
}

.invoice-paper .billing-section .client-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

/* Service Table */
.invoice-paper .invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 35px;
}

.invoice-paper .invoice-table th {
    background-color: #f8fafc;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
}

.invoice-paper .invoice-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    color: #334155;
}

.invoice-paper .invoice-table td.text-right,
.invoice-paper .invoice-table th.text-right {
    text-align: right;
}

.invoice-paper .invoice-table .service-desc {
    font-weight: 600;
    color: #0f172a;
}

/* Summary Box */
.invoice-paper .invoice-summary {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 40px;
}

.invoice-paper .summary-table {
    width: 250px;
}

.invoice-paper .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
}

.invoice-paper .summary-row.grand-total {
    border-top: 2px solid #4f46e5;
    padding-top: 12px;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}

/* Payment Instructions & Terms */
.invoice-paper .invoice-bank-details {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 30px;
}

.invoice-paper .invoice-bank-details h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.invoice-paper .bank-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.invoice-paper .bank-grid .label {
    font-weight: 600;
    color: #475569;
}

.invoice-paper .bank-grid .value {
    color: #0f172a;
    font-family: monospace;
    font-size: 0.9rem;
}

.invoice-paper .invoice-terms {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
    text-align: left;
    margin-top: auto;
}

.invoice-paper .invoice-terms h5 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 6px;
}

.invoice-paper .invoice-footer {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4f46e5;
    margin-top: 40px;
}

.invoice-paper.pdf-export {
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    border: none !important;
    width: 210mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
    height: 297mm !important;
    padding: 20mm !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
}

.invoice-paper.pdf-export .invoice-header {
    margin-bottom: 35px !important;
    padding-bottom: 20px !important;
}

.invoice-paper.pdf-export .invoice-details-grid {
    margin-bottom: 45px !important;
    gap: 30px !important;
}

.invoice-paper.pdf-export .invoice-table {
    margin-bottom: 30px !important;
}

.invoice-paper.pdf-export .invoice-summary {
    margin-bottom: 40px !important;
}

.invoice-paper.pdf-export .invoice-bank-details {
    margin-bottom: 30px !important;
    padding: 15px !important;
}

.invoice-paper.pdf-export .invoice-terms {
    margin-top: auto !important;
    padding-top: 15px !important;
}

.invoice-paper.pdf-export .invoice-footer {
    margin-top: 30px !important;
}

/* Spinner Animation Utility */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.animate-spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}

/* Login Screen Overlay & Card Styles */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    font-family: var(--font-main);
}

.login-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 400px;
    padding: 30px;
    box-sizing: border-box;
}

.login-logo-container {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo-container img {
    height: 55px;
    object-fit: contain;
}

.login-card h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 20px;
}

.login-card label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.login-card input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-lg), 0 10px 25px -5px rgba(0, 0, 0, 0.08);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 0.925rem;
    font-weight: 500;
    min-width: 280px;
    max-width: 420px;
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    pointer-events: auto;
}

.toast-card.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.toast-card.toast-success {
    border-left: 4px solid var(--success);
}
.toast-card.toast-error {
    border-left: 4px solid var(--danger);
}
.toast-card.toast-info {
    border-left: 4px solid var(--info);
}
.toast-card.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}
.toast-icon.toast-success { color: var(--success); }
.toast-icon.toast-error { color: var(--danger); }
.toast-icon.toast-info { color: var(--info); }
.toast-icon.toast-warning { color: var(--warning); }

/* CRM System CSS Styles */
.menu-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 16px 0;
    opacity: 0.6;
}

.crm-filter-bar {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.crm-filter-bar select, .crm-filter-bar input {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    min-width: 140px;
    transition: border-color 0.2s ease;
}

.crm-filter-bar select:focus, .crm-filter-bar input:focus {
    border-color: var(--primary);
}

.crm-filter-bar input[type="text"] {
    flex-grow: 1;
    min-width: 200px;
}

.select-cell-inline {
    width: 100%;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    text-align: center;
    text-align-last: center;
    transition: all var(--transition-fast) ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.select-cell-inline:hover {
    background-color: rgba(0, 0, 0, 0.02);
    border-color: var(--border-hover);
}

.select-cell-inline:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

/* Status colors as badges */
.select-cell-inline.status-in-process {
    background-color: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
    border-color: rgba(99, 102, 241, 0.25);
}
.select-cell-inline.status-lost {
    background-color: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.25);
}
.select-cell-inline.status-closed {
    background-color: rgba(16, 185, 129, 0.12);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.25);
}

/* Importance colors as badges */
.select-cell-inline.importance-high {
    background-color: rgba(220, 38, 38, 0.12);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.25);
}
.select-cell-inline.importance-medium {
    background-color: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.25);
}
.select-cell-inline.importance-low {
    background-color: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.25);
}

/* Custom premium styling for Date Input in cells */
.crm-date-input {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 10px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    background-color: var(--bg-body);
    color: var(--text-main);
    outline: none;
    transition: all var(--transition-fast) ease;
    cursor: pointer;
    width: 100%;
    max-width: 125px;
    text-align: center;
}
.crm-date-input:hover {
    border-color: var(--border-hover);
}
.crm-date-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.notes-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
    margin-bottom: 20px;
}

.note-entry {
    background-color: var(--bg-body);
    border-radius: 8px;
    padding: 12px;
    border-left: 3px solid var(--primary);
    position: relative;
}

.note-entry-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: bold;
}

.note-entry-content {
    font-size: 0.88rem;
    color: var(--text-main);
    line-height: 1.4;
    white-space: pre-wrap;
}

.btn-delete-note {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 2px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.btn-delete-note:hover {
    opacity: 1;
}

.note-form {
    display: flex;
    gap: 12px;
}

.note-form textarea {
    flex-grow: 1;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-body);
    color: var(--text-main);
    padding: 10px;
    font-family: inherit;
    font-size: 0.88rem;
    resize: none;
    height: 60px;
    outline: none;
}

.note-form textarea:focus {
    border-color: var(--primary);
}

/* HR System Styles */
.employee-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s ease-in-out;
    cursor: grab;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.employee-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.employee-card.dragging {
    opacity: 0.4;
    border: 2px dashed var(--primary);
    cursor: grabbing;
    transform: scale(0.98) !important;
    box-shadow: none !important;
}

.employee-card.dragging:hover {
    transform: none !important;
}

.employee-card-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--bg-body);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--text-muted);
    position: relative;
}

.employee-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    left: 0;
    top: 0;
}

.employee-card-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.employee-card-position {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.employee-card-badge {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.employee-card-badge.status-active {
    background-color: rgba(34, 197, 94, 0.08);
    color: #22c55e;
}

.employee-card-badge.status-terminated {
    background-color: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

.profile-tabs-header {
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    background-color: var(--bg-body);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.profile-tab-btn {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    font-family: inherit;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    padding: 8px 14px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--border-color) !important;
}

.profile-tab-btn:hover {
    color: var(--text-main) !important;
    border-color: var(--text-muted) !important;
    background-color: rgba(255, 255, 255, 0.03) !important;
}

.profile-tab-btn.active {
    color: #ffffff !important;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.15) !important;
}

.profile-tab-content {
    display: none;
    flex-direction: column;
}

.profile-tab-content.active {
    display: flex;
}

.btn-outline-danger {
    background-color: transparent;
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-family: inherit;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline-danger:hover {
    background-color: rgba(239, 68, 68, 0.05);
    border-color: #ef4444;
}

/* Evaluation Criteria Sliders & Scores */
.evaluation-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.evaluation-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
}
.evaluation-slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}
.evaluation-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-card);
    outline: none;
    -webkit-appearance: none;
    border: 1px solid var(--border-color);
}
.evaluation-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.evaluation-score-badge {
    min-width: 32px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-main);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 6px;
}
.btn-delete-criterion {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.btn-delete-criterion:hover {
    opacity: 1;
}

/* Sliding Drawer Panel for Activity Log */
.sidebar-drawer {
    position: fixed;
    top: 0;
    right: -420px; /* Hidden offscreen on the right */
    width: 420px;
    max-width: 90vw;
    height: 100vh;
    background-color: var(--bg-card);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    z-index: 1010; /* Above overlays */
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.sidebar-drawer.active {
    right: 0;
}

.sidebar-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(4px);
    z-index: 1005;
    display: none;
    animation: drawerFadeIn 0.3s ease;
}

.sidebar-drawer-overlay.active {
    display: block;
}

@keyframes drawerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.activity-log-card {
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.88rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.activity-log-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary);
}

