/* Expense Tracker Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #2c3e50;
    color: white;
    position: relative;
}

.nav-brand h1 {
    margin: 0;
    font-size: 1.5rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: #34495e;
}

.logout-link {
    background-color: #e74c3c;
    margin-left: 1rem;
}

.logout-link:hover {
    background-color: #c0392b;
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: ' ▼';
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #2c3e50;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-group textarea {
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.875rem;
}

/* Auth Forms */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.auth-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
}

.auth-link a {
    color: #3498db;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard h2 {
    margin-bottom: 2rem;
    color: #2c3e50;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.dashboard-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dashboard-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.dashboard-card p {
    margin-bottom: 1rem;
    color: #666;
}

/* Upload */
.upload-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.upload-container h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert ul {
    margin: 0;
    padding-left: 1.5rem;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #2c3e50;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-link {
        padding: 1rem;
        border-bottom: 1px solid #34495e;
        border-radius: 0;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .logout-link {
        margin-left: 0;
        background-color: #e74c3c;
    }
    
    /* Mobile dropdown adjustments */
    .nav-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: #34495e;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-dropdown.active .dropdown-menu {
        max-height: 300px;
    }
    
    .dropdown-item {
        color: white;
        border-bottom: 1px solid #2c3e50;
        padding: 0.75rem 2rem;
    }
    
    .dropdown-item:hover {
        background-color: #2c3e50;
        color: white;
    }
    
    .dropdown-toggle::after {
        content: ' ▼';
        transition: transform 0.3s ease;
    }
    
    .nav-dropdown.active .dropdown-toggle::after {
        transform: rotate(180deg);
    }
    
    .container {
        padding: 10px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
/* Card Management Styles */
.cards-management {
    max-width: 1000px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #666;
    margin: 0;
}

.page-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.card-form-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.card-form-section h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.card-form {
    max-width: 500px;
}

.cards-list-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cards-list-section h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    background: #fafafa;
    transition: box-shadow 0.3s;
}

.card-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header h4 {
    color: #2c3e50;
    margin: 0;
}

.card-type {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
}

.card-type-credit {
    background-color: #e8f5e8;
    color: #2e7d32;
}

.card-type-debit {
    background-color: #e3f2fd;
    color: #1565c0;
}

.card-info {
    margin-bottom: 1rem;
}

.card-info p {
    margin: 0;
    color: #666;
    font-size: 0.875rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem 2rem;
}

