/* --- Global Design Tokens --- */
:root {
    --bg-base: hsl(220, 20%, 97%);
    --bg-card: rgba(255, 255, 255, 0.92);
    --bg-card-hover: rgba(255, 255, 255, 0.98);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-glow: hsla(250, 70%, 65%, 0.2);
    
    /* Harmonious Curated Theme Colors */
    --color-primary: hsl(250, 60%, 52%);       /* Indigo-Violet */
    --color-primary-glow: hsla(250, 60%, 55%, 0.12);
    --color-accent: hsl(190, 80%, 38%);         /* Neon Cyan/Teal */
    --color-accent-glow: hsla(190, 80%, 40%, 0.12);
    --color-success: hsl(145, 55%, 36%);        /* Rich Jade Green */
    --color-warning: hsl(38, 75%, 42%);         /* Warm Golden Amber */
    --color-danger: hsl(355, 60%, 48%);         /* Crimson Rose */
    
    /* Text states */
    --text-main: hsl(220, 20%, 12%);
    --text-muted: hsl(218, 12%, 40%);
    --text-dim: hsl(218, 8%, 55%);
    
    /* Typography */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* --- Base Resets & Layout --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-base);
    background-image: 
        radial-gradient(at 0% 0%, hsla(250, 30%, 94%, 0.8) 0px, transparent 50%),
        radial-gradient(at 100% 100%, hsla(190, 30%, 95%, 0.8) 0px, transparent 50%);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: hsl(190, 85%, 55%);
}

#app-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
}

/* --- Utility Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(150, 160, 180, 0.35);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(150, 160, 180, 0.55);
}

/* --- Glassmorphic Premium Styles --- */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.04);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.25s ease, 
                box-shadow 0.25s ease;
}

.glass-card:hover {
    border-color: rgba(110, 85, 230, 0.2);
    background: var(--bg-card-hover);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), hsl(250, 60%, 52%));
    color: #fff;
    box-shadow: 0 4px 15px var(--color-primary-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px hsla(250, 70%, 60%, 0.25);
}

.btn-accent {
    background: linear-gradient(135deg, var(--color-accent), hsl(190, 75%, 42%));
    color: #fff;
    box-shadow: 0 4px 15px var(--color-accent-glow);
}
.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px hsla(190, 85%, 48%, 0.25);
}

.btn-danger {
    background: linear-gradient(135deg, var(--color-danger), hsl(355, 65%, 48%));
    color: white;
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 60, 90, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, var(--color-success), hsl(145, 60%, 36%));
    color: white;
}
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 190, 115, 0.2);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-outline:hover {
    background: hsla(222, 20%, 90%, 0.6);
    border-color: var(--text-muted);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-block {
    width: 100%;
}

/* --- Form Fields --- */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.form-group input, 
.form-group select, 
.form-group textarea,
.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus,
.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-glow);
    outline: none;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.input-helper-text {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-dim);
}

/* --- Auth Overlay / Login Layout --- */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.98), var(--bg-base));
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

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

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    border: 1px solid rgba(110, 85, 230, 0.15);
}

.login-card:hover {
    border-color: hsla(250, 70%, 65%, 0.35);
    box-shadow: 0 10px 40px rgba(110, 85, 230, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.logo-icon {
    font-size: 32px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header h2 {
    font-size: 24px;
    font-weight: 800;
}

.subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

.auth-toggle-text {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.notification {
    background: rgba(255, 60, 90, 0.06);
    border: 1px solid rgba(255, 60, 90, 0.2);
    color: hsl(355, 70%, 45%);
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    text-align: center;
}
.notification.success {
    background: rgba(45, 190, 115, 0.06);
    border: 1px solid rgba(45, 190, 115, 0.2);
    color: hsl(145, 65%, 35%);
}

.hidden {
    display: none !important;
}

/* --- Dashboard / Main Application Shell --- */
.layout-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
}

/* --- Sidebar --- */
.sidebar-aside {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.03);
}

.sidebar-header {
    padding: 28px 24px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.4) 100%);
}

.sidebar-header .logo-area {
    justify-content: flex-start;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -0.3px;
    color: var(--text-main);
}

.logo-icon {
    font-size: 26px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-profile-badge {
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.008);
}

