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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #2d3748;
    background-color: #f8fafc;
    overflow-x: hidden;
}

/* CSS Variables */
:root {
    --primary-color: #0A192F;
    --primary-light: #1a2332;
    --primary-dark: #000814;
    --secondary-color: #1e40af;
    --accent-color: #10b981;
    --success-color: #059669;
    --warning-color: #d97706;
    --error-color: #dc2626;
    --info-color: #0ea5e9;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-in-out;
    --sidebar-width: 280px;
    --header-height: 80px;
}

/* Login Page Styles */
.login-body {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 50%, var(--primary-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.login-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.03)"/><circle cx="20" cy="80" r="0.5" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--white);
    padding: 3rem 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-card .logo {
    margin-bottom: 2.5rem;
}

.login-card .logo i {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.login-card .logo h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    letter-spacing: -0.025em;
}

.login-card h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.login-card > p {
    color: var(--gray-600);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

.input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1rem;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10, 25, 47, 0.1);
}

.demo-credentials {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--border-radius-sm);
    text-align: left;
    border: 1px solid var(--gray-200);
}

.demo-credentials h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.credential-item {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: var(--white);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.credential-item:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.credential-item:last-child {
    margin-bottom: 0;
}


/* Table Styling */
#clientsTableBody tr:hover {
    background: #f8f9fc;
}
#clientsTableBody td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

/* Buttons */
.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.btn-edit {
    background: #4CAF50;
    color: white;
    margin-right: 6px;
}
.btn-edit:hover { background: #43a047; }
.btn-delete {
    background: #e53935;
    color: white;
}
.btn-delete:hover { background: #c62828; }

/* Status Badge */
.status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    text-transform: capitalize;
}
.status.active { background: #e0f7e9; color: #2e7d32; }
.status.inactive { background: #ffebee; color: #c62828; }

/* No data row */
.no-data {
    text-align:center; 
    padding:2rem; 
    color: gray;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: -300px;
    background: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}
.toast.show {
    right: 30px;
    opacity: 1;
}
.toast.success { background: #4CAF50; }
.toast.error { background: #f44336; }
.toast.info { background: #2196F3; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal.show {
    display: flex;
    opacity: 1;
}
.modal .modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 500px;
    max-width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease;
}
@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}


/* App Layout */
.app-container {
    max-width: 100%;
    display: flex;
    min-height: 100vh;
    background: var(--gray-50);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar .logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--white);
}

.sidebar .logo i {
    font-size: 2rem;
    margin-right: 0.75rem;
    color: var(--accent-color);
}

.logo img {
    height: 50px;
    margin-right: 10px;
}

.mobile-only {
    display: none;
}

.nav-menu {
    flex: 1;
    padding: 1.5rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
    margin: 0.25rem 0;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-left-color: var(--accent-color);
}

.nav-item i {
    width: 24px;
    margin-right: 1rem;
    font-size: 1.125rem;
    text-align: center;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.25rem;
}

.user-details {
    flex: 1;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    background: rgba(220, 38, 38, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.875rem;
}

.logout-btn:hover {
    background: rgba(220, 38, 38, 0.2);
    color: #fecaca;
    transform: translateY(-1px);
}

.logout-btn i {
    margin-right: 0.75rem;
}

/* Main Content */
.main-content {
    max-width: 100%;
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: var(--transition);
}

/* Header */
.header {
    background: var(--white);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
    height: var(--header-height);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray-600);
    cursor: pointer;
    padding: 0.75rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.desktop-hidden {
    display: none;
}

.breadcrumb h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.breadcrumb p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 1rem;
    color: var(--gray-400);
    font-size: 0.875rem;
    z-index: 1;
}

.search-box input {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    width: 300px;
    transition: var(--transition);
    background: var(--white);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10, 25, 47, 0.1);
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray-600);
    cursor: pointer;
    padding: 0.75rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.notification-btn:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.notification-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--error-color);
    color: var(--white);
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    min-width: 1.25rem;
    text-align: center;
    font-weight: 600;
}

