/* ===================================
   Material Design Theme - Cheque Manager
   =================================== */

/* Material Design Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Material Design 3 Color Palette */
    --md-primary: #6200EE;
    --md-primary-variant: #3700B3;
    --md-secondary: #03DAC6;
    --md-secondary-variant: #018786;
    --md-background: #FAFAFA;
    --md-surface: #FFFFFF;
    --md-error: #B00020;
    --md-success: #4CAF50;
    --md-warning: #FF9800;
    --md-info: #2196F3;
    --md-on-primary: #FFFFFF;
    --md-on-secondary: #000000;
    --md-on-background: #000000;
    --md-on-surface: #000000;
    --md-on-error: #FFFFFF;

    /* Material Elevation Shadows */
    --md-elevation-1: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --md-elevation-2: 0 3px 6px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.12);
    --md-elevation-3: 0 10px 20px rgba(0,0,0,0.15), 0 3px 6px rgba(0,0,0,0.10);
    --md-elevation-4: 0 15px 25px rgba(0,0,0,0.15), 0 5px 10px rgba(0,0,0,0.05);
    --md-elevation-6: 0 20px 40px rgba(0,0,0,0.2);

    /* Material Border Radius */
    --md-radius-small: 4px;
    --md-radius-medium: 8px;
    --md-radius-large: 16px;

    /* Material Transitions */
    --md-duration-short: 150ms;
    --md-duration-medium: 250ms;
    --md-duration-long: 375ms;
    --md-easing-standard: cubic-bezier(0.4, 0.0, 0.2, 1);
    --md-easing-decelerate: cubic-bezier(0.0, 0.0, 0.2, 1);
    --md-easing-accelerate: cubic-bezier(0.4, 0.0, 1, 1);
}

html, body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--md-on-background);
    background: var(--md-background);
    line-height: 1.5;
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Material Icons Support */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'liga';
}

/* ===================================
   Material Layout Components
   =================================== */

/* Main App Container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-height: 100vh;
    background: var(--md-background);
    width: 100%;
    overflow: hidden;
}

/* Material App Bar (Header) */
.app-header {
    background: var(--md-primary);
    color: var(--md-on-primary);
    box-shadow: var(--md-elevation-4);
    position: sticky;
    top: 0;
    z-index: 1100;
    flex-shrink: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: 64px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.15px;
    color: var(--md-on-primary);
}

.brand-icon {
    font-size: 32px;
    line-height: 1;
}

.brand-text {
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: background var(--md-duration-short) var(--md-easing-standard);
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* App Body */
.app-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: calc(100vh - 64px);
}

/* Material Navigation Drawer (Sidebar) */
.app-sidebar {
    width: 256px;
    min-width: 256px;
    background: var(--md-surface);
    color: var(--md-on-surface);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--md-elevation-1);
    transition: transform var(--md-duration-long) var(--md-easing-standard);
    height: 100%;
    border-right: 1px solid rgba(0, 0, 0, 0.12);
}

/* Sidebar Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 8px 0;
}

.nav-header {
    padding: 16px 24px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    margin-bottom: 8px;
}

.nav-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(0, 0, 0, 0.6);
    font-weight: 500;
}

.nav-items {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 4px;
    color: rgba(0, 0, 0, 0.87) !important;
    text-decoration: none;
    border-radius: var(--md-radius-small);
    transition: background-color var(--md-duration-short) var(--md-easing-standard);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1px;
    position: relative;
    overflow: hidden;
}

.nav-icon {
    font-size: 24px;
    width: 24px;
    margin-right: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.6);
}

.nav-text {
    flex: 1;
}

/* Material Ripple Effect Simulation */
.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity var(--md-duration-short) var(--md-easing-standard);
}

.nav-item:hover {
    background-color: rgba(98, 0, 238, 0.08);
}

.nav-item:hover::before {
    opacity: 0.08;
}

.nav-item.active {
    background-color: rgba(98, 0, 238, 0.12);
    color: var(--md-primary) !important;
}

.nav-item.active .nav-icon {
    color: var(--md-primary);
}

.nav-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    margin-top: auto;
}

.nav-footer-info {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
}

/* Main Content Area */
.app-main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--md-background);
    height: 100%;
}