.user-profile-badge .avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: hsla(250, 70%, 65%, 0.08);
    border: 1px solid hsla(250, 60%, 55%, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(110, 85, 230, 0.08);
}

.profile-info h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.2px;
}

.role-tag {
    font-size: 10px;
    background: var(--color-primary-glow);
    color: var(--color-primary);
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.6px;
    display: inline-block;
    margin-top: 3px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

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

.nav-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 18px 8px 8px 12px;
    letter-spacing: 0.8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.nav-item {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 2px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    transition: all 0.2s ease;
    opacity: 0.75;
}

.nav-item:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-main);
    transform: translateX(2px);
}
.nav-item:hover i {
    opacity: 1;
    transform: scale(1.08);
}

.nav-item.active {
    background: var(--color-primary-glow);
    color: var(--color-primary);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--color-primary);
}
.nav-item.active i {
    opacity: 1;
    color: var(--color-primary);
}

.sidebar-footer {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.008);
}

/* --- Main Content Area --- */
.content-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.top-nav-bar {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
}

.page-title h1 {
    font-size: 22px;
    font-weight: 700;
}
.page-title p {
    font-size: 13px;
}

.actions-group {
    display: flex;
    gap: 10px;
}

.main-scroll-container {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    overflow: hidden;
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 80%, rgba(255, 255, 255, 0.5));
    pointer-events: none;
}

/* Glow Borders for Premium Feel */
.border-left-revenue { border-left: 4px solid var(--color-success); }
.border-left-receivables { border-left: 4px solid var(--color-warning); }
.border-left-expenses { border-left: 4px solid var(--color-danger); }
.border-left-profit { border-left: 4px solid var(--color-accent); }

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.rev-color { background: rgba(45, 190, 115, 0.1); color: var(--color-success); }
.rec-color { background: rgba(240, 160, 40, 0.1); color: var(--color-warning); }
.exp-color { background: rgba(255, 60, 90, 0.1); color: var(--color-danger); }
.profit-color { background: rgba(30, 210, 250, 0.1); color: var(--color-accent); }

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-val {
    font-size: 22px;
    font-weight: 700;
    margin: 4px 0;
}

.stat-change {
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- Charts Area --- */
.charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 992px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
}

.chart-card-large, .chart-card-small {
    padding: 24px;
}

.card-header {
    margin-bottom: 20px;
}

.card-header h4 {
    font-size: 16px;
    font-weight: 600;
}
.card-header .card-subtitle {
    font-size: 12px;
    color: var(--text-dim);
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}
.pie-wrapper {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- CRM Dashboard lists --- */
.dashboard-details-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .dashboard-details-row {
        grid-template-columns: 1fr;
    }
}

.table-card {
    padding: 24px;
}

.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crm-badge {
    background: var(--color-accent-glow);
    color: var(--color-accent);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
}

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

.funnel-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.funnel-label {
    width: 90px;
    color: var(--text-muted);
}

.funnel-bar {
    flex: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    margin: 0 16px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.new-fill { background: var(--color-primary); }
.contacting-fill { background: var(--color-warning); }
.proposal-fill { background: var(--color-accent); }
.won-fill { background: var(--color-success); }

.funnel-count {
    font-weight: 700;
    width: 25px;
    text-align: right;
}

.summary-list {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.summary-item:last-child {
    border-bottom: none;
}

.summary-lbl {
    font-size: 14px;
    color: var(--text-muted);
}
.summary-val {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

/* --- Panel Display State logic --- */
.panel-section {
    display: none;
}

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

/* --- Section Actions Bar --- */
.section-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 14px;
}

.search-box input {
    padding-left: 40px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.form-select-sm {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    color: var(--text-main);
    outline: none;
}

/* --- Tables Styling --- */
.table-container {
    overflow-x: auto;
    border-radius: 16px;
}

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

.data-table th {
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.015);
}

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

.data-table tbody tr {
    transition: background 0.15s ease;
}

.data-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.015);
}

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

