/* Styl MIDAR: panel wygląda jak część www.midar.net.pl.
   Źródło prawdy: repo strony, src/styles/global.css (tokeny), src/components/Header.astro, Footer.astro, Button.astro.
   Ładowany po CSS Filamentu (render hook HEAD_END), więc reguły tutaj wygrywają z warstwami Tailwinda. */

:root{
  --color-primary:#1f4e88;--color-primary-dark:#153863;
  --color-accent:#c2410c;--color-accent-hover:#9a3412;--color-accent-bright:#ea580c;--color-accent-on-dark:#fdba74;
  --color-bg:#f8fafc;--color-surface:#fff;--color-surface-muted:#f1f5f9;--color-border:#cbd5e1;--color-border-subtle:#e2e8f0;
  --color-text:#0f172a;--color-text-muted:#475569;--color-dark:#0f172a;--color-dark-2:#172554;
  --font-sans:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  --shadow-sm:0 1px 2px 0 rgb(0 0 0 / .05);
  --shadow-md:0 4px 6px -1px rgb(0 0 0 / .1),0 2px 4px -2px rgb(0 0 0 / .1);
  /* zaokrąglenia strony: 6 / 8 / 10 px (Filament: md/lg/xl) */
  --radius-md:6px;--radius-lg:8px;--radius-xl:10px;
}

/* ───────── Nagłówek jak na stronie (ekran logowania, strony ustawiania hasła) ───────── */
.midar-site-header{width:100%;background:var(--color-surface);border-bottom:1px solid var(--color-border);box-shadow:var(--shadow-sm);position:sticky;top:0;z-index:20}
.msh-inner{max-width:1240px;margin:0 auto;padding:0 1.25rem;min-height:64px;display:flex;align-items:center;justify-content:space-between;gap:.75rem}
.msh-brand{display:flex;align-items:center;min-height:44px;text-decoration:none}
.msh-brand img{display:block;height:32px;width:auto}
.msh-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.msh-actions{display:flex;align-items:center;gap:.5rem}
.msh-www{display:none;align-items:center;min-height:44px;padding:0 .4rem;color:var(--color-text-muted);font-size:.8rem;font-weight:500;text-decoration:none;border-radius:8px}
.msh-www:hover{color:var(--color-primary);text-decoration:underline}
@media(min-width:640px){.msh-www{display:inline-flex}}
.msh-phone{display:inline-flex;align-items:center;gap:.4rem;min-height:48px;padding:.4rem .5rem;color:var(--color-primary);font-weight:700;font-size:1.05rem;text-decoration:none;white-space:nowrap;border-radius:8px;transition:background-color .15s ease}
.msh-phone svg{color:var(--color-accent-bright);flex-shrink:0}
.msh-phone:hover{background:var(--color-surface-muted);color:var(--color-primary-dark)}
@media(min-width:1280px){.msh-inner{min-height:72px}}