.main-content {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Typography */
.page-title {
    font-size: 34px;
    font-weight: 400;
    letter-spacing: 0.25px;
    color: rgba(0, 0, 0, 0.87);
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.15px;
    color: rgba(0, 0, 0, 0.6);
    margin: 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* Material Cards */
.content-card {
    background: var(--md-surface);
    border-radius: var(--md-radius-medium);
    box-shadow: var(--md-elevation-2);
    overflow: hidden;
    transition: box-shadow var(--md-duration-medium) var(--md-easing-standard);
    border: none;
}

.content-card:hover {
    box-shadow: var(--md-elevation-3);
}

.card-header-modern {
    background: var(--md-primary);
    color: var(--md-on-primary);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
}

.card-title {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.15px;
    margin: 0;
    display: flex;
    align-items: center;
}

.card-body {
    padding: 24px;
}

/* Material Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--md-surface);
    border-radius: var(--md-radius-medium);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--md-elevation-2);
    transition: box-shadow var(--md-duration-medium) var(--md-easing-standard),
                transform var(--md-duration-short) var(--md-easing-standard);
    border: none;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--md-primary);
}

.stat-card-primary::before { background: var(--md-primary); }
.stat-card-success::before { background: var(--md-success); }
.stat-card-warning::before { background: var(--md-warning); }
.stat-card-info::before { background: var(--md-info); }
.stat-card-danger::before { background: var(--md-error); }

.stat-card:hover {
    box-shadow: var(--md-elevation-4);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 48px;
    opacity: 0.9;
}

.stat-card-primary .stat-icon { color: var(--md-primary); }
.stat-card-success .stat-icon { color: var(--md-success); }
.stat-card-warning .stat-icon { color: var(--md-warning); }
.stat-card-info .stat-icon { color: var(--md-info); }
.stat-card-danger .stat-icon { color: var(--md-error); }

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 40px;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.87);
    line-height: 1.2;
}

/* Material Tables */
.table-modern {
    margin: 0;
    border-collapse: collapse;
}

.table-modern thead {
    background: var(--md-background);
}

.table-modern thead th {
    font-weight: 500;
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0.1px;
    color: rgba(0, 0, 0, 0.87);
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    padding: 16px;
}

.table-modern tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    transition: background-color var(--md-duration-short) var(--md-easing-standard);
}

.table-modern tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.table-modern tbody tr:last-child {
    border-bottom: none;
}

.table-modern tbody td {
    padding: 16px;
    vertical-align: middle;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.87);
}

/* Material Chips (Status) */
.status-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.16px;
    height: 32px;
}

.status-cleared {
    background-color: rgba(76, 175, 80, 0.12);
    color: #2E7D32;
}

.status-bounced {
    background-color: rgba(176, 0, 32, 0.12);
    color: #B00020;
}

.status-issued,
.status-received,
.status-deposited {
    background-color: rgba(255, 152, 0, 0.12);
    color: #E65100;
}

.status-cancelled {
    background-color: rgba(0, 0, 0, 0.12);
    color: rgba(0, 0, 0, 0.6);
}

.status-pending {
    background-color: rgba(33, 150, 243, 0.12);
    color: #1565C0;
}

/* Material Badges */
.badge-type-issued {
    background-color: var(--md-primary);
    color: var(--md-on-primary);
}

.badge-type-received {
    background-color: var(--md-success);
    color: var(--md-on-primary);
}

/* Amount Display */
.amount-display {
    font-weight: 500;
    color: rgba(0, 0, 0, 0.87);
    font-family: 'Roboto Mono', 'Consolas', monospace;
}

/* Date & Month Badges */
.date-badge,
.month-badge {
    display: inline-block;
    padding: 4px 8px;
    background-color: rgba(0, 0, 0, 0.04);
    border-radius: var(--md-radius-small);
    font-weight: 500;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.87);
}

/* Material Buttons */
.btn {
    border-radius: var(--md-radius-small);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 1.25px;
    text-transform: uppercase;
    padding: 10px 24px;
    transition: background-color var(--md-duration-short) var(--md-easing-standard),
                box-shadow var(--md-duration-short) var(--md-easing-standard);
    border: none;
    box-shadow: var(--md-elevation-2);
    min-width: 64px;
}

.btn:hover {
    box-shadow: var(--md-elevation-4);
}

.btn:active {
    box-shadow: var(--md-elevation-6);
}

.btn-primary {
    background-color: var(--md-primary);
    color: var(--md-on-primary);
}

.btn-primary:hover {
    background-color: var(--md-primary-variant);
}

.btn-success {
    background-color: var(--md-success);
    color: var(--md-on-primary);
}

.btn-success:hover {
    background-color: #388E3C;
}

.btn-outline-primary {
    border: 1px solid var(--md-primary);
    color: var(--md-primary);
    background: transparent;
    box-shadow: none;
}

