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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f172a;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
}

p {
    font-size: 0.875rem;
    color: #64748b;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* Header */
.header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0;
    transition: opacity 0.2s;
}

.header-title:hover {
    opacity: 0.8;
}

.header-title i {
    font-size: 2rem;
    color: #2563eb;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.main-content > * + * {
    margin-top: 1.5rem;
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid #e2e8f0;
    margin-top: 4rem;
    padding: 2rem 0;
}

.footer p {
    text-align: center;
}

/* Card */
.card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.card-description {
    font-size: 0.875rem;
    color: #64748b;
}

.card-content {
    padding: 1.5rem;
}

/* Input */
.input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    outline: none;
    transition: border-color 0.2s;
}

.input:focus {
    border-color: #2563eb;
}

.input-icon {
    position: relative;
}

.input-icon input {
    padding-left: 2.5rem;
}

.input-icon i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    background: #dbeafe;
    color: #1e40af;
    margin-left: 0.5rem;
}

.badge:empty {
    display: none;
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.813rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
    background: white;
    color: #0f172a;
    cursor: pointer;
    transition: all 0.2s;
    gap: 0.5rem;
}

.btn:hover {
    background: #f8fafc;
}

/* Grid */
.grid {
    display: grid;
    gap: 1rem;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Utilities */
.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }

.text-slate-900 {
    color: #0f172a;
}

.text-muted {
    color: #64748b;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shrink-0 {
    flex-shrink: 0;
}

.flex-1 {
    flex: 1 1 0%;
}

.min-w-0 {
    min-width: 0;
}

/* Tabs */
.tabs {
    margin-top: 1.5rem;
}

.tabs-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0;
}

.tab-trigger {
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #64748b;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-trigger:hover {
    color: #0f172a;
}

.tab-trigger.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.tab-content {
    display: none;
    margin-top: 1.5rem;
}

.tab-content.active {
    display: block;
}

@media (max-width: 768px) {
    .tabs-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 0;
}

.empty-state i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1rem;
}

/* Bill Item */
.bill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.bill-item:hover {
    background-color: #f8fafc;
}

/* Member Card */
.member-card {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.member-card:hover {
    background-color: #f8fafc;
}

.avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Party Circle */
.party-circle {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    flex-shrink: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    margin-top: 0.75rem;
}

.stat-item {
    padding: 0.5rem;
    border-radius: 0.375rem;
}

.stat-item.success {
    background: #f0fdf4;
}

.stat-item.warning {
    background: #fefce8;
}

.stat-item.danger {
    background: #fef2f2;
}

.stat-label {
    color: #64748b;
    margin-bottom: 0.25rem;
}

.stat-label.success {
    color: #16a34a;
}

.stat-label.warning {
    color: #ca8a04;
}

.stat-label.danger {
    color: #dc2626;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.section-header.bills i {
    color: #2563eb;
    font-size: 1.25rem;
}

.section-header.members i {
    color: #16a34a;
    font-size: 1.25rem;
}

.section-header.parties i {
    color: #9333ea;
    font-size: 1.25rem;
}
