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

:root {
    --primary-green: #2d8659;
    --dark-green: #1f5f3f;
    --light-green: #4caf50;
    --primary-black: #1a1a1a;
    --secondary-black: #2d2d2d;
    --primary-orange: #ff8c42;
    --light-orange: #ffab73;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --border-gray: #e0e0e0;
    --text-gray: #666666;
    --danger-red: #e74c3c;
    --info-blue: #3498db;
    --success-green: #27ae60;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-gray);
    color: var(--primary-black);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: var(--white);
    padding: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: white;
    padding: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.logo-text h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 2px;
}

.logo-text p {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 300;
}

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

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

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

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

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

.btn-secondary:hover {
    background-color: var(--primary-black);
}

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

.btn-info:hover {
    background-color: #2980b9;
}

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

.btn-success:hover {
    background-color: #229954;
}

.btn-users {
    background-color: #9b59b6;
    color: var(--white);
}

.btn-users:hover {
    background-color: #8e44ad;
}

.btn-logout {
    background-color: #e74c3c;
    color: var(--white);
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.user-info i {
    font-size: 18px;
}

.btn-danger {
    background-color: var(--danger-red);
    color: var(--white);
    padding: 8px 16px;
    font-size: 12px;
}

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

/* Main Content */
.main-content {
    padding: 40px 0;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--white);
}

.card-green .card-icon {
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
}

.card-red .card-icon {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.card-blue .card-icon {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.card-orange .card-icon {
    background: linear-gradient(135deg, var(--primary-orange), var(--light-orange));
}

.card-content h3 {
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 500;
    margin-bottom: 8px;
}

.card-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-black);
}

/* Bulk Actions Bar */
.bulk-actions {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.bulk-actions .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.bulk-actions .btn-danger {
    background: #dc3545;
    color: white;
}

.bulk-actions .btn-danger:hover {
    background: #c82333;
}

.bulk-actions .btn-secondary {
    background: #6c757d;
    color: white;
}

.bulk-actions .btn-secondary:hover {
    background: #5a6268;
}

/* Filters */
.filters-section {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-black);
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group label i {
    color: var(--primary-green);
}

.filter-group select,
.filter-group input[type="date"] {
    padding: 10px 14px;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    font-size: 14px;
    background-color: var(--white);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-group select:focus,
.filter-group input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(45, 134, 89, 0.1);
}

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

/* Chart Section */
.chart-section {
    margin-bottom: 40px;
}

.chart-container {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-container h2 {
    margin-bottom: 20px;
    color: var(--primary-black);
    font-size: 24px;
}

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

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Transactions Section */
.transactions-section {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.transactions-section h2 {
    margin-bottom: 20px;
    color: var(--primary-black);
    font-size: 24px;
}

.transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.rows-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rows-per-page label {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-black);
}

.rows-per-page input[type="number"] {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    font-size: 14px;
    background-color: var(--white);
    transition: border-color 0.3s ease;
}

.rows-per-page input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-green);
}

.table-wrapper {
    overflow-x: auto;
}

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

.transactions-table thead {
    background-color: var(--primary-green);
    color: var(--white);
}

.transactions-table th {
    padding: 14px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.transactions-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border-gray);
    font-size: 14px;
}

.transactions-table tbody tr:hover {
    background-color: var(--light-gray);
}

.transactions-table tfoot {
    background-color: #f0f0f0;
    border-top: 3px solid var(--primary-green);
    font-weight: 700;
}

.transactions-table tfoot td {
    padding: 16px 14px;
    border-bottom: none;
    font-size: 15px;
}