.btn-outline-primary:hover {
    background-color: rgba(98, 0, 238, 0.08);
}

.btn-outline-danger {
    border: 1px solid var(--md-error);
    color: var(--md-error);
    background: transparent;
    box-shadow: none;
}

.btn-outline-danger:hover {
    background-color: rgba(176, 0, 32, 0.08);
}

.btn-outline-secondary {
    border: 1px solid rgba(0, 0, 0, 0.23);
    color: rgba(0, 0, 0, 0.87);
    background: transparent;
    box-shadow: none;
}

.btn-outline-secondary:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* Material Form Controls */
.form-label {
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.4px;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 8px;
}

.form-control,
.form-select {
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: var(--md-radius-small);
    padding: 16px 12px;
    font-size: 16px;
    letter-spacing: 0.15px;
    transition: border-color var(--md-duration-short) var(--md-easing-standard),
                box-shadow var(--md-duration-short) var(--md-easing-standard);
    background-color: transparent;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--md-primary);
    box-shadow: none;
    outline: none;
}

.form-control:hover,
.form-select:hover {
    border-color: rgba(0, 0, 0, 0.87);
}

/* Material Alerts */
.alert-modern {
    border-radius: var(--md-radius-small);
    border: none;
    padding: 16px;
    display: flex;
    align-items: center;
    box-shadow: var(--md-elevation-1);
}

.alert-danger {
    background-color: rgba(176, 0, 32, 0.12);
    color: #B00020;
}

.alert-info {
    background-color: rgba(33, 150, 243, 0.12);
    color: #1565C0;
}

/* Material Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    color: rgba(0, 0, 0, 0.6);
}

/* Material Badges */
.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.1px;
}

/* Material Animations */
@keyframes materialFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-card,
.stat-card {
    animation: materialFadeIn var(--md-duration-long) var(--md-easing-decelerate);
}

/* Material Responsive Design */
@media (max-width: 960px) {
    .page-title {
        font-size: 28px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .stat-value {
        font-size: 32px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 600px) {
    /* Mobile Navigation Drawer */
    .app-sidebar {
        position: fixed;
        top: 64px;
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
        z-index: 1000;
        box-shadow: var(--md-elevation-6);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .header-content {
        padding: 0 16px;
        height: 56px;
    }

    .main-content {
        padding: 16px;
    }

    .brand-text {
        font-size: 18px;
    }

    .user-info span:last-child {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .card-body {
        padding: 16px;
    }

    .page-title {
        font-size: 24px;
    }
}

@media (min-width: 601px) {
    .app-sidebar {
        display: block !important;
        position: relative;
        transform: translateX(0) !important;
    }
}

/* Material Error UI */
#blazor-error-ui {
    background-color: var(--md-error);
    color: var(--md-on-error);
    bottom: 0;
    box-shadow: var(--md-elevation-6);
    display: none;
    left: 0;
    padding: 0;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

.error-content {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 500;
}

#blazor-error-ui .reload {
    color: var(--md-on-error);
    text-decoration: underline;
    margin-left: auto;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--md-radius-small);
    transition: background-color var(--md-duration-short) var(--md-easing-standard);
}

#blazor-error-ui .reload:hover {
    background-color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: var(--md-on-error);
    padding: 8px 16px;
    border-radius: var(--md-radius-small);
    font-size: 20px;
    line-height: 1;
    transition: background-color var(--md-duration-short) var(--md-easing-standard);
}

#blazor-error-ui .dismiss:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Material Helper Classes */
a {
    color: var(--md-primary);
    transition: color var(--md-duration-short) var(--md-easing-standard);
    text-decoration: none;
}

a:hover {
    color: var(--md-primary-variant);
    text-decoration: underline;
}

/* Scrollbar Styling - Material Design */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border: 3px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
    background-clip: content-box;
}

/* Material Validation States */
.valid.modified:not([type=checkbox]) {
    border-color: var(--md-success) !important;
}

.invalid {
    border-color: var(--md-error) !important;
}

.validation-message {
    color: var(--md-error);
    font-size: 12px;
    margin-top: 4px;
    letter-spacing: 0.4px;
}

/* Material Blazor Error Boundary */
.blazor-error-boundary {
    background: var(--md-error);
    padding: 16px 16px 16px 56px;
    color: var(--md-on-error);
    position: relative;
}

.blazor-error-boundary::before {
    content: 'error';
    font-family: 'Material Icons';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* Card Styles */
.content-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid #e2e8f0;
}

.content-card:hover {
    box-shadow: var(--box-shadow-lg);
}

