/* 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;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
}

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;
}

.header-title h1 {
    text-align: left;
}

.header-title p {
    text-align: left;
    margin: 0;
}

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

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

/* 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;
    transition: box-shadow 0.2s;
}

.card-hover {
    cursor: pointer;
}

.card-hover:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.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;
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    gap: 0.5rem;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

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

.btn-outline {
    background: white;
    border: 1px solid #e2e8f0;
    color: #0f172a;
}

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

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* 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;
}

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

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

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

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

@media (max-width: 768px) {
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        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);
    }
    
    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

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

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

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

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

.text-right {
    text-align: right;
}

.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;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero h2 {
    margin-bottom: 1rem;
}

.hero p {
    max-width: 42rem;
    margin: 0 auto 1.5rem;
    font-size: 1rem;
}

.hero-search {
    display: flex;
    gap: 0.75rem;
    max-width: 42rem;
    margin: 0 auto;
}

.hero-search input {
    flex: 1;
}

@media (max-width: 768px) {
    .hero-search {
        flex-direction: column;
    }
}

/* Stat Card */
.stat-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.5rem;
}

.stat-card i {
    font-size: 1rem;
    color: #94a3b8;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: #0f172a;
}

/* 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;
    cursor: pointer;
}

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

.bill-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    flex-shrink: 0;
    font-weight: 600;
}

.rank-1 {
    background: #fef3c7;
    color: #92400e;
}

.rank-2 {
    background: #f1f5f9;
    color: #475569;
}

.rank-3 {
    background: #fed7aa;
    color: #9a3412;
}

.rank-default {
    background: #dbeafe;
    color: #1e40af;
}

/* Member Item */
.member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
    cursor: pointer;
}

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

.member-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.member-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    flex-shrink: 0;
    font-weight: 600;
    font-size: 0.875rem;
}

.rank-hot-1 {
    background: #fee2e2;
    color: #991b1b;
}

.rank-hot-2 {
    background: #fed7aa;
    color: #9a3412;
}

.rank-hot-3 {
    background: #fef3c7;
    color: #92400e;
}

.member-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #dc2626;
    font-weight: 500;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

.chart-container-sm {
    height: 200px;
}

/* CTA Section */
.cta-card {
    background: linear-gradient(to right, #eff6ff, #eef2ff);
    border-color: #bfdbfe;
}