.transaction-type {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.transaction-type.entry {
    background-color: #d4edda;
    color: #155724;
}

.transaction-type.expense {
    background-color: #f8d7da;
    color: #721c24;
}

.amount-positive {
    color: var(--success-green);
    font-weight: 600;
}

.amount-negative {
    color: var(--danger-red);
    font-weight: 600;
}

/* Totals Row */
.totals-row {
    background-color: var(--light-gray);
    border-top: 3px solid var(--primary-green);
    font-weight: 700;
}

.totals-row td {
    padding: 16px 14px !important;
    border-bottom: none !important;
    background-color: #f9f9f9;
}

.totals-row:hover {
    background-color: var(--light-gray) !important;
}

.totals-breakdown {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.totals-breakdown span {
    display: block;
}

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

.pagination button {
    padding: 8px 16px;
    border: 2px solid var(--border-gray);
    background-color: var(--white);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background-color: var(--primary-green);
    color: var(--white);
    border-color: var(--primary-green);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination span {
    font-size: 14px;
    color: var(--text-gray);
}

/* Modal */
/* Modal Styles - Beautiful & Modern */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    overflow-y: auto;
    padding: 20px;
}

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

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Beautiful gradient header for Entry */
.modal-content[data-type="entry"] .modal-header {
    background: linear-gradient(135deg, #2d8659 0%, #27ae60 100%);
}

/* Beautiful gradient header for Expense */
.modal-content[data-type="expense"] .modal-header {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    background: linear-gradient(135deg, #2d8659 0%, #27ae60 100%);
    color: white;
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
}

.modal-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.modal-header h2 i {
    font-size: 28px;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

.modal-body {
    padding: 35px 30px 25px;
    background: white;
}

/* Remove default form padding/margin */
#transactionForm {
    margin: 0;
    padding: 0;
}

#transactionForm .modal-body {
    padding: 35px 30px 25px;
}

/* Beautiful Form Styles */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 15px;
    color: #2c3e50;
}

.form-group label i {
    color: #2d8659;
    font-size: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: #f8f9fa;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2d8659;
    background: white;
    box-shadow: 0 0 0 4px rgba(45, 134, 89, 0.1);
}

.form-group input[type="number"] {
    font-size: 18px;
    font-weight: 600;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 25px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e0e6ed;
}

.form-actions .btn {
    min-width: 120px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.form-actions .btn-secondary {
    background: #95a5a6;
    border: 2px solid transparent;
}

.form-actions .btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.form-actions .btn-primary {
    background: linear-gradient(135deg, #2d8659 0%, #27ae60 100%);
    box-shadow: 0 4px 15px rgba(45, 134, 89, 0.3);
}

.form-actions .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(45, 134, 89, 0.4);
    transform: translateY(-2px);
}

/* Import Preview */
.import-preview {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--light-gray);
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.import-preview pre {
    font-size: 12px;
    color: var(--primary-black);
}

/* Daily Statement Styles */
.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: var(--white);
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #20BA5A 0%, #0E7A6B 100%);
    transform: translateY(-2px);
}

.daily-statement-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 3px solid var(--primary-color);
}

.statement-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--primary-color);
    margin-bottom: 20px;
}

.statement-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 4px solid var(--primary-color);
    padding: 5px;
    background: white;
}

.statement-header h2 {
    font-size: 26px;
    color: var(--primary-color);
    margin: 10px 0 5px 0;
    font-weight: 700;
}

.statement-subtitle {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 500;
}

.statement-date {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.statement-date i {
    font-size: 20px;
}

.statement-summary {
    margin: 25px 0;
}

.summary-row {
    display: flex;
    align-items: center;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.summary-entries {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 5px solid #28a745;
}

.summary-expenses {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left: 5px solid #dc3545;
}

.summary-balance {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-left: 5px solid #17a2b8;
}

.summary-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-right: 15px;
}

.summary-entries .summary-icon {
    background: #28a745;
    color: white;
}

.summary-expenses .summary-icon {
    background: #dc3545;
    color: white;
}

.summary-balance .summary-icon {
    background: #17a2b8;
    color: white;
}

.summary-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.summary-label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-black);
}