.modal form {
    padding: 1.5rem 2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Responsive Card Management */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal form {
        padding: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

/* Upload Form Styles */
.upload-form-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.file-input-container {
    position: relative;
}

.file-input-help {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

.card-selection {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    background: #fafafa;
}

.radio-group {
    margin-bottom: 1rem;
}

.radio-group input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
}

.radio-group label {
    display: inline;
    font-weight: 500;
    cursor: pointer;
}

.card-select-container {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.new-card-container {
    margin-left: 1.5rem;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: white;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

.form-col {
    display: flex;
    flex-direction: column;
}

.input-help {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}

.info-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
}

.info-box h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.info-box ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.info-box li {
    margin-bottom: 0.5rem;
}

.info-box .note {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #e3f2fd;
    border-radius: 4px;
    font-size: 0.875rem;
}

.btn-loading {
    display: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Upload Form Responsive */
@media (max-width: 768px) {
    .upload-form-container {
        padding: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .card-select-container,
    .new-card-container {
        margin-left: 0;
    }
    
    .info-box {
        padding: 1rem;
    }
}
/* File Format Information Styles */
.format-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-left: 4px solid #3498db;
    background: #f8f9fa;
}

.format-section h5 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
}

.format-section p {
    margin-bottom: 0.5rem;
}

.format-section ul {
    margin: 0.5rem 0 1rem 1rem;
}

.format-section em {
    color: #666;
    font-size: 0.9rem;
}
/* Info message styles */
.info-message {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.info-message p {
    margin: 0;
    color: #1565c0;
}
/* Transaction List Styles */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.page-description {
    color: #666;
    margin: 0;
}

.filter-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
    flex: 1;
}

.filter-group label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
    font-size: 0.9rem;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: end;
}

.transaction-summary {
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.summary-main {
    flex: 1;
}

.expense-totals {
    text-align: right;
}

.totals-text {
    font-size: 0.8rem;
    color: #2c3e50;
    font-weight: 500;
    background: #ecf0f1;
    padding: 4px 8px;
    border-radius: 4px;
    border-left: 3px solid #e74c3c;
}

.transactions-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.transactions-table-wrapper {
    overflow-x: auto;
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.transactions-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
    font-size: 0.9rem;
    color: #495057;
}

.transactions-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top;
    font-size: 0.9rem;
}

.transaction-row:hover {
    background-color: #f8f9fa;
}

.transaction-row:last-child td {
    border-bottom: none;
}

/* Transaction type styling */
.transaction-expense {
    color: #dc3545;
}

.transaction-income {
    color: #28a745;
}

.transaction-payment {
    color: #007bff;
}

.transaction-transfer {
    color: #6c757d;
}

.transaction-transfer-out {
    color: #fd7e14; /* Orange for outgoing transfers */
}

.transaction-transfer-in {
    color: #20c997; /* Teal for incoming transfers */
}

.transaction-type {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}

.type-indicator {
    font-size: 16px;
    font-weight: bold;
    width: 20px;
    text-align: center;
}

.type-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.transaction-date {
    white-space: nowrap;
    font-weight: 500;
    color: #495057;
}

.transaction-description {
    max-width: 250px;
    word-wrap: break-word;
    line-height: 1.4;
}

.transaction-amount {
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
}

.amount {
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
}

.currency {
    font-size: 11px;
    color: #666;
    margin-left: 5px;
    font-weight: normal;
}

.transaction-category {
    min-width: 120px;
}

.category-badge {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    display: inline-block;
    color: #495057;
}

.uncategorized {
    color: #6c757d;
    font-style: italic;
    font-size: 11px;
}

.transaction-card {
    min-width: 120px;
}

.card-name {
    font-weight: 500;
    display: block;
    color: #495057;
}

.card-type {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
}

.transaction-source {
    min-width: 120px;
}

.source-file {
    font-size: 11px;
    color: #666;
    max-width: 120px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #333;
    font-weight: 500;
}

.empty-state a {
    color: #3498db;
    text-decoration: none;
}

.empty-state a:hover {
    text-decoration: underline;
}

/* Responsive design for transactions */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .filter-actions {
        justify-content: center;
        margin-top: 10px;
    }
    
    .transactions-table-wrapper {
        font-size: 12px;
    }
    
    .transactions-table th,
    .transactions-table td {
        padding: 8px 6px;
    }
    
    .transaction-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .expense-totals {
        text-align: left;
        width: 100%;
    }
    
    .transaction-description {
        max-width: 150px;
    }
    
    .type-label {
        display: none;
    }
    
    .card-type {
        display: none;
    }
}

@media (max-width: 480px) {
    .transactions-table {
        min-width: 600px;
    }
    
    .transactions-table th:nth-child(7),
    .transactions-table td:nth-child(7) {
        display: none; /* Hide source file column on very small screens */
    }
}
/* Category editing styles */
.category-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-edit-category {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 2px 4px;
    border-radius: 3px;
}

.btn-edit-category:hover {
    opacity: 1;
    background: #f8f9fa;
}

/* Modal improvements for category editing */
.modal .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.modal .form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Responsive adjustments for category editing */
@media (max-width: 768px) {
    .btn-edit-category {
        font-size: 14px;
    }
    
    .category-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .transactions-table th:nth-child(7),
    .transactions-table td:nth-child(7) {
        display: none; /* Hide source file column on very small screens */
    }
    
    .btn-edit-category {
        display: inline-block; /* Keep edit button in category column */
    }
}
/* Pagination Styles */
.pagination-container {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-btn {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: all 0.2s;
}

.pagination-btn:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination-info {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

.pagination-jump {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-jump-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-jump-form label {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

.page-jump-input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.page-jump-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        text-align: center;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .page-jump-form {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .pagination-btn {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    .pagination-first,
    .pagination-last {
        display: none; /* Hide First/Last buttons on very small screens */
    }
}

/* Habits Management Styles */
.habits-management {
    max-width: 1000px;
    margin: 0 auto;
}

.habit-form-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.habit-form-section h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.habit-form {
    max-width: 500px;
}

.habits-list-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.habits-list-section h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.habits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.habit-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    background: #fafafa;
    transition: box-shadow 0.3s;
}

.habit-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.habit-item.inactive {
    opacity: 0.7;
    background: #f5f5f5;
}

.habit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.habit-header h4 {
    color: #2c3e50;
    margin: 0;
}

.habit-category {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.habit-category-espiritual { background-color: #e8f5e8; color: #2e7d32; }
.habit-category-amoroso { background-color: #fce4ec; color: #c2185b; }
.habit-category-economico { background-color: #e3f2fd; color: #1565c0; }
.habit-category-intelectual { background-color: #fff3e0; color: #f57c00; }
.habit-category-autocuidado { background-color: #e8f5e8; color: #388e3c; }
.habit-category-creativo { background-color: #f3e5f5; color: #7b1fa2; }
.habit-category-social { background-color: #e0f2f1; color: #00695c; }

.habit-info {
    margin-bottom: 1rem;
}

.habit-info p {
    margin: 0.25rem 0;
    color: #666;
    font-size: 0.875rem;
}

.habit-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Responsive Habits Management */
@media (max-width: 768px) {
    .habits-grid {
        grid-template-columns: 1fr;
    }
    
    .habit-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .habit-actions {
        flex-direction: column;
    }
}
/* Memory Management Styles */
.memory-management {
    max-width: 1200px;
    margin: 0 auto;
}

.search-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.search-section h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.search-form {
    max-width: 100%;
}

.search-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto auto;
    gap: 1rem;
    align-items: end;
}

.search-input,
.filter-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.person-form-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.person-form-section h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.person-form {
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
}

.people-list-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.people-list-section h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.person-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    background: #fafafa;
    transition: box-shadow 0.3s;
}

.person-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.person-header {
    margin-bottom: 1rem;
}

.person-header h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.person-link {
    color: #2c3e50;
    text-decoration: none;
}

.person-link:hover {
    color: #3498db;
    text-decoration: underline;
}

.person-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.relationship-badge,
.importance-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.relationship-familia { background-color: #e8f5e8; color: #2e7d32; }
.relationship-amigo { background-color: #e3f2fd; color: #1565c0; }
.relationship-colega { background-color: #fff3e0; color: #f57c00; }
.relationship-pareja { background-color: #fce4ec; color: #c2185b; }
.relationship-conocido { background-color: #f3e5f5; color: #7b1fa2; }
.relationship-profesional { background-color: #e0f2f1; color: #00695c; }
.relationship-otro { background-color: #f5f5f5; color: #666; }

.importance-alto { background-color: #ffebee; color: #c62828; }
.importance-medio { background-color: #fff8e1; color: #f57f17; }
.importance-bajo { background-color: #e8f5e8; color: #2e7d32; }

.person-info {
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.info-label {
    color: #666;
    font-weight: 500;
}

.info-value {
    color: #333;
}

.info-value.no-contact {
    color: #999;
    font-style: italic;
}

.person-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Person Detail Styles */
.person-detail {
    max-width: 1000px;
    margin: 0 auto;
}

.header-content {
    flex: 1;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.person-content {
    display: grid;
    gap: 2rem;
}

.person-summary {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.person-summary h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.summary-label {
    font-weight: 500;
    color: #666;
}

.summary-value {
    font-weight: 600;
    color: #2c3e50;
}

.notes-section,
.interactions-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    margin: 0;
    color: #2c3e50;
}

.note-type-section {
    margin-bottom: 2rem;
}

.note-type-header {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
    text-transform: capitalize;
}

.notes-list {
    display: grid;
    gap: 1rem;
}

.note-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    margin-bottom: 1rem;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.note-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.note-type-preferencias { background-color: #e3f2fd; color: #1565c0; }
.note-type-preocupaciones { background-color: #fff3e0; color: #f57c00; }
.note-type-frases { background-color: #f3e5f5; color: #7b1fa2; }
.note-type-sensibilidades { background-color: #fce4ec; color: #c2185b; }
.note-type-intereses { background-color: #e8f5e8; color: #2e7d32; }
.note-type-metas { background-color: #e0f2f1; color: #00695c; }
.note-type-recuerdos { background-color: #fff9c4; color: #f57f17; }
.note-type-otro { background-color: #f5f5f5; color: #616161; }

.note-content {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.note-date {
    color: #666;
    font-size: 0.875rem;
}

.note-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e0e0e0;
}

.btn-link {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.875rem;
}

.btn-link:hover {
    color: #2980b9;
}

.btn-link.btn-danger {
    color: #e74c3c;
}

.btn-link.btn-danger:hover {
    color: #c0392b;
}

.interactions-timeline {
    display: grid;
    gap: 1rem;
}

.interaction-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #95a5a6;
}

.interaction-item.significant {
    border-left-color: #f39c12;
    background: #fef9e7;
}

.interaction-date {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.significant-badge {
    background-color: #f39c12;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.interaction-content {
    margin-bottom: 0.75rem;
}

.type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.type-llamada { background-color: #e3f2fd; color: #1565c0; }
.type-reunion { background-color: #e8f5e8; color: #2e7d32; }
.type-mensaje { background-color: #fff3e0; color: #f57c00; }
.type-email { background-color: #f3e5f5; color: #7b1fa2; }
.type-social { background-color: #fce4ec; color: #c2185b; }
.type-otro { background-color: #f5f5f5; color: #666; }

.interaction-description {
    color: #555;
    line-height: 1.5;
}

.interaction-actions {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
}

/* Responsive Memory Management */
@media (max-width: 768px) {
    .search-row {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .people-grid {
        grid-template-columns: 1fr;
    }
    
    .person-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .person-actions {
        flex-direction: column;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .note-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .interaction-date {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}
/* Add Button Styling */
.btn-add {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1;
}

.page-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Responsive page actions */
@media (max-width: 768px) {
    .page-actions {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .btn-add {
        justify-content: center;
    }
}
/* User Dropdown Styling */
.user-dropdown .dropdown-toggle {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.5rem 1rem;
}

.user-dropdown .dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.user-dropdown .dropdown-menu {
    right: 0;
    left: auto;
    min-width: 150px;
}

/* Enhanced Dashboard Styling */
.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
}

.dashboard-header h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.module-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #3498db;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.habits-card {
    border-left-color: #27ae60;
}

.memory-card {
    border-left-color: #e74c3c;
}

.economy-card {
    border-left-color: #f39c12;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.card-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.4rem;
}

.card-stats {
    text-align: right;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.card-description {
    color: #5a6c7d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.card-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.card-actions .btn {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.card-submenu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    text-decoration: none;
    color: #5a6c7d;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    font-size: 0.85rem;
}

.submenu-item:hover {
    background-color: #f8f9fa;
    color: #2c3e50;
}

.submenu-icon {
    font-size: 1rem;
}

/* Responsive Dashboard */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .module-card {
        padding: 1.5rem;
    }
    
    .card-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .card-stats {
        text-align: left;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .card-submenu {
        grid-template-columns: 1fr;
    }
    
    .user-dropdown .dropdown-menu {
        right: 0;
        left: auto;
    }
}

@media (max-width: 480px) {
    .dashboard-header {
        margin-bottom: 2rem;
    }
    
    .dashboard-header h2 {
        font-size: 1.5rem;
    }
    
    .dashboard-header p {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}
/* Enhanced Empty State Styling */
.empty-state-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 2rem;
}

.empty-state-content {
    text-align: center;
    max-width: 500px;
    background: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 2px dashed #e0e0e0;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.empty-state-content h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.empty-state-content > p {
    color: #7f8c8d;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.empty-state-actions {
    margin-bottom: 2rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.empty-state-help {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: left;
    border-left: 4px solid #3498db;
}

.empty-state-help p {
    margin-bottom: 0.5rem;
    color: #5a6c7d;
}

.empty-state-help strong {
    color: #2c3e50;
}

.habit-examples-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.habit-examples-list li {
    padding: 0.5rem 0;
    color: #5a6c7d;
    border-bottom: 1px solid #ecf0f1;
}

.habit-examples-list li:last-child {
    border-bottom: none;
}

/* Responsive Empty State */
@media (max-width: 768px) {
    .empty-state-container {
        min-height: 300px;
        padding: 1rem;
    }
    
    .empty-state-content {
        padding: 2rem 1.5rem;
    }
    
    .empty-state-icon {
        font-size: 3rem;
    }
    
    .empty-state-content h3 {
        font-size: 1.3rem;
    }
    
    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .empty-state-content {
        padding: 1.5rem 1rem;
    }
    
    .empty-state-help {
        padding: 1rem;
    }
    
    .btn-large {
        width: 100%;
        justify-content: center;
    }
}