/* ───────── Stopka jak na stronie ───────── */
.midar-site-footer{width:100%;margin-top:auto;background:#0f172a;color:#cbd5e1;font-family:var(--font-sans);font-size:.95rem;line-height:1.5;text-align:left}
.msf-main{max-width:1240px;margin:0 auto;padding:1.5rem 1.25rem 1rem;display:grid;grid-template-columns:minmax(0,1fr);gap:1rem;align-items:start}
@media(min-width:768px){.msf-main{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr);gap:2rem;padding-top:2rem;padding-bottom:1.5rem}}
.msf-brand{margin:0 0 .5rem;color:#fff;font-size:1.5rem;font-weight:700;letter-spacing:.04em;line-height:1.2}
.msf-address{font-style:normal;font-size:.92rem;color:#e2e8f0}
.msf-address strong{color:#fff}
.msf-contact{list-style:none;margin:0;padding:0}
@media(min-width:768px){.msf-contact{padding-top:2.3rem}.msf-hours{padding-top:2.3rem}}
.msf-contact a{display:inline-flex;align-items:center;gap:.35rem;min-height:36px;color:#e2e8f0;text-decoration:none;white-space:nowrap}
.msf-contact a:hover{color:var(--color-accent-on-dark);text-decoration:underline}
.msf-contact .msf-phone{color:var(--color-accent-on-dark);font-weight:700;font-size:1.2rem}
.msf-label{color:#cbd5e1}
.msf-hours{margin:0;display:flex;flex-direction:column;gap:.2rem;font-size:.92rem}
.msf-hours strong{color:#fff}
.msf-bottom{background:#020617;border-top:1px solid #1e293b;font-size:.85rem;color:#cbd5e1}
.msf-bottom-inner{max-width:1240px;margin:0 auto;padding:.5rem 1.25rem;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:0 1rem}
.msf-bottom p{margin:0}
.msf-bottom a{display:inline-flex;align-items:center;min-height:36px;color:#cbd5e1;text-decoration:none}
.msf-bottom a:hover{color:#fff}

/* ───────── Strony poza Filamentem (ustawianie hasła, link nieważny) ───────── */
.midar-page{margin:0;min-height:100vh;display:flex;flex-direction:column;font-family:var(--font-sans);font-size:17px;line-height:1.6;color:var(--color-text);background:var(--color-bg)}
.midar-main{flex:1;display:flex;justify-content:center;align-items:flex-start;padding:3rem 1rem}
.midar-card{width:100%;max-width:460px;background:var(--color-surface);border:1px solid var(--color-border-subtle);border-radius:10px;padding:1.75rem;box-shadow:var(--shadow-md)}
.midar-card h1{margin:0 0 .5rem;font-size:1.4rem;color:var(--color-primary-dark)}
.midar-card p{margin:.4rem 0}
.midar-muted{color:var(--color-text-muted);font-size:.92rem}
.midar-field{margin-top:1rem}
.midar-field label{display:block;font-weight:600;margin-bottom:.3rem}
.midar-field input{width:100%;box-sizing:border-box;min-height:44px;padding:.65rem .75rem;border:1px solid var(--color-border);border-radius:6px;font:inherit}
.midar-field input:focus{outline:2px solid var(--color-primary);outline-offset:1px}
.midar-error{color:#b91c1c;font-size:.92rem;margin-top:.3rem}
.midar-btn{margin-top:1.25rem;width:100%;min-height:48px;padding:.65rem 1.25rem;border:2px solid var(--color-accent);border-radius:8px;background:var(--color-accent);color:#fff;font:inherit;font-weight:600;cursor:pointer;box-shadow:0 4px 10px rgba(194,65,12,.25);transition:all .2s ease}
.midar-btn:hover{background:var(--color-accent-hover);border-color:var(--color-accent-hover);box-shadow:0 6px 14px rgba(194,65,12,.35)}
.midar-alert{background:#fff7ed;border:1px solid #fdba74;border-radius:6px;padding:.75rem 1rem;margin-top:1rem}

/* ───────── Filament: ekran logowania ───────── */
.fi-simple-layout{background:var(--color-bg)}
.fi-simple-main{margin-block:3rem;border-radius:10px;box-shadow:var(--shadow-md);--tw-ring-color:var(--color-border-subtle)}
/* logo jest w nagłówku strony nad kartą – w karcie zostaje sam tytuł */
.fi-simple-header .fi-logo{display:none}
.fi-simple-header-heading{color:var(--color-primary-dark);font-weight:700}

/* ───────── Filament: nagłówek panelu (topbar) jak nagłówek strony ───────── */
.fi-body{--topbar-height:4rem;color:var(--color-text)}
.fi-topbar{border-bottom:1px solid var(--color-border);box-shadow:var(--shadow-sm);--tw-ring-color:transparent}
.fi-logo{height:41px !important}

/* ───────── Filament: karty, tabele, sekcje (obramowanie #e2e8f0, cień sm, 10 px) ───────── */
.fi-section,.fi-ta-ctn,.fi-wi-stats-overview-stat,.fi-dropdown-panel,.fi-modal-window{--tw-ring-color:var(--color-border-subtle)}
.fi-input-wrp{--tw-ring-color:var(--color-border)}
/* nagłówki jak na stronie: tytuł strony i nagłówki treści w granacie --color-primary-dark */
.fi-header-heading{color:var(--color-primary-dark);letter-spacing:-.02em;font-weight:700}
.fi-section-header-heading,.fi-modal-heading{color:var(--color-primary-dark);font-weight:700}

/* ───────── Przyciski jak na stronie (Button.astro): 8 px, półgruby ───────── */
.fi-btn{font-weight:600}
/* Akcent pomarańczowy tylko dla głównych CTA, tak jak na stronie („Zgłoś usterkę”, „Wyślij zgłoszenie”):
   Zaloguj, „Nowe …” na listach, zapis formularza (Utwórz / Zapisz). Pozostałe przyciski główne zostają granatowe. */
.fi-simple-layout .fi-btn.fi-color-primary[type=submit],
.fi-resource-list-records-page .fi-header-actions-ctn .fi-btn.fi-color-primary,
.fi-page-content .fi-sc-form .fi-sc-actions .fi-btn.fi-color-primary[type=submit]:not(.fi-modal *){
  --bg:var(--color-accent);--hover-bg:var(--color-accent-hover);--text:#fff;--hover-text:#fff;--color-500:var(--color-accent);
  box-shadow:0 4px 10px rgba(194,65,12,.25);transition:background-color .2s ease,box-shadow .2s ease,transform .2s ease
}
.fi-simple-layout .fi-btn.fi-color-primary[type=submit]:hover,
.fi-resource-list-records-page .fi-header-actions-ctn .fi-btn.fi-color-primary:hover,
.fi-page-content .fi-sc-form .fi-sc-actions .fi-btn.fi-color-primary[type=submit]:not(.fi-modal *):hover{
  box-shadow:0 6px 14px rgba(194,65,12,.35);transform:translateY(-1px)
}
.fi-simple-layout .fi-btn.fi-color-primary[type=submit]{min-height:48px;font-size:1rem}