.loading-cell {
    text-align: center;
    padding: 40px !important;
    color: var(--text-muted);
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success { background: rgba(45, 190, 115, 0.1); color: var(--color-success); }
.badge-warning { background: rgba(240, 160, 40, 0.1); color: var(--color-warning); }
.badge-danger { background: rgba(255, 60, 90, 0.1); color: var(--color-danger); }
.badge-primary { background: var(--color-primary-glow); color: var(--color-primary); }
.badge-info { background: var(--color-accent-glow); color: var(--color-accent); }

/* --- Modals Overlay --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.modal-card {
    width: 100%;
    max-width: 580px;
    padding: 30px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.large-modal {
    max-width: 900px;
}

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

.modal-header h3 {
    font-size: 18px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.15s ease;
}
.modal-close:hover {
    color: var(--text-main);
}

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

/* --- Inline Actions --- */
.actions-cell {
    display: flex;
    gap: 8px;
}

.action-btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}
.action-btn-icon:hover {
    color: var(--text-main);
    border-color: var(--text-muted);
}
.action-btn-icon.delete:hover {
    background: rgba(255, 60, 90, 0.08);
    color: var(--color-danger);
    border-color: var(--color-danger);
}
.action-btn-icon.success:hover {
    background: rgba(45, 190, 115, 0.08);
    color: var(--color-success);
    border-color: var(--color-success);
}

/* --- Invoice Builder Table --- */
.invoice-items-builder {
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.invoice-items-builder h4 {
    margin-bottom: 12px;
    font-size: 14px;
}

.builder-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}

.builder-table th {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: left;
}

.builder-table td {
    padding: 6px;
}

.btn-delete-row {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-accent { color: var(--color-accent); }
.text-warning { color: var(--color-warning); }

/* Totals section in Invoice modal */
.invoice-totals-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.calculations-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

.form-input-sm {
    width: 100px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 8px;
    color: var(--text-main);
    font-family: var(--font-body);
}

.grand-total-row {
    font-size: 16px;
    color: var(--text-main);
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* --- Timeline Logs (Interaction History) --- */
.history-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
}
.history-left-form h4, .history-right-logs h4 {
    margin-bottom: 16px;
    font-size: 14px;
}

.timeline {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid var(--border-color);
    max-height: 400px;
    overflow-y: auto;
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -27px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--color-primary);
}

.timeline-item.call::before { border-color: var(--color-accent); }
.timeline-item.meeting::before { border-color: var(--color-success); }
.timeline-item.note::before { border-color: var(--text-dim); }

.timeline-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
}

.timeline-title {
    font-weight: 700;
}
.timeline-date {
    color: var(--text-dim);
}

.timeline-desc {
    font-size: 13px;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.02);
    padding: 10px;
    border-radius: 6px;
    margin-top: 4px;
}

/* --- Professional Invoice Template Viewer (Print Ready) --- */
.invoice-print-container {
    background: #fff;
    color: #333;
    padding: 40px;
    font-family: 'Inter', sans-serif;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.print-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.company-logo h1 {
    font-size: 20px;
    color: #1a1a1a;
    font-weight: 800;
}
.company-logo p {
    color: #777;
    font-size: 11px;
}

.invoice-meta {
    text-align: right;
}
.invoice-meta h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 6px;
}
.invoice-meta p {
    color: #555;
    margin-bottom: 2px;
}

.print-billing-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.bill-col h4 {
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 8px;
}
.bill-col p {
    color: #333;
    margin-bottom: 2px;
}

.print-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}
.print-table th {
    background: #f8f9fa;
    padding: 12px;
    font-size: 11px;
    text-transform: uppercase;
    color: #555;
    border-bottom: 2px solid #dee2e6;
    text-align: left;
}
.print-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    color: #333;
}

.print-totals {
    display: flex;
    justify-content: flex-end;
}
.print-totals-box {
    width: 250px;
}
.print-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}
.print-row.grand-total {
    border-top: 2px solid #333;
    border-bottom: none;
    font-size: 15px;
    font-weight: 800;
    color: #000;
    padding-top: 10px;
}

.print-footer {
    margin-top: 50px;
    border-top: 1px solid #eee;
    padding-top: 20px;
    font-size: 11px;
    color: #777;
    text-align: center;
}

/* Print CSS Media query */
@media print {
    body * {
        visibility: hidden;
    }
    .invoice-print-container, .invoice-print-container * {
        visibility: visible;
    }
    .invoice-print-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        padding: 0;
    }
    .no-print {
        display: none !important;
    }
}

/* --- Basic Animations --- */
.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-slide-up {
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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