/**
 * Café Cash Book - Main Styles
 * Mobile-First Design with Coffee Brown & Cream Beige Theme
 * Enhanced with animations and proper spacing
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700&display=swap');

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --color-accent-primary: #6F4E37;
    --color-accent-hover: #5A3D2B;
    --color-accent-secondary: #A67C52;
    --color-bg-primary: #F5EFE7;
    --color-bg-card: #FFFFFF;
    --color-text-primary: #3E2723;
    --color-text-secondary: #795548;
    --color-border: #E0D5C7;
    
    /* Status Colors */
    --color-success: #4CAF50;
    --color-danger: #D32F2F;
    --color-warning: #FF9800;
    --color-info: #2196F3;
    
    /* Fonts */
    --font-body: 'Inter', sans-serif;
    --font-heading: 'Poppins', sans-serif;
    --font-mono: 'Courier New', monospace;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(62, 39, 35, 0.06);
    --shadow-md: 0 4px 12px rgba(62, 39, 35, 0.12);
    --shadow-lg: 0 8px 30px rgba(62, 39, 35, 0.15);
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== NAVIGATION ===== */
.main-nav {
    background: var(--color-accent-primary, #6F4E37);
    color: white;
    box-shadow: var(--shadow-md, 0 4px 12px rgba(62, 39, 35, 0.12));
    position: relative; /* Changed from sticky for mobile */
    z-index: 1020;
    animation: slideDown 0.3s ease;
}

/* Sticky only on desktop */
@media (min-width: 768px) {
    .main-nav {
        position: sticky;
        top: 0;
    }
}

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

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .nav-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 2rem;
    }
}

.nav-brand h1 {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-heading, 'Poppins', sans-serif);
    margin: 0;
    animation: fadeIn 0.5s ease;
}

@media (min-width: 768px) {
    .nav-brand h1 {
        font-size: 1.5rem;
    }
}

.nav-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .nav-menu {
        gap: 1rem;
    }
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.625rem 1.25rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 200ms ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 300ms ease;
}

.nav-link:hover::before {
    left: 0;
}

.nav-link:hover {
    color: white;
    transform: translateY(-2px);
}

.nav-link.active {
    background: var(--color-accent-hover, #5A3D2B);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-user {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
}

.user-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease 0.2s both;
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem;
    border-radius: 12px;
}

.lang-option {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 200ms ease;
}

.lang-option.active,
.lang-option:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.05);
}

.btn-logout {
    background: rgba(211, 47, 47, 0.9);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 200ms ease;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
}

.btn-logout:hover {
    background: #C62828;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    animation: fadeIn 0.4s ease;
}

@media (min-width: 768px) {
    .main-content {
        padding: 2.5rem;
    }
}

.content-wrapper {
    width: 100%;
}

.page-header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    animation: slideUp 0.4s ease;
}

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

@media (min-width: 768px) {
    .page-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.page-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-primary, #3E2723);
    font-family: var(--font-heading, 'Poppins', sans-serif);
    margin: 0;
}

@media (min-width: 768px) {
    .page-header h2 {
        font-size: 2.25rem;
    }
}

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

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 200ms ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    font-family: var(--font-body, 'Inter', sans-serif);
    line-height: 1;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--color-accent-primary, #6F4E37);
    color: white;
    box-shadow: 0 4px 12px rgba(111, 78, 55, 0.2);
}

