/* Root in Christ — small custom styles on top of Tailwind */

html { scroll-behavior: smooth; }

body {
    font-family: Inter, system-ui, 'Segoe UI', Roboto, sans-serif;
}

a.dash-stat-card,
a.dash-panel { text-decoration: none; color: inherit; }

table.app-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
}
table.app-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    vertical-align: middle;
}
table.app-table tbody tr:hover { background: #f8fafc; }

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #d49b1d;
    box-shadow: 0 0 0 3px rgba(212, 155, 29, .18);
}
.form-label { display: block; font-size: 12px; color: #475569; font-weight: 500; margin-bottom: 4px; }

.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: 8px; font-size: 14px; font-weight: 500; transition: background .15s, color .15s, box-shadow .15s, transform .05s; cursor: pointer; border: 1px solid transparent; }
.btn-primary    { background: linear-gradient(180deg, #d49b1d 0%, #b07a14 100%); color: white; box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 1px 2px rgba(0,0,0,.12); }
.btn-primary:hover { background: linear-gradient(180deg, #b07a14 0%, #8a5d10 100%); }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary  { background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-danger     { background: #c83019; color: white; }
.btn-danger:hover { background: #a02613; }
.btn-ghost      { color: #475569; }
.btn-ghost:hover { background: #f1f5f9; }
.btn-flame      { background: linear-gradient(180deg, #e94020 0%, #c83019 100%); color: white; }
.btn-flame:hover { background: linear-gradient(180deg, #c83019 0%, #a02613 100%); }

.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #64748b; margin-bottom: 8px; font-weight: 600; }

[data-flash] { animation: flash-in .25s ease-out; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Dashboard */
.dash-hero {
    background: linear-gradient(135deg, #1a1208 0%, #2d1f0a 45%, #1a1208 100%) !important;
    border: 1px solid rgba(212, 155, 29, .22);
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
    color: #f8fafc;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.dash-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -5%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(212, 155, 29, .18) 0%, transparent 70%);
    pointer-events: none;
}
.dash-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(233, 64, 32, .12) 0%, transparent 70%);
    pointer-events: none;
}
.dash-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
@media (min-width: 1024px) {
    .dash-hero-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}
.dash-hero-date {
    font-size: .875rem;
    font-weight: 500;
    color: #f0c850;
    margin-bottom: .25rem;
}
.dash-hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
    color: #ffffff;
}
@media (min-width: 640px) {
    .dash-hero-title { font-size: 2rem; }
}
.dash-hero-subtitle {
    font-size: .875rem;
    color: #cbd5e1;
    margin-top: .5rem;
    max-width: 36rem;
    line-height: 1.5;
}
.dash-hero-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
}
.dash-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .85rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
}
.dash-hero-badge--role {
    background: rgba(176, 122, 20, .25);
    color: #fbecbd;
    border: 1px solid rgba(212, 155, 29, .35);
}
.dash-hero-badge--stat {
    background: rgba(255, 255, 255, .06);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, .12);
    font-weight: 500;
}
.dash-hero-badge--stat i { color: #e6b226; }

.dash-grid-4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 640px) {
    .dash-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
    .dash-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.dash-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 1024px) {
    .dash-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.dash-grid-charts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 1280px) {
    .dash-grid-charts { grid-template-columns: 2fr 1fr; }
}
.dash-grid-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem;
}
@media (min-width: 640px) {
    .dash-grid-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .dash-grid-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.dash-stat-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

.dash-stat-card {
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 14px;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.dash-stat-card:hover {
    border-color: #d4dce8;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
    transform: translateY(-1px);
}
.dash-stat-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.dash-stat-icon--emerald { background: #ecfdf5; color: #059669; }
.dash-stat-icon--sky     { background: #f0f9ff; color: #0284c7; }
.dash-stat-icon--amber   { background: #fffbeb; color: #d97706; }
.dash-stat-icon--violet  { background: #f5f3ff; color: #7c3aed; }
.dash-stat-card:hover .dash-stat-icon--emerald { background: #d1fae5; }
.dash-stat-card:hover .dash-stat-icon--sky     { background: #e0f2fe; }
.dash-stat-card:hover .dash-stat-icon--amber   { background: #fef3c7; }
.dash-stat-card:hover .dash-stat-icon--violet  { background: #ede9fe; }
.dash-stat-meta strong,
.dash-stat-meta .text-emerald-600 { color: #059669; font-weight: 600; }
.dash-stat-label {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #64748b;
}
.dash-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
    letter-spacing: -.02em;
}
.dash-stat-meta {
    font-size: .75rem;
    color: #64748b;
    margin-top: .35rem;
}

.dash-section-title {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: .85rem;
}

.dash-quick-action {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .85rem 1rem;
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 12px;
    font-size: .875rem;
    font-weight: 500;
    color: #334155;
    transition: border-color .2s, background .2s, color .2s, box-shadow .2s;
}
.dash-quick-action:hover {
    border-color: #d49b1d;
    background: #fdf8e7;
    color: #69460c;
    box-shadow: 0 4px 12px rgba(212, 155, 29, .12);
}
.dash-quick-action i {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    color: #b07a14;
    font-size: .8rem;
    flex-shrink: 0;
    transition: background .2s, color .2s;
}
.dash-quick-action:hover i {
    background: #fbecbd;
    color: #8a5d10;
}

.dash-panel {
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    overflow: hidden;
}
.dash-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.35rem;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}
.dash-panel-title {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .95rem;
    font-weight: 600;
    color: #0f172a;
}
.dash-panel-title i {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    background: #fdf8e7;
    color: #b07a14;
}
.dash-panel-link {
    font-size: .75rem;
    font-weight: 500;
    color: #b07a14;
    white-space: nowrap;
}
.dash-panel-link:hover { color: #8a5d10; text-decoration: underline; }
.dash-panel-body { padding: 1.25rem 1.35rem; }

.dash-metric {
    padding: .85rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.dash-metric:last-child { border-bottom: none; padding-bottom: 0; }
.dash-metric:first-child { padding-top: 0; }
.dash-metric-label {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #94a3b8;
}
.dash-metric-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: .15rem;
}

.dash-progress-track {
    height: 8px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
}
.dash-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #d49b1d 0%, #e6b226 100%);
    transition: width .4s ease;
}
.dash-progress-fill--emerald {
    background: linear-gradient(90deg, #059669 0%, #34d399 100%);
}

.dash-finance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
@media (min-width: 768px) {
    .dash-finance-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .dash-finance-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.dash-finance-item {
    padding: .75rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}
.dash-finance-item .dash-metric-label { margin-bottom: .25rem; }
.dash-finance-item .dash-metric-value { font-size: 1rem; margin-top: 0; }

.dash-table-wrap .app-table th:first-child,
.dash-table-wrap .app-table td:first-child { padding-left: 1.35rem; }
.dash-table-wrap .app-table th:last-child,
.dash-table-wrap .app-table td:last-child { padding-right: 1.35rem; }
