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

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #f8f9fb;
    min-height: 100vh;
    padding: 0;
    color: #333;
    display: flex;
    flex-direction: column;
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: all;
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loader-text {
    font-size: 16px;
    color: #667eea;
    font-weight: 500;
    margin: 0;
}

/* Page Navigation */
.page {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    flex: 1;
}

.page.active {
    display: block;
    opacity: 1;
}

/* Auth Container */
.login-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -1;
}

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 48px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    max-width: 420px;
    width: 100%;
}

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 40px;
}

.auth-title {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 15px;
    color: #666;
    text-align: center;
    margin-bottom: 32px;
    font-weight: 500;
}

.auth-form {
    margin-bottom: 28px;
}

.auth-info {
    background: linear-gradient(135deg, #667eea08 0%, #764ba208 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
    line-height: 2;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.auth-info p {
    margin: 0;
    color: #555;
}

.auth-info i {
    margin-right: 6px;
    color: #667eea;
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    flex: 1;
}

/* Navbar */
.navbar {
    background: white;
    border-bottom: 1px solid #e8eef5;
    padding: 16px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand i {
    font-size: 24px;
    color: #667eea;
}

.navbar-social {
    display: flex;
    align-items: center;
    gap: 16px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f8f9fb;
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 18px;
}

.social-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.social-link.github:hover {
    background: #333;
}

.social-link.email:hover {
    background: #ea4343;
}

.social-link.linkedin:hover {
    background: #0a66c2;
}

.social-link.whatsapp:hover {
    background: #25d366;
}

.social-link.phone:hover {
    background: #667eea;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e8eef5;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Form Group */
.form-group {
    margin-bottom: 22px;
}

.label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #555;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* Input Fields */
.input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e8eef5;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
    background: white;
    min-height: 44px;
    font-family: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input::placeholder {
    color: #aaa;
}

/* Textarea */
.textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e8eef5;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
    background: white;
    font-family: 'Monaco', 'Courier New', monospace;
    resize: vertical;
    min-height: 120px;
    max-height: 300px;
    line-height: 1.6;
    font-weight: 400;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: #fafbff;
}

.textarea::placeholder {
    color: #aaa;
    font-weight: 400;
}

/* Buttons */
.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    font-weight: 700;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.35);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    width: 100%;
    font-weight: 700;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(17, 153, 142, 0.35);
}

.btn-secondary {
    background: #f0f2f8;
    color: #555;
    width: 100%;
    font-weight: 600;
}

.btn-secondary:hover:not(:disabled) {
    background: #e6eaf2;
}

.btn-logout {
    background: #f0f2f8;
    color: #555;
    width: auto;
    padding: 10px 16px;
    font-size: 13px;
}

.btn-logout:hover:not(:disabled) {
    background: #e6eaf2;
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    width: auto;
}

.btn-outline:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

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

.btn-full {
    width: 100%;
}

.btn-text {
    flex: 1;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Section Title */
.section-title {
    font-size: 20px;
    font-weight: 800;
    color: #333;
    margin-bottom: 28px;
    position: relative;
    padding-bottom: 12px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Preview Section */
.preview-section.hidden {
    display: none;
}

.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.preview-item {
    background: linear-gradient(135deg, #667eea08 0%, #764ba208 100%);
    padding: 14px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.preview-item:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.preview-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.preview-value {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    word-break: break-word;
}

/* Raw Message */
.raw-message {
    background: linear-gradient(135deg, #667eea08 0%, #764ba208 100%);
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.raw-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.raw-text {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: #555;
    line-height: 1.5;
    word-break: break-word;
    max-height: 100px;
    overflow-y: auto;
}

/* Preview Actions */
.preview-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

/* Edit Section */
.edit-section.hidden {
    display: none !important;
}

.edit-section {
    animation: slideDown 0.3s ease;
}

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

.edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.edit-grid .form-group {
    margin-bottom: 0;
}

.edit-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Summary Section */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
}

.summary-item {
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.summary-item:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.08);
    transform: translateY(-2px);
}

.summary-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 12px;
}

.summary-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Charts Section */
.charts-section {
    /* inherit from .card */
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.chart-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 0;
}

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

.chart-container.full-width {
    grid-column: 1 / -1;
}

.chart-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    text-align: center;
}

canvas {
    max-width: 100%;
}

/* Daily Expenses Section */
.daily-expenses-section {
    margin-bottom: 28px;
}

.daily-expenses-toolbar {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 16px;
    border: 2px solid #e8eef5;
    background: white;
    color: #667eea;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: #667eea;
    background: #f8f9fb;
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 10px 16px;
    font-size: 13px;
    min-height: 40px;
}

.daily-expenses-table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e8eef5;
    background: white;
}

.daily-expenses-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.daily-expenses-table thead {
    background: linear-gradient(135deg, #667eea08 0%, #764ba208 100%);
    border-bottom: 2px solid #e8eef5;
}

.daily-expenses-table th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 11px;
    white-space: nowrap;
}

.daily-expenses-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

.daily-expenses-table tbody tr:hover {
    background: #f8f9fb;
    transition: background 0.2s ease;
}

.daily-expenses-table tbody tr:last-child {
    border-bottom: none;
}

.daily-expenses-table tfoot {
    background: linear-gradient(135deg, #667eea08 0%, #764ba208 100%);
    border-top: 2px solid #e8eef5;
    font-weight: 700;
}

.daily-expenses-table tfoot td {
    padding: 14px 12px;
    border-bottom: none;
}

.daily-total-row {
    color: #667eea;
}

.daily-total-row strong {
    font-size: 15px;
}

.no-data {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 32px 12px !important;
}

/* Category and Type Badges */
.category-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #f0f0f0;
    color: #555;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.type-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.type-badge.debit {
    background: #FFE0E6;
    color: #FF6384;
}

.type-badge.credit {
    background: #E0F7F6;
    color: #4BC0C0;
}

/* Error Message */
.error-message {
    background: #fee;
    color: #c33;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    border-left: 3px solid #c33;
    font-size: 14px;
    animation: slideIn 0.3s ease;
}

.error-message.hidden {
    display: none;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    font-weight: 600;
    z-index: 1000;
    transition: bottom 0.3s ease;
    max-width: 90%;
}

.toast.show {
    bottom: 30px;
}

.toast.success {
    color: #11998e;
    border-left: 3px solid #11998e;
}

.toast.error {
    color: #c33;
    border-left: 3px solid #c33;
}

.toast.info {
    color: #667eea;
    border-left: 3px solid #667eea;
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid #e8eef5;
    padding: 48px 20px 24px;
    margin-top: auto;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 32px;
}

.footer-section h4 {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section h4 i {
    color: #667eea;
    font-size: 16px;
}

.footer-section p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    font-size: 14px;
    color: #666;
    padding: 6px 0;
    transition: color 0.3s ease;
}

.footer-section ul li:hover {
    color: #667eea;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #e8eef5;
    color: #999;
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 32px 20px;
    }

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

@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 24px 16px;
    }

    .navbar {
        padding: 12px 0;
    }

    .navbar-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
        align-items: center;
    }

    .navbar-brand {
        font-size: 18px;
        flex: 1;
        min-width: 150px;
    }

    .navbar-social {
        gap: 10px;
        flex: 1;
        min-width: auto;
        justify-content: flex-end;
    }

    .navbar-user {
        width: 100%;
        justify-content: space-between;
    }

    .user-name {
        font-size: 13px;
    }

    .btn-logout {
        padding: 10px 14px;
        font-size: 12px;
    }

    .social-link {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .card {
        padding: 24px;
        margin-bottom: 20px;
    }

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

    .input,
    .textarea {
        padding: 12px 14px;
        font-size: 16px;
    }

    .textarea {
        min-height: 100px;
    }

    .btn {
        padding: 12px 18px;
        font-size: 14px;
        min-height: 44px;
    }

    .btn-primary,
    .btn-success,
    .btn-secondary {
        width: 100%;
    }

    .label {
        font-size: 11px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .chart-container {
        height: 250px;
    }

    .edit-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .preview-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .preview-item {
        padding: 12px;
    }

    .preview-value {
        font-size: 14px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .summary-item {
        padding: 16px;
    }

    .summary-label {
        font-size: 11px;
    }

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

    .filter-buttons {
        flex-wrap: wrap;
        gap: 6px;
    }

    .filter-btn {
        padding: 9px 12px;
        font-size: 12px;
    }

    .preview-actions,
    .edit-actions {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .preview-actions .btn,
    .edit-actions .btn {
        width: 100%;
    }

    .footer {
        padding: 32px 16px 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-section {
        text-align: center;
    }

    .footer-section h4 {
        font-size: 13px;
    }

    .footer-section p,
    .footer-section ul li {
        font-size: 12px;
    }

    .footer-social {
        gap: 12px;
    }
}

@media (max-width: 576px) {
    body {
        background: #fff;
    }

    html, body {
        font-size: 15px;
    }

    .navbar {
        padding: 12px 0;
        position: sticky;
        top: 0;
        z-index: 99;
    }

    .navbar-container {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        padding: 0 12px;
    }

    .navbar-brand {
        width: 100%;
        font-size: 16px;
        justify-content: space-between;
    }

    .navbar-brand i {
        font-size: 20px;
    }

    .navbar-social {
        width: 100%;
        justify-content: space-around;
        gap: 8px;
    }

    .navbar-user {
        width: 100%;
        justify-content: space-between;
        align-items: center;
    }

    .user-name {
        font-size: 12px;
    }

    .btn-logout {
        padding: 8px 12px;
        font-size: 11px;
    }

    .social-link {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .page-loader {
        z-index: 9998;
    }

    .loader-spinner {
        width: 40px;
        height: 40px;
    }

    .loader-text {
        font-size: 14px;
    }

    /* Auth Page Mobile */
    .auth-container {
        min-height: 100vh;
        padding: 20px 0;
    }

    .auth-card {
        padding: 24px 18px;
        margin: 20px;
    }

    .auth-title {
        font-size: 26px;
        margin-bottom: 8px;
    }

    .auth-subtitle {
        font-size: 13px;
        margin-bottom: 24px;
    }

    .logo-icon {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }

    .auth-info {
        padding: 16px;
        font-size: 12px;
        line-height: 1.8;
    }

    /* Main Content Mobile */
    .container {
        padding: 16px 12px;
        max-width: 100%;
    }

    .card {
        padding: 18px;
        margin-bottom: 14px;
        border-radius: 12px;
    }

    .section-title {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .section-title::after {
        width: 30px;
    }

    /* Form Elements Mobile */
    .input-section {
        padding: 16px;
    }

    .input,
    .textarea {
        padding: 12px;
        font-size: 16px;
        border-radius: 8px;
    }

    .textarea {
        min-height: 90px;
        max-height: 240px;
    }

    .label {
        font-size: 10px;
        margin-bottom: 8px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .btn {
        padding: 12px 14px;
        font-size: 13px;
        border-radius: 8px;
        min-height: 44px;
        width: 100%;
    }

    .btn:active:not(:disabled) {
        transform: scale(0.98);
    }

    .btn-primary,
    .btn-success,
    .btn-secondary,
    .btn-danger {
        width: 100%;
    }

    .btn-logout {
        width: auto;
    }

    /* Grid Layouts Mobile */
    .edit-grid,
    .preview-grid,
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .preview-item,
    .summary-item,
    .raw-message {
        padding: 12px;
        border-radius: 8px;
    }

    .preview-label,
    .summary-label,
    .raw-label {
        font-size: 10px;
        margin-bottom: 4px;
    }

    .preview-value,
    .summary-value {
        font-size: 14px;
    }

    /* Daily Expenses Mobile */
    .daily-expenses-toolbar {
        flex-direction: column;
        gap: 12px;
    }

    .filter-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .filter-btn {
        flex: 1;
        padding: 9px 10px;
        font-size: 11px;
        min-width: auto;
    }

    .action-buttons {
        width: 100%;
    }

    .daily-expenses-table {
        font-size: 12px;
    }

    .daily-expenses-table th {
        padding: 10px 8px;
        font-size: 10px;
    }

    .daily-expenses-table td {
        padding: 8px;
    }

    .raw-text {
        font-size: 11px;
        max-height: 80px;
    }

    /* Charts Mobile */
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .chart-container {
        height: 220px;
        padding: 12px;
    }

    /* Actions Mobile */
    .preview-actions,
    .edit-actions {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .preview-actions .btn,
    .edit-actions .btn {
        width: 100%;
    }

    /* Daily Expenses Mobile */
    .daily-expenses-toolbar {
        flex-direction: column;
    }

    .btn-sm {
        width: 100%;
        padding: 10px 12px;
    }

    .daily-expenses-table {
        font-size: 12px;
    }

    .daily-expenses-table th,
    .daily-expenses-table td {
        padding: 8px;
    }

    .daily-expenses-table th {
        font-size: 10px;
    }

    .category-badge,
    .type-badge {
        font-size: 10px;
        padding: 3px 6px;
    }

    /* Footer Mobile */
    .footer {
        padding: 24px 12px 16px;
        background: white;
        border-top: 1px solid #e8eef5;
    }

    .footer-container {
        max-width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-section {
        text-align: center;
    }

    .footer-section h4 {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .footer-section p {
        font-size: 11px;
        line-height: 1.5;
    }

    .footer-section ul li {
        font-size: 11px;
        padding: 4px 0;
    }

    .footer-social {
        gap: 10px;
        margin-bottom: 16px;
    }

    .footer-bottom {
        padding-top: 16px;
        font-size: 10px;
        color: #aaa;
    }

    /* Toast Mobile */
    .toast {
        bottom: 16px;
        left: 12px;
        right: 12px;
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .navbar-social {
        gap: 4px;
    }

    .social-link {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .auth-card {
        padding: 20px 16px;
        margin: 16px;
    }

    .container {
        padding: 12px 10px;
    }

    .card {
        padding: 16px;
    }

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

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

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}
