/* 
 * Premium Minimal Soft Slate & Gray Theme - SSR Party
 * Ultra-Compact Roster Grid Layout
 */

:root {
    --bg-page: #f1f5f9;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent: #059669;
    --accent-bg: #ecfdf5;
    --accent-border: #a7f3d0;
    --dark-card-bg: #0f172a;
    --dark-card-text: #ffffff;
    --radius-lg: 16px;
    --radius-md: 8px;
    --shadow-soft: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.02);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    min-height: 100vh;
    padding: 16px 12px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.container {
    width: 100%;
    max-width: 480px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    box-shadow: var(--shadow-soft);
}

/* Header */
.app-header {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--card-border);
}

.app-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Expense Summary (Compact Dark Slate Card with Ambient Glow) */
.summary-card {
    background: var(--dark-card-bg);
    color: var(--dark-card-text);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.25), 0 0 15px rgba(56, 189, 248, 0.12);
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #38bdf8, #34d399, #fbbf24);
}

.summary-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.expense-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 3px 0;
    color: #94a3b8;
}

.summary-card-divider {
    border-top: 1px dashed #334155;
    margin: 10px 0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    color: #f8fafc;
}

.split-box {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.split-label {
    font-size: 13px;
    color: #94a3b8;
}

.split-amount {
    font-size: 18px;
    font-weight: 800;
    color: #34d399;
}

/* Action Buttons */
.btn {
    width: 100%;
    padding: 11px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #0f172a;
    color: #ffffff;
}

.btn-primary:hover {
    background: #1e293b;
}

.btn-outline {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid var(--card-border);
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.row-btn {
    display: flex;
    gap: 8px;
}

.row-btn .col {
    flex: 1;
}

/* Ultra-Compact 2-Column Roster Grid */
.roster-section {
    margin-top: 16px;
}

.roster-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.roster-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.roster-subtitle {
    font-size: 11px;
    color: var(--text-muted);
}

.roster-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.roster-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.roster-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.roster-item.checked {
    background: var(--accent-bg);
    border-color: var(--accent-border);
}

.roster-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 4px;
}

.roster-item.checked .roster-name {
    color: #065f46;
}

.check-box {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: transparent;
    transition: all 0.15s ease;
}

.roster-item.checked .check-box {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

/* Form inputs */
.form-group {
    margin-bottom: 12px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-control, .textarea-control {
    width: 100%;
    padding: 9px 12px;
    background: #f8fafc;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus, .textarea-control:focus {
    background: #ffffff;
    border-color: #0f172a;
}

.textarea-control {
    min-height: 75px;
    line-height: 1.4;
    resize: vertical;
}

/* Admin Dashboard Stats Grid */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

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

.stat-card-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

.stat-card-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

/* Stat card color variants */
.stat-card-total .stat-card-icon { background: rgba(99, 102, 241, 0.12); color: #6366f1; }
.stat-card-football .stat-card-icon { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.stat-card-party .stat-card-icon { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.stat-card-other .stat-card-icon { background: rgba(236, 72, 153, 0.12); color: #ec4899; }
.stat-card-people .stat-card-icon { background: rgba(14, 165, 233, 0.12); color: #0ea5e9; }
.stat-card-money .stat-card-icon { background: rgba(34, 197, 94, 0.12); color: #22c55e; }

/* Category Pills & Badges */
.category-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 12px;
}

.category-tab {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #f1f5f9;
    color: var(--text-muted);
    border: 1px solid var(--card-border);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.category-tab.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-football { background: rgba(16, 185, 129, 0.15); color: #047857; }
.badge-party { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.badge-other { background: rgba(236, 72, 153, 0.15); color: #be185d; }

/* Group Cards List */
.group-cards-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.admin-group-card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    transition: all 0.2s ease;
}

.admin-group-card.active-group {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.admin-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.admin-group-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.admin-group-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Progress bar */
.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: #10b981;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Modal UI */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 16px;
}

.modal-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* UX Innovations */
@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.02); }
    100% { opacity: 1; transform: scale(1); }
}

.pulse-animation {
    animation: pulse 1s infinite;
}

@keyframes syncFlash {
    0% { background-color: rgba(16, 185, 129, 0.3); }
    100% { background-color: #ffffff; }
}

.sync-flash {
    animation: syncFlash 1.5s ease-out;
}

@keyframes highlightFlash {
    0% { background-color: rgba(16, 185, 129, 0.4); transform: scale(1.02); }
    100% { background-color: transparent; transform: scale(1); }
}

.highlight-flash {
    animation: highlightFlash 2s ease-out;
    border-color: #10b981 !important;
    z-index: 10;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.badge-live { background: rgba(56, 189, 248, 0.15); color: #0284c7; }
.badge-manual { background: rgba(100, 116, 139, 0.15); color: #475569; }

