/* ============================================
   ECOERG Main Stylesheet
   Modular CSS entry point — imports all partials
   ============================================ */

@import "_variables.css?v=v4";
@import "_reset.css?v=v4";
@import "_typography.css?v=v2";
@import "_splash.css?v=v1";
@import "_layout.css?v=v7";

@import "components/custom-dropdown.css?v=v3";
/* ---- Shared UI Components (single source of truth) ---- */
@import "components/buttons.css?v=v3";
@import "components/tabs.css?v=v2";
@import "_forms.css?v=v2";          /* backward compat → imports components/forms/*.css */
@import "components/tables.css?v=v3";
@import "components/cards.css?v=v6";
@import "components/modals.css?v=v5";
@import "components/navigation.css?v=v2";

/* ---- Utilities & Widgets ---- */
@import "_pagination.css?v=v2";
@import "_filters.css?v=v3";
@import "_autocomplete.css?v=v2";
@import "_calendar.css?v=v2";
@import "_toast.css?v=v3";
@import "_utilities.css?v=v6";

/* ---- Page-specific overrides (should NOT redefine components) ---- */
@import "_counterparty.css?v=v5";
@import "_correspondence.css?v=v2";
@import "_offer.css?v=v7";
@import "_pv_handover.css?v=v2";
@import "_config.css?v=v3";
@import "_analyzer.css?v=v2";
@import "_manager.css?v=v3";
@import "_hidrocad.css?v=v77";
@import "_hq_analysis.css?v=v17";
@import "pages/table-fragment.css?v=v1";
@import "pages/reconciliation.css?v=v1";

/* Fix: Remove any list markers or pseudo-elements from card descriptions */
.card-body p,
.dashboard-header p.text-muted,
.dashboard-header p.hc-text-muted,
.text-muted,
.hc-text-muted {
  list-style: none !important;
  list-style-type: none !important;
}
.card-body p::before,
.card-body p::after,
.dashboard-header p.text-muted::before,
.dashboard-header p.text-muted::after,
.dashboard-header p.hc-text-muted::before,
.dashboard-header p.hc-text-muted::after,
.text-muted::before,
.text-muted::after,
.hc-text-muted::before,
.hc-text-muted::after {
  content: none !important;
}
/* ── No-auth: hide app shell chrome for login page ── */
body.no-auth .top-bar,
body.no-auth .sidebar { display: none !important; }
body.no-auth .app-shell { display: block !important; margin: 0; padding: 0; height: 100vh; }
body.no-auth .app-body { margin: 0; padding: 0; height: 100%; display: flex !important; flex-direction: row !important; }
body.no-auth .main-content { margin: 0; padding: 0 !important; width: 100% !important; flex: 1 !important; display: flex !important; align-items: center !important; justify-content: center !important; flex-direction: row !important; }
body.no-auth .content-scroll { overflow: visible !important; height: auto !important; flex: none !important; padding: 0 !important; }
body.no-auth .container { max-width: 420px !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }

/* ── Login card layout ── */
.login-card { width: 100%; max-width: 380px; padding: 2rem; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06); border: 1px solid var(--color-border, #e5e7eb); background: var(--color-surface, #fff); }
.login-header { text-align: center; margin-bottom: 1.5rem; }
.login-header h2 { margin: 0.5rem 0 0.25rem; }
.login-header .muted { margin: 0; color: var(--color-text-secondary, #6b7280); }
.login-error { color: var(--color-danger, #dc2626); background: var(--color-danger-bg, #fef2f2); padding: 0.5rem 0.75rem; border-radius: var(--radius-sm, 4px); font-size: 0.875rem; margin: 0 0 1rem; }
#login-status { min-height: 1.25rem; text-align: center; margin-bottom: 0.75rem; }
#login-status.hidden { display: block !important; visibility: hidden; }

/* ── Splash Error ──────────────────────────────────── */
.splash-error { text-align: center; padding: 2rem; margin: 2rem auto; max-width: 480px; }
.splash-error-icon { font-size: 3rem; margin-bottom: 1rem; }
.splash-error h2 { margin: 0 0 0.5rem; color: var(--color-danger, #dc2626); font-size: 1.25rem; }
.splash-error p { margin: 0 0 0.5rem; }
.splash-error .muted { color: var(--color-text-secondary, #6b7280); font-size: 0.875rem; }
.splash-error code { background: var(--color-danger-bg, #fef2f2); padding: 0.125rem 0.375rem; border-radius: 4px; font-size: 0.8125rem; }
