/* Invoice Manager Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0ea5e9 0%, #1e40af 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
}

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

.login-logo svg {
    width: 60px;
    height: 60px;
    fill: #0ea5e9;
}

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

/* Sidebar */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    background: #1a252f;
    border-bottom: 1px solid #34495e;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.sidebar-header p {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
}

.sidebar-nav {
    padding: 20px 0 140px 0;
    min-height: calc(100vh - 140px);
}

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

.sidebar-nav li {
    margin: 5px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: #34495e;
    color: #fff;
}

.sidebar-nav .icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Submenu styles */
.sidebar-nav li.has-submenu {
    position: relative;
}

.sidebar-nav li.has-submenu > a::after {
    content: '\\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s;
}

.sidebar-nav li.has-submenu:hover > a::after {
    transform: rotate(180deg);
}

.sidebar-nav .submenu {
    display: none;
    background: #243342;
    padding: 5px 0;
}

.sidebar-nav li.has-submenu:hover .submenu {
    display: block;
}

/* Touch-friendly submenu for mobile */
@media (max-width: 768px) {
    .sidebar-nav li.has-submenu > a {
        cursor: pointer;
    }

    .sidebar-nav li.has-submenu > a::after {
        content: '\\f107';
        transition: transform 0.3s;
    }

    .sidebar-nav li.has-submenu.open > a::after {
        transform: rotate(180deg);
    }

    .sidebar-nav li.has-submenu.open .submenu {
        display: block;
        position: static;
        box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
    }
}

.sidebar-nav .submenu li {
    margin: 0;
}

.sidebar-nav .submenu a {
    padding: 8px 20px 8px 50px;
    font-size: 13px;
    color: #bdc3c7;
}

.sidebar-nav .submenu a:hover,
.sidebar-nav .submenu a.active {
    background: #34495e;
    color: #fff;
}

.sidebar-nav .submenu a i {
    margin-right: 8px;
    font-size: 11px;
}

/* Submenu styles */
.sidebar-nav li.has-submenu {
    position: relative;
}

.sidebar-nav li.has-submenu > a::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s;
}

.sidebar-nav li.has-submenu:hover > a::after {
    transform: rotate(180deg);
}

.sidebar-nav li.has-submenu > .submenu {
    display: none;
    list-style: none;
    padding: 0;
    background: #1a252f;
}

.sidebar-nav li.has-submenu:hover > .submenu {
    display: block;
}

.sidebar-nav .submenu li {
    margin: 0;
}

.sidebar-nav .submenu a {
    padding: 10px 20px 10px 50px;
    font-size: 13px;
    border-left: 3px solid transparent;
}

.sidebar-nav .submenu a:hover,
.sidebar-nav .submenu a.active {
    background: #34495e;
    border-left-color: #0ea5e9;
}

.sidebar-nav .submenu .icon {
    font-size: 12px;
    margin-right: 8px;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    background: #1a252f;
    border-top: 1px solid #34495e;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #0ea5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
}

.user-details {
    flex: 1;
}

.user-details .name {
    font-weight: 600;
    font-size: 14px;
}

.user-details .email {
    font-size: 12px;
    color: #7f8c8d;
}

.logout-btn {
    display: block;
    text-align: center;
    padding: 8px;
    background: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #c0392b;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.page-header h1 {
    font-size: 28px;
    color: #2c3e50;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 18px;
    color: #2c3e50;
}

.card-body {
    padding: 20px;
}

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 24px;
}