/* Content */
.content {
    max-width: 100%;
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 2px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background: #047857;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--error-color);
    color: var(--white);
}

.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-2px);
}

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

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

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

.stat-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.clients {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.stat-icon.quotations {
    background: rgba(37, 99, 235, 0.1);
    color: var(--secondary-color);
}

.stat-icon.invoices {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning-color);
}

.stat-icon.balance {
    background: rgba(10, 25, 47, 0.1);
    color: var(--primary-color);
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-content p {
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.stat-change {
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-change.positive {
    color: var(--success-color);
}

.stat-change.negative {
    color: var(--error-color);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.chart-card.large {
    grid-column: 1 / -1;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.chart-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
}

.chart-filter {
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    color: var(--gray-700);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.chart-filter:focus {
    outline: none;
    border-color: var(--primary-color);
}

.chart-container {
    position: relative;
    height: 300px;
}

.stat-icon.balance {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem; /* Adjust size as needed */
    font-weight: bold;
    color: #10b981; /* Match your theme */
}
.stat-icon.balance .rupee-symbol {
    font-family: 'Arial', sans-serif; /* Ensure ₹ renders properly */
}


/* Activity List */
.activity-list {
    padding: 0.5rem 0;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.activity-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    font-size: 1.125rem;
}

.activity-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.activity-icon.info {
    background: rgba(14, 165, 233, 0.1);
    color: var(--info-color);
}

.activity-content {
    flex: 1;
}

.activity-content p {
    font-size: 0.875rem;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

.activity-content small {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Table Styles */
.table-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    /*overflow: hidden;*/
    border: 1px solid var(--gray-200);
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
    flex-wrap: wrap;
    gap: 1rem;
}

.table-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

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

.data-table {
    min-width: unset;
    border-collapse: collapse;
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.data-table th,
.data-table td {
    white-space: nowrap;
    text-overflow: ellipsis;
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.data-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table td {
    color: var(--gray-800);
    font-size: 0.875rem;
}

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

.data-table tbody tr:hover {
    background: var(--gray-50);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.active,
.status-badge.received,
.status-badge.paid {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-badge.pending {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning-color);
}

.status-badge.inactive,
.status-badge.overdue,
.status-badge.rejected {
    background: rgba(220, 38, 38, 0.1);
    color: var(--error-color);
}

.status-badge.draft,
.status-badge.sent {
    background: rgba(107, 114, 128, 0.1);
    color: var(--gray-600);
}

.status-badge.accepted {
    background: rgba(37, 99, 235, 0.1);
    color: var(--secondary-color);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.5rem;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.action-btn.edit {
    background: rgba(37, 99, 235, 0.1);
    color: var(--secondary-color);
}

.action-btn.edit:hover {
    background: rgba(37, 99, 235, 0.2);
    transform: translateY(-1px);
}

.action-btn.delete {
    background: rgba(220, 38, 38, 0.1);
    color: var(--error-color);
}

.action-btn.delete:hover {
    background: rgba(220, 38, 38, 0.2);
    transform: translateY(-1px);
}

.action-btn.view {
    background: rgba(107, 114, 128, 0.1);
    color: var(--gray-600);
}

.action-btn.view:hover {
    background: rgba(107, 114, 128, 0.2);
    transform: translateY(-1px);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    color: var(--gray-800);
    transition: var(--transition);
    background: var(--white);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* Modal Styles */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.custom-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--gray-600);
    background: var(--gray-200);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

/* Error Message */
.error-message {
    background: rgba(220, 38, 38, 0.1);
    color: var(--error-color);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    margin-top: 1rem;
    font-size: 0.875rem;
    border: 1px solid rgba(220, 38, 38, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}


/*QUOTATIONS*/

/* ===== Action Buttons ===== */

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    margin-right: 6px;
    transition: all 0.2s ease;
    color: #fff;
}

/* View */
.btn-icon.view {
    background-color: #2563eb;
}

.btn-icon.view:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
}

/* Edit */
.btn-icon.edit {
    background-color: #f59e0b;
}

.btn-icon.edit:hover {
    background-color: #d97706;
    transform: translateY(-2px);
}

/* Delete */
.btn-icon.delete {
    background-color: #dc2626;
}

.btn-icon.delete:hover {
    background-color: #b91c1c;
    transform: translateY(-2px);
}

/* Convert */
.btn-icon.convert {
    background-color: #16a34a;
}

.btn-icon.convert:hover {
    background-color: #15803d;
    transform: translateY(-2px);
}

/*QUOTATIONS*/

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

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

/* Notification */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-sm);
    color: var(--white);
    font-weight: 500;
    z-index: 3000;
    animation: slideInRight 0.3s ease;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 400px;
}

.notification.success {
    background: var(--success-color);
}

.notification.error {
    background: var(--error-color);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    /*:root {*/
    /*    --sidebar-width: 260px;*/
    /*}*/
    
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .desktop-hidden {
        display: block;
    }
    
    .mobile-only {
        display: block;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .desktop-hidden {
        display: block;
    }
    
    .mobile-only {
        display: block;
    }
    
    .header {
        padding: 1rem 1.5rem;
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-right: 1rem;
    }
    
    .stat-content h3 {
        font-size: 1.875rem;
    }
    
    .search-box {
        display: none;
    }
    
    .table-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .breadcrumb h1 {
        font-size: 1.5rem;
    }
    
    .chart-container {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .breadcrumb h1 {
        font-size: 20px;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .breadcrumb p {
        display: none;
        font-size: 12px;
    }

    .notification-badge {
        top: 2px;
        right: 2px;
        font-size: 0.6rem;
        padding: 2px 5px;
        min-width: 16px;
        height: 16px;
        border-radius: 50%;
        line-height: 12px;
    }

    .notification-btn {
        padding: 0.5rem;
        font-size: 20px;
    }

    .header-right {
        flex-direction: column;
        align-items: end;
        margin-right: 0;
        padding-right: 0;
    }

    #header-actions {
        font-size: 8px;
        height: 15px;
    }

    .table-responsive {
        overflow-x: hidden;
    }

    .data-table {
    min-width: 100%;
}

    /* Allow text wrapping */
    .data-table th,
    .data-table td {
        white-space: normal;
        word-break: break-word;
        font-size: 0.75rem;
        padding: 0.5rem;
    }


    /* Hide Email (2nd column) */
    #clientsTable th:nth-child(2),
    #clientsTable td:nth-child(2),
    #clientsTable th:nth-child(3),
    #clientsTable td:nth-child(3),
    #invoicesTable th:nth-child(3),
    #invoicesTable th:nth-child(3),
    #invoicesTable th:nth-child(5),
    #invoicesTable th:nth-child(5),
    #quotationsTable th:nth-child(3),
    #quotationsTable td:nth-child(3),
    #receiptsTable th:nth-child(3),
    #receiptsTableBody td:nth-child(3),
    #receiptsTable th:nth-child(4),
    #receiptsTableBody td:nth-child(4),
    #receiptsTable th:nth-child(5),
    #receiptsTableBody td:nth-child(5) {
        display: none;
    }


    .login-card {
        padding: 2rem 1.5rem;
    }
    
    .content {
        padding: 1rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }
    
    .stat-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .data-table th,
    .data-table td {
        white-space: normal;
        word-break: break-word;
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.75rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .action-btn {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    
    .notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .header,
    .btn,
    .action-buttons,
    .modal {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content {
        padding: 0;
    }
    
    body {
        background: white;
    }
    
    .table-container,
    .chart-card,
    .stat-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.nav-item:focus,
.action-btn:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --gray-200: #000;
        --gray-300: #000;
        --shadow: 0 0 0 1px #000;
    }
}