/**
 * Shared CSS - Base styles, variables, and components used across all pages
 */

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

/* CSS Variables */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #8b5cf6;
    --secondary-dark: #7c3aed;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Theme colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-card: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow-color: rgba(0, 0, 0, 0.1);

    /* Accent colors */
    --accent-primary: #2563eb;
    --accent-secondary: #1d4ed8;
    --primary-light: rgba(37, 99, 235, 0.1);
}

/* Dark Theme */
[data-theme="dark"] {
    --gray-50: #1a1a1a;
    --gray-100: #2a2a2a;
    --gray-200: #3a3a3a;
    --gray-300: #4a4a4a;
    --gray-400: #5a5a5a;
    --gray-500: #7a7a7a;
    --gray-600: #9a9a9a;
    --gray-700: #bababa;
    --gray-800: #dadada;
    --gray-900: #f0f0f0;

    --bg-primary: #181818;
    --bg-secondary: #1f1f1f;
    --bg-card: #242424;
    --text-primary: #f5f5f5;
    --text-secondary: #a3a3a3;
    --border-color: #262626;
    --shadow-color: rgba(0, 0, 0, 0.8);
}

/* Accent Colors */
[data-accent="blue"] { --primary: #2563eb; --primary-dark: #1d4ed8; --accent-primary: #2563eb; --accent-secondary: #1d4ed8; }
[data-accent="purple"] { --primary: #7c3aed; --primary-dark: #6d28d9; --accent-primary: #7c3aed; --accent-secondary: #6d28d9; }
[data-accent="pink"] { --primary: #ec4899; --primary-dark: #db2777; --accent-primary: #ec4899; --accent-secondary: #db2777; }
[data-accent="red"] { --primary: #ef4444; --primary-dark: #dc2626; --accent-primary: #ef4444; --accent-secondary: #dc2626; }
[data-accent="orange"] { --primary: #f97316; --primary-dark: #ea580c; --accent-primary: #f97316; --accent-secondary: #ea580c; }
[data-accent="yellow"] { --primary: #eab308; --primary-dark: #ca8a04; --accent-primary: #eab308; --accent-secondary: #ca8a04; }
[data-accent="green"] { --primary: #22c55e; --primary-dark: #16a34a; --accent-primary: #22c55e; --accent-secondary: #16a34a; }
[data-accent="teal"] { --primary: #14b8a6; --primary-dark: #0d9488; --accent-primary: #14b8a6; --accent-secondary: #0d9488; }
[data-accent="cyan"] { --primary: #06b6d4; --primary-dark: #0891b2; --accent-primary: #06b6d4; --accent-secondary: #0891b2; }
[data-accent="indigo"] { --primary: #6366f1; --primary-dark: #4f46e5; --accent-primary: #6366f1; --accent-secondary: #4f46e5; }
[data-accent="gray"] { --primary: #6b7280; --primary-dark: #4b5563; --accent-primary: #6b7280; --accent-secondary: #4b5563; }

/* Base Body */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    min-height: 100vh;
    padding-bottom: 80px; /* Space for mobile nav */
}

@media (min-width: 768px) {
    body {
        padding-bottom: 0;
        padding-top: 64px; /* Space for desktop header */
    }
}

/* Prevent zoom on iOS inputs */
input, select, textarea {
    font-size: 16px !important;
}

/* Remove tap highlight */
button, .btn, .nav-item, .bill-card, a {
    -webkit-tap-highlight-color: transparent;
}

/* Prevent text selection on interactive elements */
.nav-item, .bill-card, .btn {
    -webkit-user-select: none;
    user-select: none;
}

/* ============================================
   LAYOUT
   ============================================ */

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

@media (min-width: 768px) {
    .page-container {
        padding: 2rem;
    }
}

.main-content {
    margin-bottom: 2rem;
}

/* Desktop/Mobile visibility */
.desktop-only { display: none !important; }
.mobile-only { display: block; }

@media (min-width: 768px) {
    .desktop-only { display: block !important; }
    .mobile-only { display: none !important; }
}

/* ============================================
   HEADER
   ============================================ */

.app-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: none;
}

@media (min-width: 768px) {
    .app-header {
        display: block;
    }
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-brand .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
}

.desktop-nav {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-link .nav-icon {
    width: 20px;
    height: 20px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.notification-btn:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.notification-btn svg {
    width: 24px;
    height: 24px;
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* User Menu Dropdown */
.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.user-menu-btn:hover {
    background: var(--gray-100);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-name {
    font-weight: 500;
    color: var(--text-primary);
}

.dropdown-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--gray-100);
}

.dropdown-item svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.dropdown-item.danger {
    color: var(--danger);
}

.dropdown-item.danger svg {
    color: var(--danger);
}

.dropdown-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 0.5rem 0;
}

/* ============================================
   MOBILE NAVIGATION
   ============================================ */

.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    box-shadow: 0 -1px 3px var(--shadow-color);
    z-index: 50;
}

@media (display-mode: standalone) {
    .mobile-nav {
        padding-bottom: max(1.25rem, calc(env(safe-area-inset-bottom) + 0.75rem));
    }
}

@media (min-width: 768px) {
    .mobile-nav {
        display: none;
    }
}

.mobile-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--gray-500);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0.75rem;
    margin: 0.25rem;
}

.mobile-nav .nav-item.active {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
}

.mobile-nav .nav-item .nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 0.25rem;
}

.mobile-nav .nav-item span {
    font-size: 0.75rem;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

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

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--bg-card);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px var(--shadow-color);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.card-title {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-primary);
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ============================================
   NOTIFICATIONS (TOASTS)
   ============================================ */

#notificationContainer {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    #notificationContainer {
        top: 80px;
    }
}

.notification {
    background: var(--bg-card);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 350px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid var(--success);
}

.notification.error {
    border-left: 4px solid var(--danger);
}

.notification.info {
    border-left: 4px solid var(--primary);
}

.notification.warning {
    border-left: 4px solid var(--warning);
}

/* ============================================
   NOTIFICATION PANEL (POPOUT)
   ============================================ */

.notification-panel {
    position: fixed;
    top: 64px;
    right: 1rem;
    width: 360px;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 80px);
    background: var(--bg-card);
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.notification-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.notification-panel-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-panel-header .unread-count {
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
}

.notification-panel-actions {
    display: flex;
    gap: 0.5rem;
}

.panel-action-btn {
    background: none;
    border: none;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: background 0.15s, color 0.15s;
}

.panel-action-btn:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.panel-action-btn.danger:hover {
    background: var(--danger-bg, rgba(239, 68, 68, 0.1));
    color: var(--danger);
}

.notification-panel-list {
    overflow-y: auto;
    max-height: 400px;
    flex: 1;
}

.notification-panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.notification-panel-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.notification-panel-empty p {
    margin: 0;
    font-size: 0.875rem;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: var(--gray-50);
}

.notification-item.unread {
    background: var(--primary-bg, rgba(37, 99, 235, 0.05));
}

.notification-item.unread:hover {
    background: var(--primary-bg-hover, rgba(37, 99, 235, 0.08));
}

.notification-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--gray-100);
}

.notification-item-icon svg {
    width: 16px;
    height: 16px;
}

.notification-item-icon.success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.notification-item-icon.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.notification-item-icon.warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.notification-item-icon.info {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary);
}

.notification-item-content {
    flex: 1;
    min-width: 0;
}

.notification-item-message {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.notification-item-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.notification-item-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 0.5rem;
}

/* Dark mode adjustments for notification panel */
[data-theme="dark"] .notification-panel {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .notification-item.unread {
    background: rgba(37, 99, 235, 0.1);
}

[data-theme="dark"] .notification-item:hover {
    background: var(--gray-800);
}

[data-theme="dark"] .panel-action-btn:hover {
    background: var(--gray-700);
}

[data-theme="dark"] .bill-card.paid {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
    border-color: rgba(34, 197, 94, 0.4);
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .notification-panel {
        right: 0.5rem;
        left: 0.5rem;
        width: auto;
        max-width: none;
    }
}

/* ============================================
   MODALS
   ============================================ */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-backdrop.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 0.75rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ============================================
   LOADING
   ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================
   BILL CARDS
   ============================================ */

.bill-card {
    background: var(--bg-card);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    position: relative;
}

.bill-card:hover {
    box-shadow: 0 2px 8px var(--shadow-color);
}

.bill-card.paid {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(34, 197, 94, 0.03) 100%);
    border-color: rgba(34, 197, 94, 0.3);
}

.bill-card.paid .bill-name {
    color: var(--text-secondary);
}

.bill-card.paid .bill-amount {
    color: var(--success);
}

.bill-card.paid::before {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--success);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.bill-content {
    flex: 1;
    min-width: 0;
}

.bill-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.bill-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
}