.stat-icon.blue { background: #e3f2fd; color: #1976d2; }
.stat-icon.green { background: #e8f5e9; color: #388e3c; }
.stat-icon.orange { background: #fff3e0; color: #f57c00; }
.stat-icon.red { background: #ffebee; color: #d32f2f; }

.stat-info h3 {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.stat-info .value {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    min-height: 48px; /* Increased height for better touch targeting */
}

.form-control:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Ensure select elements have proper height */
.form-control.select-enhanced {
    height: 48px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Password toggle button */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .form-control {
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px 8px;
    font-size: 14px;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #0ea5e9;
}

.toggle-password:focus {
    outline: none;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: #0ea5e9;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #219a52;
}

.btn-info {
    background: #17a2b8;
    color: white !important;
}

.btn-info:hover {
    background: #138496;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

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

.btn .icon {
    margin-right: 8px;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.data-table .actions {
    white-space: nowrap;
}

.data-table .actions a {
    display: inline-block;
    margin-right: 10px;
    color: #0ea5e9;
    text-decoration: none;
}

.data-table .actions a:hover {
    text-decoration: underline;
}

.data-table .actions .delete {
    color: #e74c3c;
}

/* Mobile card view for tables */
@media (max-width: 768px) {
    .table-container {
        overflow-x: visible;
    }

    .data-table {
        display: block;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody tr {
        display: block;
        margin-bottom: 15px;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .data-table tbody td {
        display: block;
        padding: 8px 0;
        border: none;
        text-align: left;
    }

    .data-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 4px;
        color: #2c3e50;
        text-transform: uppercase;
        font-size: 11px;
        letter-spacing: 0.5px;
    }

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

    .data-table tbody td.actions {
        text-align: left;
        padding-top: 12px;
    }

    .data-table tbody td.actions a {
        display: inline-block;
        margin: 5px 10px 5px 0;
    }
}

/* Touch-friendly targets for mobile */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
        padding: 10px 16px;
    }

    .btn-sm {
        min-height: 40px;
        padding: 8px 14px;
    }

    .sidebar-nav a {
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .sidebar-nav .submenu a {
        min-height: 44px;
    }

    .form-control {
        min-height: 48px; /* Increased height for better touch targeting on mobile */
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .data-table .actions a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 8px 12px;
    }

    .mobile-menu-toggle {
        min-height: 44px;
        min-width: 44px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    textarea.form-control {
        font-size: 16px;
    }
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-draft { background: #ecf0f1; color: #7f8c8d; }
.badge-sent { background: #e3f2fd; color: #1976d2; }
.badge-paid { background: #e8f5e9; color: #388e3c; }
.badge-overdue { background: #ffebee; color: #d32f2f; }
.badge-cancelled { background: #f5f5f5; color: #9e9e9e; }

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Search and Filter */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Invoice specific styles */
.invoice-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.invoice-company h2 {
    color: #0ea5e9;
    font-size: 24px;
}

.invoice-details {
    text-align: right;
}

.invoice-details h3 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.invoice-details p {
    color: #7f8c8d;
}

.invoice-client {
    margin-bottom: 30px;
}

.invoice-client h4 {
    color: #7f8c8d;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.invoice-client p {
    font-size: 16px;
    line-height: 1.6;
}

.invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.invoice-items-table th,
.invoice-items-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.invoice-items-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.invoice-items-table .text-right {
    text-align: right;
}

.invoice-summary {
    margin-left: auto;
    width: 300px;
}

.invoice-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.invoice-summary-row.total {
    font-size: 20px;
    font-weight: 700;
    border-top: 2px solid #2c3e50;
    border-bottom: none;
    padding-top: 15px;
}

.invoice-notes {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.invoice-notes h4 {
    margin-bottom: 10px;
}

/* Print styles */
@media print {
    .sidebar,
    .btn,
    .actions,
    .no-print,
    .card-header,
    .page-header,
    form[method="GET"] {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        padding: 0;
    }

    .invoice-section,
    .card {
        box-shadow: none;
        border: none;
    }

    .card-body {
        padding: 0;
    }

    body {
        background: white;
    }

    /* Ensure statement content is visible */
    .statement-header,
    .statement-customer,
    .statement-summary,
    .data-table {
        display: block !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }

    .main-content {
        margin-left: 0;
    }

    .app-container {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

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

/* Line item add/remove */
.line-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

/* Luxury Dashboard Design */
.luxury-dashboard {
    background-color: #faf9f8;
    min-height: 100vh;
    padding: 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid #eee;
    background-color: white;
    margin-bottom: 0;
}

.dashboard-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dashboard-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    letter-spacing: -0.5px;
}

.dashboard-action-btn {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    border: none;
    cursor: pointer;
}

.dashboard-action-btn.quote-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.dashboard-action-btn.quote-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.dashboard-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.dashboard-action-btn .btn-text {
    margin-right: 8px;
}

.dashboard-action-btn .btn-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.dashboard-action-btn:hover .btn-icon {
    transform: translateX(4px);
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin: 30px;
    padding: 0 15px;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 28px 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: none;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #667eea, #764ba2);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.stat-card.invoices-card::before {
    background: linear-gradient(to bottom, #667eea, #764ba2);
}

.stat-card.revenue-card::before {
    background: linear-gradient(to bottom, #11998e, #38ef7d);
}

.stat-card.outstanding-card::before {
    background: linear-gradient(to bottom, #f093fb, #f5576c);
}

.stat-card.overdue-card::before {
    background: linear-gradient(to bottom, #ff9a9e, #fecfef);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 22px;
}

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

.stat-card.invoices-card .stat-icon {
    background: rgba(102, 126, 234, 0.1);
}

.stat-card.revenue-card .stat-icon {
    background: rgba(17, 153, 142, 0.1);
}

.stat-card.outstanding-card .stat-icon {
    background: rgba(240, 147, 251, 0.1);
}

.stat-card.overdue-card .stat-icon {
    background: rgba(255, 154, 158, 0.1);
}

.stat-content {
    text-align: left;
}

.stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

/* Dashboard Main Content */
.dashboard-main {
    margin: 0 30px 30px;
}

.activity-section {
    background: white;
    border-radius: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

.section-header {
    padding: 24px 30px;
    border-bottom: 1px solid #f0f0f0;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.section-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.activity-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 18px 20px;
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    color: #334155;
}

.tab-btn.active {
    color: #1e293b;
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.tab-content {
    display: none;
    padding: 24px 30px;
}

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

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

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #f8f9fa;
}

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

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    margin-bottom: 4px;
}

.activity-title a {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    display: block;
}

.activity-title a:hover {
    color: #667eea;
}

.activity-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
    color: #64748b;
}

.customer-name,
.customer-email,
.customer-phone,
.invoice-amount {
    display: block;
}

.activity-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.status-badge {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.draft {
    background: #e2e8f0;
    color: #64748b;
}

.status-badge.sent {
    background: #dbeafe;
    color: #2563eb;
}

.status-badge.paid {
    background: #dcfce7;
    color: #16a34a;
}

.status-badge.overdue {
    background: #fee2e2;
    color: #dc2626;
}

.time {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #94a3b8;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-message {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #64748b;
    margin-bottom: 16px;
}

.empty-link {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.empty-link:hover {
    text-decoration: underline;
}

/* Chart Section */
.chart-section {
    background: white;
    border-radius: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
    margin: 30px;
}

.chart-section .section-header {
    padding: 24px 30px;
    border-bottom: 1px solid #f0f0f0;
}

.chart-section .section-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.chart-section .section-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.chart-container {
    padding: 24px 30px 30px;
}

.chart-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    min-height: 180px;
}

.chart-bar {
    flex: 1;
    position: relative;
    width: 100%;
    max-width: 80px;
}

.chart-bar-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--height);
    background: linear-gradient(to top, #667eea, #764ba2);
    border-radius: 8px 8px 0 0;
    transition: height 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chart-bar-label {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 12px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.chart-bar-label.chart-value {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    display: block;
    margin-bottom: 2px;
}

.chart-bar-label.chart-month {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Animate chart bars on load */
.chart-bar:nth-child(1) .chart-bar-fill {
    transition-delay: var(--delay, 0s);
}

.chart-bar:nth-child(2) .chart-bar-fill {
    transition-delay: var(--delay, 0s);
}

.chart-bar:nth-child(3) .chart-bar-fill {
    transition-delay: var(--delay, 0s);
}

.chart-bar:nth-child(4) .chart-bar-fill {
    transition-delay: var(--delay, 0s);
}

.chart-bar:nth-child(5) .chart-bar-fill {
    transition-delay: var(--delay, 0s);
}

.chart-bar:nth-child(6) .chart-bar-fill {
    transition-delay: var(--delay, 0s);
}

/* Loaded state - show labels */
.chart-bars.loaded .chart-bar-label {
    opacity: 1;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 20px 24px;
    }

    .dashboard-actions {
        gap: 8px;
    }

    .dashboard-title {
        font-size: 24px;
    }

    .dashboard-action-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .stats-grid {
        margin: 20px;
        gap: 16px;
    }

    .stat-card {
        padding: 24px 20px;
    }

    .stat-value {
        font-size: 28px;
    }

    .dashboard-main {
        margin: 0 20px 20px;
    }

    .section-header {
        padding: 20px 24px;
    }

    .section-title {
        font-size: 20px;
    }

    .activity-section {
        border-radius: 20px;
    }

    .activity-list {
        gap: 12px;
    }

    .activity-item {
        padding: 12px 0;
    }

    .activity-title a {
        font-size: 15px;
    }

    .activity-details {
        font-size: 13px;
        gap: 8px;
    }

    .status-badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .time {
        font-size: 11px;
    }

    .chart-section {
        margin: 20px;
        border-radius: 20px;
    }

    .chart-section .section-header {
        padding: 20px 24px;
    }

    .chart-section .section-title {
        font-size: 20px;
    }

    .chart-container {
        padding: 20px 24px 24px;
    }

    .chart-bars {
        gap: 12px;
        min-height: 150px;
    }

    .chart-bar {
        max-width: 60px;
    }

    .chart-bar-label.chart-value {
        font-size: 12px;
    }

    .chart-bar-label.chart-month {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        margin: 15px;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .dashboard-actions {
        flex-direction: column;
        width: 100%;
    }

    .dashboard-action-btn {
        align-self: stretch;
        justify-content: center;
    }

    .activity-section,
    .chart-section {
        margin: 15px;
    }
}

.line-item input,
.line-item select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.remove-item {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.add-item-btn {
    margin-top: 10px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state h3 {
    color: #7f8c8d;
    margin-bottom: 10px;
}

.empty-state p {
    color: #95a5a6;
    margin-bottom: 20px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #0ea5e9;
}

.pagination a:hover {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
}

.pagination .current {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
}

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

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
    background: #0ea5e9;
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: background 0.3s;
}

.mobile-menu-toggle:hover {
    background: #5568d3;
}

/* Enhanced responsive breakpoints */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 260px;
        height: 100vh;
        z-index: 999;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .page-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 15px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .btn-sm {
        padding: 5px 10px;
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 10px;
    }

    .page-header h1 {
        font-size: 22px;
    }

    .card-header h2 {
        font-size: 16px;
    }

    .mobile-menu-toggle {
        top: 10px;
        left: 10px;
        padding: 8px 10px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-left: 220px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