.statement-details {
    margin: 25px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.statement-details h3 {
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}

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

.detail-type {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.detail-type i {
    font-size: 16px;
}

.detail-type.entry {
    color: #28a745;
}

.detail-type.expense {
    color: #dc3545;
}

.detail-amount {
    font-weight: 700;
    font-size: 16px;
}

.statement-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
    margin-top: 20px;
    color: #6c757d;
    font-size: 13px;
}

.statement-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.statement-actions .btn {
    flex: 1;
    min-width: 150px;
}

/* Responsive for Statement */
@media (max-width: 768px) {
    .daily-statement-card {
        padding: 20px;
    }

    .statement-logo {
        width: 60px;
        height: 60px;
    }

    .statement-header h2 {
        font-size: 20px;
    }

    .summary-value {
        font-size: 20px;
    }

    .statement-actions {
        flex-direction: column;
    }

    .statement-actions .btn {
        width: 100%;
    }
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

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

.spinner {
    border: 4px solid var(--border-gray);
    border-top: 4px solid var(--primary-orange);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: var(--white);
    margin-top: 20px;
    font-size: 18px;
}

/* Responsive Design */
/* ============================================
   RESPONSIVE DESIGN - Mobile & Tablet
============================================ */

/* Tablet Styles (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .transactions-table {
        font-size: 13px;
    }
    
    .chart-wrapper {
        height: 320px;
    }
}

/* Mobile Styles (max-width: 768px) */
@media (max-width: 768px) {
    /* Header */
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .logo-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo-section img {
        width: 50px;
        height: 50px;
    }
    
    .logo-text h1 {
        font-size: 20px;
    }
    
    .logo-text p {
        font-size: 12px;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 15px;
    }

    /* Dashboard Cards */
    .dashboard-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .card {
        padding: 20px;
        flex-direction: row;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
    }
    
    .card-icon i {
        font-size: 22px;
    }
    
    .card-value {
        font-size: 24px;
    }

    /* Filters */
    .filters-section {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .filter-group {
        min-width: 100%;
    }

    /* Chart */
    .chart-container {
        padding: 20px 15px;
    }
    
    .chart-container h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .chart-wrapper {
        height: 280px;
    }

    /* Table - Make scrollable on mobile */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .transactions-table {
        font-size: 12px;
        min-width: 800px; /* Allow horizontal scroll */
    }

    .transactions-table th,
    .transactions-table td {
        padding: 8px 6px;
        white-space: nowrap;
    }
    
    .transaction-type {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .transactions-table .btn-danger {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    /* Bulk Actions */
    .bulk-actions {
        flex-direction: column;
        padding: 12px 15px;
        gap: 10px;
    }
    
    .bulk-actions .btn {
        width: 100%;
    }

    /* Pagination */
    .pagination {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .pagination button {
        width: 100%;
    }

    /* Modal */
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        max-width: 100%;
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 22px;
    }
    
    .modal-header h2 i {
        font-size: 24px;
    }
    
    .close-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .modal-body {
        padding: 25px 20px 20px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 14px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .form-actions {
        flex-direction: column-reverse;
        padding: 20px;
        gap: 10px;
    }
    
    .form-actions .btn {
        width: 100%;
        min-width: auto;
    }

    /* Page Size Control */
    .page-size-control {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .page-size-control label {
        font-size: 13px;
    }
    
    .page-size-control input {
        max-width: 100px;
    }
}

/* Small Mobile Styles (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .main-content {
        padding: 20px 0;
    }
    
    .header-content {
        padding: 15px 0;
    }
    
    .card {
        padding: 16px;
        gap: 12px;
    }
    
    .card-icon {
        width: 45px;
        height: 45px;
    }
    
    .card-value {
        font-size: 20px;
    }
    
    .card-content h3 {
        font-size: 12px;
    }
    
    .chart-wrapper {
        height: 250px;
    }
    
    .modal-header {
        padding: 16px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 20px 16px;
    }
    
    .form-actions {
        padding: 16px;
    }
    
    .transactions-table {
        font-size: 11px;
    }
}

/* Landscape Mobile Styles */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .chart-wrapper {
        height: 220px;
    }
}