.bill-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bill-metadata {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.bill-amount {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-primary);
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
}

/* Override amount difference indicator */
.amount-diff {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.amount-diff.amount-increase {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.amount-diff.amount-decrease {
    color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}

/* Bill with override styling */
.bill-card.has-override {
    border-left: 3px solid var(--warning, #f59e0b);
}

/* Edited badge */
.type-badge.edited {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning, #f59e0b);
}

/* Skipped badge */
.type-badge.skipped {
    background: rgba(107, 114, 128, 0.15);
    color: var(--gray-500, #6b7280);
}

/* Skipped bill card styling */
.bill-card.skipped {
    opacity: 0.6;
    background: var(--gray-50, #f9fafb);
    border-style: dashed;
}

.bill-card.skipped .bill-name {
    color: var(--text-secondary);
}

.bill-card.skipped .bill-amount {
    color: var(--text-secondary);
}

[data-theme="dark"] .bill-card.skipped {
    background: var(--gray-800, #1f2937);
}

.bill-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.type-badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-weight: 500;
    text-transform: uppercase;
}

.type-badge.partner {
    background: var(--secondary);
    color: white;
}

.type-badge.oneoff {
    background: var(--warning);
    color: white;
}

/* Bill action overlay */
.bill-actions-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.bill-action-btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s;
}

.bill-action-btn:hover {
    transform: scale(1.05);
}

/* ============================================
   SUMMARY CARDS
   ============================================ */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .summary-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.summary-card {
    background: var(--bg-card);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
}

.summary-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .summary-value {
        font-size: 1.75rem;
    }
}

/* ============================================
   EMPTY STATES
   ============================================ */

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-secondary); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.hidden { display: none !important; }
