/* Jungle Marketing Toolkit web theme — same Stripe/QuickBooks-style palette as the MAUI client
   (Resources/Styles/Colors.xaml), so both clients read as one product. */

@font-face {
    font-family: 'MaterialIconsOutlined';
    src: url('/fonts/MaterialIconsOutlined-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary: #2F6B1D;
    --primary-dark: #1F4A13;
    --primary-light: #EAF3E3;

    --sidebar-bg: #0B2F17;
    --sidebar-item-hover: #143D22;
    --sidebar-item-active: #2F6B1D;
    --sidebar-text: #C9DDBF;
    --sidebar-text-muted: #7FA06E;
    --sidebar-text-active: #FFFFFF;

    --page-bg: #FBF8F0;
    --surface: #FFFFFF;
    --border: #E7E0D0;
    --border-strong: #D6CCB0;

    --text-primary: #1B2A1E;
    --text-secondary: #4B5A4D;
    --text-muted: #8B9689;

    --success: #15803D;
    --success-light: #EAF6EA;
    --warning: #B45309;
    --warning-light: #FEF3E2;
    --danger: #B91C1C;
    --danger-light: #FEECEC;
    --info: #2563A6;
    --info-light: #EAF2FA;

    --gray-100: #F3F1E8;
    --cream: #FCF4E0;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--page-bg);
    color: var(--text-primary);
    font-size: 14px;
}

.icon {
    font-family: 'MaterialIconsOutlined';
    font-style: normal;
    line-height: 1;
    vertical-align: middle;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== App shell ===== */

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 248px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header { padding: 24px 20px 16px; }
.sidebar-header .brand-logo { width: 40px; height: 40px; display: block; margin-bottom: 8px; }
.sidebar-header .brand { color: #fff; font-size: 18px; font-weight: 700; margin: 0; }
.sidebar-header .tenant { color: var(--sidebar-text-muted); font-size: 12px; margin: 4px 0 0; }

.sidebar-nav { flex: 1; padding: 0 12px 12px; }

.nav-section-title {
    color: var(--sidebar-text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    margin: 16px 0 4px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--sidebar-text);
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}
.nav-item:hover { background: var(--sidebar-item-hover); text-decoration: none; }
.nav-item.active { background: var(--sidebar-item-active); color: var(--sidebar-text-active); font-weight: 600; }
.nav-item .icon { color: inherit; font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer { padding: 8px 12px 16px; border-top: 1px solid var(--sidebar-item-hover); margin-top: 8px; }

/* ===== Main area ===== */

.main-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 24px; font-weight: 700; margin: 0; flex: 1; }

.content { padding: 24px; max-width: 1200px; }

/* ===== Building blocks ===== */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}

.info-callout {
    background: var(--info-light);
    border: 1px solid var(--info);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 16px;
    font-size: 13px;
}

.kpi-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.kpi-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    min-width: 180px;
}
.kpi-tile .accent { width: 28px; height: 3px; margin-bottom: 6px; }
.kpi-tile .value { font-size: 28px; font-weight: 700; }
.kpi-tile .label { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid;
}
.badge-success { background: var(--success-light); border-color: var(--success); color: var(--success); }
.badge-warning { background: var(--warning-light); border-color: var(--warning); color: var(--warning); }
.badge-danger { background: var(--danger-light); border-color: var(--danger); color: var(--danger); }
.badge-neutral { background: var(--gray-100); border-color: var(--border-strong); color: var(--text-secondary); }

table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th {
    text-align: left;
    background: var(--gray-100);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    padding: 10px 12px;
}
table.data-table td { padding: 10px 12px; border-top: 1px solid var(--border); vertical-align: top; }
table.data-table tr:hover td { background: var(--page-bg); }

.section-header { font-size: 17px; font-weight: 700; margin: 0 0 10px; }
.caption { font-size: 12px; color: var(--text-muted); }
.body-text { font-size: 14px; color: var(--text-secondary); }
.error-text { font-size: 13px; color: var(--danger); }

.form-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.form-row label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.form-row input, .form-row select, .form-row textarea {
    padding: 8px 10px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input, select, textarea {
    padding: 8px 10px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.btn:hover { background: var(--primary-dark); }
.btn:disabled { background: var(--border-strong); color: var(--text-muted); cursor: default; }

.btn-secondary { background: var(--surface); color: var(--text-primary); border: 1px solid var(--border-strong); font-weight: 400; }
.btn-secondary:hover { background: var(--gray-100); }

.btn-danger { background: var(--surface); color: var(--danger); border: 1px solid var(--danger); font-weight: 400; }
.btn-danger:hover { background: var(--danger-light); }

.card-clickable { cursor: pointer; }
.card-clickable:hover { border-color: var(--primary); }

/* ===== Auth pages ===== */

.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--page-bg); }
.auth-card { width: 100%; max-width: 380px; }

/* ===== Wizard ===== */

.wizard-page { min-height: 100vh; background: var(--page-bg); }
.wizard-container { max-width: 620px; margin: 0 auto; padding: 24px; }
.wizard-steps { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; }
.wizard-dot { width: 8px; height: 8px; border-radius: 4px; background: var(--border-strong); }
.wizard-dot.active { background: var(--primary); }
.wizard-actions { display: flex; justify-content: space-between; margin-top: 16px; }
.wizard-actions .right-group { display: flex; gap: 8px; }

/* ===== Blazor error UI (the project template's own CSS bundle isn't generated —
   no .razor.css files exist in this project — so this rule has to live here) ===== */

#blazor-error-ui {
    background: var(--warning-light);
    border-top: 1px solid var(--warning);
    bottom: 0;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.15);
    display: none;
    left: 0;
    padding: 0.8rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 13px;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 0.7rem;
}