.card-header-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.stat-card-primary::before { background: linear-gradient(180deg, #667eea 0%, #764ba2 100%); }
.stat-card-success::before { background: linear-gradient(180deg, #48bb78 0%, #38a169 100%); }
.stat-card-warning::before { background: linear-gradient(180deg, #ed8936 0%, #dd6b20 100%); }
.stat-card-info::before { background: linear-gradient(180deg, #4299e1 0%, #3182ce 100%); }
.stat-card-danger::before { background: linear-gradient(180deg, #f56565 0%, #e53e3e 100%); }

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow-lg);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

.stat-card-primary .stat-icon { color: #667eea; }
.stat-card-success .stat-icon { color: #48bb78; }
.stat-card-warning .stat-icon { color: #ed8936; }
.stat-card-info .stat-icon { color: #4299e1; }
.stat-card-danger .stat-icon { color: #f56565; }

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #718096;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.2;
}

/* Tables */
.table-modern {
    margin: 0;
}

.table-modern thead {
    background: #f7fafc;
}

.table-modern thead th {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
    padding: 1rem;
}

.table-modern tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: var(--transition);
}

.table-modern tbody tr:hover {
    background: #f7fafc;
}

.table-modern tbody td {
    padding: 1rem;
    vertical-align: middle;
}

/* Status Chips */
.status-chip {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-cleared {
    background: #c6f6d5;
    color: #22543d;
}

.status-bounced {
    background: #fed7d7;
    color: #742a2a;
}

.status-issued,
.status-received,
.status-deposited {
    background: #feebc8;
    color: #7c2d12;
}

.status-cancelled {
    background: #e2e8f0;
    color: #2d3748;
}

.status-pending {
    background: #bee3f8;
    color: #2c5282;
}

/* Badge Types */
.badge-type-issued {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.badge-type-received {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

/* Amount Display */
.amount-display {
    font-weight: 600;
    color: #2d3748;
    font-family: 'Consolas', 'Monaco', monospace;
}

/* Date & Month Badges */
.date-badge,
.month-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #edf2f7;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    color: #4a5568;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653b8e 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
    background: white;
}

.btn-outline-primary:hover {
    background: #667eea;
    color: white;
}

.btn-outline-danger {
    border: 2px solid #f56565;
    color: #f56565;
    background: white;
}

.btn-outline-danger:hover {
    background: #f56565;
    color: white;
}

.btn-outline-secondary {
    border: 2px solid #cbd5e0;
    color: #4a5568;
    background: white;
}

.btn-outline-secondary:hover {
    background: #edf2f7;
}

/* Form Controls */
.form-label {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-control,
.form-select {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Alerts */
.alert-modern {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    box-shadow: var(--box-shadow);
}

.alert-danger {
    background: #fed7d7;
    color: #742a2a;
}

.alert-info {
    background: #bee3f8;
    color: #2c5282;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #718096;
}

/* Badges */
.badge {
    padding: 0.5rem 0.875rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-card,
.stat-card {
    animation: fadeIn 0.5s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .page-title {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    /* Mobile Sidebar */
    .app-sidebar {
        position: fixed;
        top: 70px;
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
        z-index: 999;
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .header-content {
        padding: 0.75rem 1rem;
    }

    .main-content {
        padding: 1rem;
    }

    .brand-text {
        font-size: 1.25rem;
    }

    .user-info span:last-child {
        display: none;
    }
}

@media (min-width: 769px) {
    .header-content {
        padding: 1rem 2rem 1rem 1.5rem;
    }

    .app-sidebar {
        display: block !important;
        position: relative;
        transform: translateX(0) !important;
    }
}

/* Error UI */
#blazor-error-ui {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    bottom: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

.error-content {
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
}

#blazor-error-ui .reload {
    color: white;
    text-decoration: underline;
    margin-left: auto;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    transition: background 0.2s;
}

#blazor-error-ui .reload:hover {
    background: rgba(255,255,255,0.3);
    text-decoration: none;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    border: none;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 1.25rem;
    line-height: 1;
    transition: background 0.2s;
}

#blazor-error-ui .dismiss:hover {
    background: rgba(255,255,255,0.3);
}

/* Legacy Styles (if needed) */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #48bb78;
}

.invalid {
    outline: 1px solid #f56565;
}

.validation-message {
    color: #f56565;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* Additional Utilities */
a {
    color: inherit;
    transition: var(--transition);
}

a:hover {
    opacity: 0.8;
}

/* Ensure icons render properly */
.bi {
    display: inline-block;
    vertical-align: middle;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}