.btn-primary:hover {
    background: var(--color-accent-hover, #5A3D2B);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(111, 78, 55, 0.3);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--color-accent-secondary, #A67C52);
    color: white;
    box-shadow: 0 4px 12px rgba(166, 124, 82, 0.2);
}

.btn-secondary:hover {
    background: #8F6A45;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(166, 124, 82, 0.3);
}

.btn-danger {
    background: var(--color-danger, #D32F2F);
    color: white;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.2);
}

.btn-danger:hover {
    background: #C62828;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.3);
}

.btn-success {
    background: var(--color-success, #4CAF50);
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.btn-success:hover {
    background: #43A047;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

.btn-icon {
    padding: 0.625rem;
    border-radius: 10px;
    background: var(--color-accent-primary, #6F4E37);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 200ms ease;
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--color-accent-hover, #5A3D2B);
    transform: scale(1.15);
}

.btn-icon:active {
    transform: scale(0.95);
}

.btn-icon.btn-primary {
    background: var(--color-accent-primary, #6F4E37);
    color: white;
}

.btn-icon.btn-primary:hover {
    background: var(--color-accent-hover, #5A3D2B);
}

.btn-icon.btn-secondary {
    background: var(--color-accent-secondary, #A67C52);
    color: white;
}

.btn-icon.btn-secondary:hover {
    background: #8F6A45;
}

.btn-icon.btn-danger {
    background: var(--color-danger, #D32F2F);
    color: white;
}

.btn-icon.btn-danger:hover {
    background: #C62828;
}

.btn-icon.btn-success {
    background: var(--color-success, #4CAF50);
    color: white;
}

.btn-icon.btn-success:hover {
    background: #43A047;
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn:disabled,
.btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== CARDS ===== */
.card {
    background: var(--color-bg-card, #FFFFFF);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(62, 39, 35, 0.08);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 300ms ease;
    animation: fadeIn 0.5s ease;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .card {
        padding: 1.25rem;
        border-radius: 16px;
        margin-bottom: 1.5rem;
    }
}

.card:hover {
    box-shadow: 0 8px 30px rgba(62, 39, 35, 0.12);
    transform: translateY(-2px);
}

@media (max-width: 767px) {
    .card:hover {
        transform: none; /* Disable hover transform on mobile */
    }
}

.card h2 {
    font-size: 1.5rem;
    color: var(--color-text-primary, #3E2723);
    margin: 0 0 1.5rem 0;
    font-weight: 600;
    font-family: var(--font-heading, 'Poppins', sans-serif);
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-border, #E0D5C7);
}

@media (max-width: 767px) {
    .card h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
}

.card-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--color-border, #E0D5C7);
    display: flex;
    justify-content: center;
}

@media (max-width: 767px) {
    .card-footer {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--color-text-primary, #3E2723);
    font-size: 0.9375rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--color-border, #E0D5C7);
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-body, 'Inter', sans-serif);
    transition: all 250ms ease;
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-accent-primary, #6F4E37);
    box-shadow: 0 0 0 4px rgba(111, 78, 55, 0.1);
    transform: translateY(-2px);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: var(--color-danger, #D32F2F);
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

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

/* ===== TABLES ===== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(62, 39, 35, 0.06);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9375rem;
}

.data-table th,
.data-table td {
    padding: 1.25rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border, #E0D5C7);
}

@media (min-width: 768px) {
    .data-table th,
    .data-table td {
        padding: 1.5rem 1.25rem;
    }
}

.data-table thead {
    background: linear-gradient(135deg, #F5EFE7 0%, #E8DED0 100%);
}

.data-table th {
    font-weight: 700;
    color: var(--color-text-primary, #3E2723);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table tbody tr {
    transition: all 200ms ease;
    animation: fadeIn 0.3s ease;
}

.data-table tbody tr:hover {
    background: rgba(111, 78, 55, 0.04);
    transform: scale(1.01);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table .amount {
    font-family: var(--font-mono, monospace);
    font-weight: 700;
    color: var(--color-text-primary, #3E2723);
    font-size: 1.0625rem;
}

.data-table .date-cell {
    white-space: nowrap;
    font-size: 0.875rem;
    color: var(--color-text-secondary, #795548);
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: all 200ms ease;
    animation: fadeIn 0.4s ease;
}

.badge:hover {
    transform: scale(1.05);
}

.badge-income {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    color: var(--color-success, #4CAF50);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.badge-expense {
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    color: var(--color-danger, #D32F2F);
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.2);
}

.badge-active {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    color: var(--color-success, #4CAF50);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.badge-reversed {
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    color: var(--color-danger, #D32F2F);
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.2);
}

.badge-pending {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    color: var(--color-warning, #FF9800);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
}

.badge-confirmed {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    color: var(--color-success, #4CAF50);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.badge-open {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    color: var(--color-info, #2196F3);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.badge-closed {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    color: var(--color-success, #4CAF50);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

/* ===== MODALS ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 0; /* Remove padding on mobile */
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(4px);
}

@media (min-width: 768px) {
    .modal {
        padding: 1.5rem;
    }
}

.modal-content {
    background: var(--color-bg-card, #FFFFFF);
    border-radius: 0; /* No radius on mobile for fullscreen */
    max-width: 100%;
    width: 100%;
    height: 100%; /* Fullscreen on mobile */
    max-height: 100%;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: none;
    animation: slideUp 0.4s ease;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .modal-content {
        border-radius: 24px;
        max-width: 650px;
        width: 100%;
        height: auto;
        max-height: 90vh;
        padding: 2.5rem;
        box-shadow: 0 20px 60px rgba(62, 39, 35, 0.3);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-border, #E0D5C7);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .modal-header {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }
}

.modal-header h2 {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-text-primary, #3E2723);
}

@media (min-width: 768px) {
    .modal-header h2 {
        font-size: 1.75rem;
    }
}

.modal-close {
    background: rgba(211, 47, 47, 0.1);
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--color-danger, #D32F2F);
    line-height: 1;
    padding: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 200ms ease;
    flex-shrink: 0;
}
 
.modal-close:hover {
    background: rgba(211, 47, 47, 0.2);
    transform: rotate(90deg) scale(1.1);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .modal-body {
        margin-bottom: 0;
    }
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 2px solid var(--color-border, #E0D5C7);
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* Mobile: Stack buttons vertically */
@media (max-width: 767px) {
    .modal-footer {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }
    
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1070;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 420px;
}

@media (max-width: 640px) {
    .toast-container {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}

.toast {
    background: white;
    padding: 1.25rem 1.75rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(62, 39, 35, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transform: translateX(120%);
    transition: all 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 5px solid;
    backdrop-filter: blur(10px);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast::before {
    content: '';
    font-size: 1.5rem;
}

.toast-success {
    border-left-color: var(--color-success, #4CAF50);
    background: linear-gradient(135deg, #ffffff 0%, #f1f8f4 100%);
}

.toast-success::before {
    content: '✓';
    color: var(--color-success, #4CAF50);
}

.toast-error {
    border-left-color: var(--color-danger, #D32F2F);
    background: linear-gradient(135deg, #ffffff 0%, #fef5f5 100%);
}

.toast-error::before {
    content: '✗';
    color: var(--color-danger, #D32F2F);
}

.toast-warning {
    border-left-color: var(--color-warning, #FF9800);
    background: linear-gradient(135deg, #ffffff 0%, #fff8f0 100%);
}

.toast-warning::before {
    content: '⚠';
    color: var(--color-warning, #FF9800);
}

.toast-info {
    border-left-color: var(--color-info, #2196F3);
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
}

.toast-info::before {
    content: 'ℹ';
    color: var(--color-info, #2196F3);
}

/* ===== UTILITY CLASSES ===== */
.loading {
    text-align: center;
    color: var(--color-text-secondary, #795548);
    padding: 3rem 1.5rem;
    font-size: 1.125rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.no-data {
    text-align: center;
    color: var(--color-text-secondary, #795548);
    padding: 4rem 2rem;
    font-size: 1.125rem;
    animation: fadeIn 0.5s ease;
}

.error-message {
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    color: var(--color-danger, #D32F2F);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    border-left: 5px solid var(--color-danger, #D32F2F);
    margin: 1.5rem 0;
    animation: shake 0.5s ease;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.15);
}

.info-message {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    color: var(--color-info, #2196F3);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    border-left: 5px solid var(--color-info, #2196F3);
    margin: 1.5rem 0;
    animation: slideUp 0.4s ease;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.15);
}

.text-muted {
    color: var(--color-text-secondary, #795548);
    font-size: 0.9375rem;
}

.text-success {
    color: var(--color-success, #4CAF50);
}

.text-danger {
    color: var(--color-danger, #D32F2F);
}

.text-warning {
    color: var(--color-warning, #FF9800);
}

/* ===== FILTERS ===== */
.filters-card {
    margin-bottom: 2rem;
    animation: slideUp 0.4s ease 0.1s both;
}

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

@media (min-width: 640px) {
    .filters-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .filters-row {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

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

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

.spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 800ms linear infinite;
}

/* ===== RESPONSIVE HELPERS ===== */
@media (max-width: 640px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 641px) {
    .show-mobile {
        display: none !important;
    }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-primary, #F5EFE7);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--color-accent-secondary, #A67C52);
    border-radius: 10px;
    border: 2px solid var(--color-bg-primary, #F5EFE7);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-primary, #6F4E37);
}

/* ===== PRINT STYLES ===== */
@media print {
    .main-nav,
    .page-actions,
    .btn,
    .filters-card {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    body {
        background: white;
    }
}

/* ===== FOCUS VISIBLE (Accessibility) ===== */
*:focus-visible {
    outline: 3px solid var(--color-accent-primary, #6F4E37);
    outline-offset: 2px;
}

/* ===== SELECTION ===== */
::selection {
    background: var(--color-accent-primary, #6F4E37);
    color: white;
}

::-moz-selection {
    background: var(--color-accent-primary, #6F4E37);
    color: white;
}
