/* =========================================
   Subxiro - Bills Management System
   Modern Dashboard Styles
   ========================================= */

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #eef2ff;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    
    --bg: #f8fafc;
    --card: #ffffff;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

/* Theme color variations */
html[data-color="indigo"], :root[data-color="indigo"] { --primary: #4f46e5; --primary-dark: #4338ca; --primary-light: #eef2ff; }
html[data-color="blue"], :root[data-color="blue"] { --primary: #3b82f6; --primary-dark: #2563eb; --primary-light: #dbeafe; }
html[data-color="purple"], :root[data-color="purple"] { --primary: #8b5cf6; --primary-dark: #7c3aed; --primary-light: #ede9fe; }
html[data-color="pink"], :root[data-color="pink"] { --primary: #ec4899; --primary-dark: #db2777; --primary-light: #fce7f3; }
html[data-color="red"], :root[data-color="red"] { --primary: #ef4444; --primary-dark: #dc2626; --primary-light: #fee2e2; }
html[data-color="orange"], :root[data-color="orange"] { --primary: #f97316; --primary-dark: #ea580c; --primary-light: #ffedd5; }
html[data-color="green"], :root[data-color="green"] { --primary: #10b981; --primary-dark: #059669; --primary-light: #d1fae5; }
html[data-color="teal"], :root[data-color="teal"] { --primary: #14b8a6; --primary-dark: #0d9488; --primary-light: #ccfbf1; }

/* Dark mode */
html[data-theme="dark"], :root[data-theme="dark"] {
    --bg: #0f172a;
    --card: #1e293b;
    --card-bg: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.3), 0 4px 6px -2px rgba(0,0,0,0.2);
    --primary-light: rgba(79, 70, 229, 0.2);
    --success-light: rgba(16, 185, 129, 0.2);
    --warning-light: rgba(245, 158, 11, 0.2);
    --danger-light: rgba(239, 68, 68, 0.2);
    --info-light: rgba(59, 130, 246, 0.2);
}

/* Dark mode with color themes */
html[data-theme="dark"][data-color="indigo"] { --primary-light: rgba(79, 70, 229, 0.2); }
html[data-theme="dark"][data-color="blue"] { --primary-light: rgba(59, 130, 246, 0.2); }
html[data-theme="dark"][data-color="purple"] { --primary-light: rgba(139, 92, 246, 0.2); }
html[data-theme="dark"][data-color="pink"] { --primary-light: rgba(236, 72, 153, 0.2); }
html[data-theme="dark"][data-color="red"] { --primary-light: rgba(239, 68, 68, 0.2); }
html[data-theme="dark"][data-color="orange"] { --primary-light: rgba(249, 115, 22, 0.2); }
html[data-theme="dark"][data-color="green"] { --primary-light: rgba(16, 185, 129, 0.2); }
html[data-theme="dark"][data-color="teal"] { --primary-light: rgba(20, 184, 166, 0.2); }

/* Auto mode - follows system preference */
@media (prefers-color-scheme: dark) {
    html[data-theme="auto"], :root[data-theme="auto"] {
        --bg: #0f172a;
        --card: #1e293b;
        --card-bg: #1e293b;
        --text: #f1f5f9;
        --text-muted: #94a3b8;
        --border: #334155;
        --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
        --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.3), 0 4px 6px -2px rgba(0,0,0,0.2);
        --primary-light: rgba(79, 70, 229, 0.2);
    }
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Top Header */
.top-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
}

.logo i {
    font-size: 1.5rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg);
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--card);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Main Content */
.main-content {
    padding: 20px 0 100px;
    min-height: calc(100vh - 60px);
}

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h2 i {
    color: var(--primary);
}

.link-btn {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.link-btn:hover {
    text-decoration: underline;
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 24px;
}

.welcome-section h1 {
    font-size: 1.75rem;
    margin: 0 0 4px;
}

.muted {
    color: var(--text-muted);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.stat-card.primary { border-left: 4px solid var(--primary); }
.stat-card.success { border-left: 4px solid var(--success); }
.stat-card.warning { border-left: 4px solid var(--warning); }
.stat-card.danger { border-left: 4px solid var(--danger); }
.stat-card.info { border-left: 4px solid var(--info); }

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-card.primary .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-card.success .stat-icon { background: var(--success-light); color: var(--success); }
.stat-card.warning .stat-icon { background: var(--warning-light); color: var(--warning); }
.stat-card.danger .stat-icon { background: var(--danger-light); color: var(--danger); }
.stat-card.info .stat-icon { background: var(--info-light); color: var(--info); }

.stat-content {
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.2s;
}

.action-btn.primary {
    background: var(--primary);
    color: white;
}

.action-btn.primary:hover {
    background: var(--primary-dark);
}

.action-btn.secondary {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
}

.action-btn.secondary:hover {
    background: var(--bg);
}

/* Bills Section */
.bills-section {
    margin-bottom: 24px;
}

.bills-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bill-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

.bill-item.urgent {
    background: var(--warning-light);
}

.bill-item.overdue {
    background: var(--danger-light);
}

.bill-item.paid {
    opacity: 0.6;
}

.bill-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.bill-icon[data-category="utilities"] { background: #fef3c7; color: #d97706; }
.bill-icon[data-category="entertainment"] { background: #ede9fe; color: #7c3aed; }
.bill-icon[data-category="health"] { background: #fce7f3; color: #db2777; }
.bill-icon[data-category="insurance"] { background: #cffafe; color: #0891b2; }
.bill-icon[data-category="housing"] { background: #d1fae5; color: #059669; }

.bill-info {
    flex: 1;
    min-width: 0;
}

.bill-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bill-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.due-today, .overdue-text { color: var(--danger); font-weight: 500; }
.due-tomorrow { color: var(--warning); font-weight: 500; }

.bill-amount {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bill-amount .amount {
    font-weight: 700;
    font-size: 1rem;
}

.mark-paid-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--success);
    background: transparent;
    color: var(--success);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mark-paid-btn:hover {
    background: var(--success);
    color: white;
}

/* Category Section */
.category-section {
    margin-bottom: 24px;
}

.category-chart {
    height: 160px;
    margin-bottom: 16px;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.category-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.category-name {
    flex: 1;
}

.category-amount {
    font-weight: 600;
}

.category-percent {
    color: var(--text-muted);
    font-size: 0.8rem;
    width: 40px;
    text-align: right;
}

/* Subscription Section */
.subscription-section {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white;
    border: none;
}

.plan-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.plan-badge.free {
    background: rgba(255,255,255,0.2);
}

.subscription-section h3 {
    font-size: 1.25rem;
    margin: 0 0 8px;
}

.subscription-section p {
    opacity: 0.9;
    margin: 0 0 16px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.features-list li {
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.features-list i {
    color: #a5f3fc;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn.primary {
    background: var(--primary);
    color: white;
}

.btn.primary:hover {
    background: var(--primary-dark);
}

.btn.secondary {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn.secondary:hover {
    background: var(--bg);
}

.btn.full-width {
    width: 100%;
}

.subscription-section .btn.primary {
    background: white;
    color: var(--primary);
}

/* Bottom Navigation */
.navbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card);
    border-top: 1px solid var(--border);
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.navbar .bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 12px;
    max-width: 600px;
    margin: 0 auto;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    padding: 8px 16px;
    transition: all 0.2s;
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.add-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    margin-top: -20px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.nav-item.add-btn i {
    font-size: 1.5rem;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}

.page-header h1 {
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header h1 i {
    color: var(--primary);
}

.page-title {
    flex: 1;
}

.page-title h1 {
    margin: 0 0 4px;
}

.page-title p {
    margin: 0;
}

.back-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
}

.back-link:hover {
    background: var(--border);
}

.delete-btn-header {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--danger-light);
    color: var(--danger);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Filter Bar */
.filter-bar {
    margin-bottom: 16px;
    padding: 16px;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: var(--bg);
    color: var(--text);
}

.filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: var(--bg);
    color: var(--text);
    min-width: 120px;
}

/* Bills Summary */
.bills-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    padding: 0 4px;
}

.summary-item {
    display: flex;
    gap: 8px;
    align-items: center;
}

.summary-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.summary-value {
    font-weight: 700;
}

.summary-value.warning {
    color: var(--warning);
}

/* Bills Container */
.bills-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bills-group h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 4px;
}

.bill-checkbox {
    display: flex;
    align-items: center;
}

.bill-checkbox input {
    width: 20px;
    height: 20px;
    accent-color: var(--success);
}

.bill-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bill-amount.overdue {
    color: var(--danger);
}

.bill-amount.urgent {
    color: var(--warning);
}

.action-menu {
    position: relative;
}

.menu-trigger {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-trigger:hover {
    background: var(--border);
}

.menu-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 140px;
    z-index: 50;
    display: none;
}

.menu-dropdown.active {
    display: block;
}

.menu-dropdown a,
.menu-dropdown button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    width: 100%;
    border: none;
    background: none;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
}

.menu-dropdown a:hover,
.menu-dropdown button:hover {
    background: var(--bg);
}

.menu-dropdown .delete-btn {
    color: var(--danger);
}

.category-tag {
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
}

.status-paid {
    color: var(--success);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state .empty-icon {
    font-size: 3rem;
    color: var(--border);
    margin-bottom: 16px;
}

.empty-state h3 {
    margin: 0 0 8px;
}

.empty-state p {
    margin: 0 0 20px;
}

/* FAB */
.fab {
    position: fixed;
    right: 20px;
    bottom: 90px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    font-size: 1.5rem;
    z-index: 90;
    display: none;
}

@media (max-width: 768px) {
    .fab {
        display: flex;
    }
    .page-header .btn {
        display: none;
    }
}

/* Forms */
.bill-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group label i {
    color: var(--primary);
    width: 16px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.input-with-prefix {
    position: relative;
}

.input-with-prefix .prefix {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-weight: 500;
}

.input-with-prefix input {
    padding-left: 32px;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

@media (max-width: 640px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.category-option {
    cursor: pointer;
}

.category-option input {
    display: none;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    transition: all 0.2s;
    text-align: center;
}

.category-card i {
    font-size: 1.25rem;
    color: var(--text-muted);
}

.category-card.selected,
.category-option input:checked + .category-card {
    border-color: var(--primary);
    background: var(--primary-light);
}

.category-card.selected i,
.category-option input:checked + .category-card i {
    color: var(--primary);
}

/* Toggle Switch */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border);
    border-radius: 999px;
    transition: 0.3s;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.reminder-options {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.reminder-options select {
    flex: 1;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.form-actions .btn {
    flex: 1;
}

/* Quick Add */
.quick-add-section {
    margin-bottom: 24px;
}

.quick-add-section h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 12px;
}

.quick-add-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-add-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-add-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.quick-add-btn i {
    font-size: 0.9rem;
}

/* Payment History */
.payment-history {
    margin-bottom: 24px;
}

.payment-history h3 {
    font-size: 1rem;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-history h3 i {
    color: var(--primary);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.history-date {
    flex: 1;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.history-amount {
    font-weight: 600;
}

.history-status {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 999px;
}

.history-status.paid {
    background: var(--success-light);
    color: var(--success);
}

/* Alerts */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
}

.alert-error {
    background: var(--danger-light);
    color: var(--danger);
}

.alert ul {
    margin: 0;
    padding-left: 20px;
}

.alert i {
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .quick-actions {
        flex-wrap: nowrap;
    }
}

