/* Billing area styling. Kept light and friendly, works on top of Bootstrap 3. */

.billing-wrap { margin-bottom: 40px; }

.billing-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.billing-head h1 { font-size: 24px; margin: 0; }
.billing-sub { color: #7a8593; margin: 0 0 18px; }

/* KPI cards */
.kpi-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.kpi { flex: 1 1 180px; background: #fff; border: 1px solid #eceef1; border-radius: 12px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.kpi .kpi-label { color: #8a94a3; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.kpi .kpi-value { font-size: 26px; font-weight: 700; color: #1f2a37; margin-top: 4px; }
.kpi .kpi-value small { font-size: 13px; font-weight: 600; color: #98a2b3; }
.kpi.kpi-accent { border-top: 3px solid #2e7bea; }
.kpi.kpi-good   { border-top: 3px solid #17a672; }
.kpi.kpi-warn   { border-top: 3px solid #e6a532; }
.kpi.kpi-bad    { border-top: 3px solid #e05260; }

/* Soft panel wrapping tables and forms */
.soft-panel { background: #fff; border: 1px solid #eceef1; border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04); margin-bottom: 22px; }
.soft-panel > .soft-panel-head { padding: 14px 18px; border-bottom: 1px solid #f0f2f5; font-weight: 600; color: #344054; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.soft-panel > .soft-panel-body { padding: 16px 18px; }
.soft-panel table { margin-bottom: 0; }

/* Status pills */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.4; }
.pill-active   { background: #e6f7ef; color: #0f7a52; }
.pill-blocked  { background: #fdecee; color: #b42431; }
.pill-pending  { background: #fff4e2; color: #a5711a; }
.pill-approved { background: #e6f7ef; color: #0f7a52; }
.pill-rejected { background: #fdecee; color: #b42431; }
.pill-muted    { background: #eef1f5; color: #667085; }

.amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount-neg { color: #b42431; }

/* Empty state */
.empty-state { text-align: center; padding: 40px 20px; color: #98a2b3; }
.empty-state .emoji { font-size: 34px; display: block; margin-bottom: 8px; }

/* Buttons spacing in table rows */
.row-actions form { display: inline; }
.row-actions .btn { margin-right: 4px; }

/* Home cards a touch nicer */
.link a { color: inherit; text-decoration: none; }

.billing-dashboard {
    max-width: 1400px;
    margin: 0 auto;
}

.letter-spacing-1 {
    letter-spacing: 0.05em;
}

/** home **/
/* Dashboard Container Styling */
.dash-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #0f172a;
}

/* Hero Section */
.dash-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.dash-pill-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #15803d;
    background-color: #f0fdf4;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #bbf7d0;
    margin-bottom: 12px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: #22c55e;
    border-radius: 50%;
}

.dash-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.dash-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.dash-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

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

.dash-btn-primary:hover {
    background-color: #1d4ed8;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Stats Row */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 8px;
}

.stat-value-group {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 6px;
}

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

.stat-unit {
    font-size: 12px;
    color: #94a3b8;
}

.stat-trend {
    font-size: 12px;
    font-weight: 500;
}

.trend-up { color: #16a34a; }
.trend-warn { color: #d97706; }

/* Dashboard Sections */
.dash-section {
    margin-bottom: 36px;
}

.section-header {
    margin-bottom: 16px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 2px 0;
    letter-spacing: -0.01em;
}

.section-desc {
    font-size: 13px;
    color: #64748b;
}

/* Grid & Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.action-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.card-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-emoji {
    font-size: 22px;
    line-height: 1;
}

.card-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-label {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 6px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-arrow {
    font-size: 16px;
    color: #94a3b8;
    transition: transform 0.2s ease, color 0.2s ease;
}

.action-card:hover .card-arrow {
    color: #0f172a;
    transform: translateX(4px);
}

.card-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .dash-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
    }
}
