:root {
    --primary: #0b5ed7;
    --primary-hover: #0a58ca;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --radius: 0.75rem;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
}

.hidden {
    display: none !important;
}

/* Login Screen */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: var(--primary);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    border: none;
    width: 100%;
}

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

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

/* Dashboard Layout */
.navbar {
    background-color: var(--white);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.25rem;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    font-size: 0.875rem;
    text-align: right;
}

.user-role {
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.main-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.kpi-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

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

/* Breakdown Cards */
.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.breakdown-card {
    background: var(--white);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.breakdown-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.breakdown-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.breakdown-value {
    font-weight: 700;
}

/* Charts & Actions */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border-color);
    padding: 2rem;
    text-align: center;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.upload-area:hover {
    border-color: var(--primary);
    background-color: rgba(11, 94, 215, 0.05);
}

.upload-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Error List */
.error-list {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #c53030;
}

.error-list ul {
    list-style: none;
    margin-top: 0.5rem;
}

/* Breakdown Detailed */
.breakdown-detailed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.breakdown-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.breakdown-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.breakdown-name {
    font-weight: 700;
    font-size: 1.125rem;
}

.breakdown-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.breakdown-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.bank-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bank-item {
    font-size: 0.75rem;
    background: var(--bg-light);
    padding: 0.5rem;
    border-radius: 0.25rem;
}

.bank-name {
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--primary);
}

.bank-statuses {
    display: flex;
    gap: 0.75rem;
}

.status-tag {
    display: inline-block;
}

.status-tag.success { color: #10b981; }
.status-tag.void { color: #ef4444; }
.status-tag.progress { color: #f59e0b; }

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .main-content {
        padding: 1rem;
    }
    .navbar {
        padding: 1rem;
    }
    .navbar-user span {
        display: none;
    }
}
