/* stil_v1.css — macheta „Poarta de intrare + Acces unic (SSO)" — AGRO GISCAD
   Identitate: Arial, navy #1f4e5f, accent chihlimbar #c98a2c.
   Breakpoint mobil/desktop: 640px. */

:root {
  --navy: #1f4e5f;
  --navy-dark: #163944;
  --navy-light: #2c6478;
  --amber: #c98a2c;
  --amber-dark: #a8721f;
  --amber-light: #e6b866;
  --bg: #f3f5f6;
  --card: #ffffff;
  --border: #dfe4e7;
  --text: #1c2b30;
  --muted: #62767d;
  --danger: #a02020;
  --ok: #2a7a2a;
  --radius: 12px;
}

* , *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--navy); }

img { max-width: 100%; display: block; }

button, .btn {
  font-family: inherit;
  cursor: pointer;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  min-height: 44px;
  min-width: 44px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:active, .btn:active { transform: scale(0.98); }

.btn-primar {
  width: 100%;
  background: var(--navy);
  color: #fff;
  border: none;
}
.btn-primar:hover { background: var(--navy-light); }

.btn-accent {
  width: 100%;
  background: var(--amber);
  color: #fff;
  border: none;
}
.btn-accent:hover { background: var(--amber-dark); }

.btn-secundar {
  width: 100%;
  background: #eef2f4;
  border-color: var(--border);
  color: var(--navy-dark);
}

.btn-pericol {
  width: 100%;
  background: #fff5f5;
  border-color: #e0b0b0;
  color: var(--danger);
}

/* --- Layout pagini de autentificare (login, pin, resetare, schimb cont) --- */

.pagina-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 40px;
}

.card-auth {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 4px 18px rgba(31, 78, 95, 0.08);
}

.brand-auth { text-align: center; margin-bottom: 22px; }
.brand-auth .sigla {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--navy);
  color: var(--amber-light);
  font-weight: 800;
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
}
.brand-auth h1 { font-size: 18px; margin: 0 0 2px; color: var(--navy-dark); }
.brand-auth p { font-size: 12.5px; color: var(--muted); margin: 0; }

.camp { margin-bottom: 14px; }
.camp label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; font-weight: 700; }
.camp input[type=text], .camp input[type=email], .camp input[type=password] {
  width: 100%;
  padding: 12px 12px;
  border: 1px solid #c9d2d6;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  min-height: 44px;
  color: var(--text);
}
.camp input:focus { outline: 2px solid var(--amber-light); border-color: var(--amber); }

.rand-optiuni {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -4px 0 16px;
  font-size: 12.5px;
}
.rand-optiuni label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 400; }
.rand-optiuni input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--navy); }
.rand-optiuni a { color: var(--navy); font-weight: 700; text-decoration: none; }
.rand-optiuni a:hover { text-decoration: underline; }

.separator-sau {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em;
  margin: 18px 0 12px;
}
.separator-sau::before, .separator-sau::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.stiva { display: flex; flex-direction: column; gap: 10px; }

.link-secundar-google {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12.5px; color: var(--muted);
  padding: 8px; border-radius: 8px; text-decoration: none;
}
.link-secundar-google:hover { background: #f4f4f4; }
.link-secundar-google .g-ico {
  width: 16px; height: 16px; border-radius: 50%;
  background: conic-gradient(#4285F4 0 25%, #34A853 25% 50%, #FBBC05 50% 75%, #EA4335 75% 100%);
  display: inline-block;
}

.subsol-auth { text-align: center; margin-top: 18px; font-size: 12.5px; color: var(--muted); }
.subsol-auth a { color: var(--navy); font-weight: 700; text-decoration: none; }
.subsol-auth a:hover { text-decoration: underline; }

/* --- PIN --- */

.avatar-mic {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--navy-light); color: #fff; font-weight: 800; font-size: 18px;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 10px;
}

.dots-pin { display: flex; justify-content: center; gap: 14px; margin: 18px 0 26px; }
.dots-pin span {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--navy);
  display: block;
  transition: background 0.12s ease;
}
.dots-pin span.plin { background: var(--navy); }

.tastatura-pin {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.tastatura-pin button {
  aspect-ratio: 1 / 1;
  height: auto;
  min-height: 56px;
  font-size: 20px;
  font-weight: 700;
  border-radius: 50%;
  background: #f4f6f7;
  border: 1px solid var(--border);
  color: var(--navy-dark);
}
.tastatura-pin button:hover { background: #eaf0f2; }
.tastatura-pin button.tasta-goala { background: transparent; border: none; cursor: default; }
.tastatura-pin button.tasta-sterge { font-size: 16px; }

/* --- Schimb utilizator --- */

.lista-utilizatori { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.rand-utilizator {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  background: #fff;
}
.rand-utilizator:hover { background: #f7f9fa; border-color: var(--navy-light); }
.rand-utilizator .avatar-mic { margin: 0; flex-shrink: 0; width: 42px; height: 42px; font-size: 15px; }
.info-utilizator { flex: 1; min-width: 0; }
.info-utilizator .nume { font-weight: 700; font-size: 14.5px; }
.info-utilizator .email { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pastila-rol {
  font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 10px;
  background: #fdeecd; color: var(--amber-dark); white-space: nowrap;
}
.pastila-rol.operator { background: #e2f0ee; color: #0d5c53; }

/* --- Confirmare (resetare parola) --- */

.confirmare-box { text-align: center; padding: 10px 0; }
.confirmare-box .icon-ok {
  width: 56px; height: 56px; border-radius: 50%;
  background: #e5f3e5; color: var(--ok);
  font-size: 26px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.confirmare-box p { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.confirmare-box strong { color: var(--text); }

/* ============================================================
   ECRAN PRINCIPAL — aplicatii.html ("poarta")
   ============================================================ */

.antet-poarta {
  background: var(--navy);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.antet-poarta .brand-poarta { display: flex; align-items: center; gap: 10px; }
.antet-poarta .sigla-mica {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--amber);
  color: var(--navy-dark);
  font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.antet-poarta .brand-poarta .titluri { line-height: 1.15; }
.antet-poarta .brand-poarta strong { font-size: 15px; display: block; }
.antet-poarta .brand-poarta small { font-size: 11px; opacity: 0.85; }

.info-cont-poarta { display: flex; align-items: center; gap: 8px; position: relative; }
.info-cont-poarta .avatar-mic { width: 36px; height: 36px; font-size: 13px; margin: 0; background: var(--amber); color: var(--navy-dark); cursor: pointer; }
.meniu-cont {
  position: absolute;
  top: 46px; right: 0;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  width: 220px;
  padding: 10px;
  display: none;
  z-index: 60;
}
.meniu-cont.deschis { display: block; }
.meniu-cont .nume-utilizator { font-weight: 700; font-size: 14px; }
.meniu-cont .rol-utilizator { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.meniu-cont a, .meniu-cont .separator-meniu { display: block; }
.meniu-cont a {
  padding: 9px 8px; border-radius: 6px; text-decoration: none; color: var(--text); font-size: 13.5px;
}
.meniu-cont a:hover { background: #f4f6f7; }
.meniu-cont a.link-pericol { color: var(--danger); }
.meniu-cont .separator-meniu { height: 1px; background: var(--border); margin: 6px 0; }

.continut-poarta { max-width: 980px; margin: 0 auto; padding: 16px 16px calc(64px + 24px); }

.banda-pwa {
  display: flex; align-items: center; gap: 12px;
  background: #fdf1de; border: 1px solid var(--amber-light);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 18px;
}
.banda-pwa .ico-pwa {
  width: 38px; height: 38px; border-radius: 9px; background: var(--amber); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.banda-pwa .text-pwa { flex: 1; font-size: 12.5px; }
.banda-pwa .text-pwa strong { display: block; font-size: 13.5px; color: var(--navy-dark); }
.banda-pwa .actiuni-pwa { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.banda-pwa .actiuni-pwa .btn { padding: 8px 12px; min-height: 36px; font-size: 12.5px; }
.banda-pwa .buton-inchide {
  background: transparent; border: none; color: var(--muted); font-size: 16px; padding: 4px 6px; min-height: auto; min-width: auto;
}

h2.titlu-sectiune { font-size: 14px; color: var(--navy-dark); text-transform: uppercase; letter-spacing: 0.04em; margin: 4px 0 12px; }

.grid-aplicatii {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.card-aplicatie {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
}
.card-aplicatie:hover { border-color: var(--navy-light); box-shadow: 0 4px 14px rgba(31,78,95,0.10); }
.card-aplicatie .ico-app {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--navy); color: var(--amber-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; flex-shrink: 0;
}
.card-aplicatie .info-app { flex: 1; min-width: 0; }
.card-aplicatie .info-app .nume-app { font-weight: 700; font-size: 15.5px; color: var(--navy-dark); }
.card-aplicatie .info-app .desc-app { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.card-aplicatie .info-app .url-app { font-size: 11px; color: var(--amber-dark); margin-top: 4px; font-weight: 700; }
.card-aplicatie .sageata { color: var(--muted); font-size: 18px; flex-shrink: 0; }

/* meniu jos fix — mobil */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: 64px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 50;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}
.bottom-nav a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.bottom-nav a .ico-nav { font-size: 19px; line-height: 1; }
.bottom-nav a.activ { color: var(--navy); }
.bottom-nav a.activ .ico-nav { color: var(--amber); }

/* --- Pagina instalare PWA --- */
.pagina-simpla { max-width: 480px; margin: 0 auto; padding: 24px 16px 60px; }
.pasi-instalare { counter-reset: pas; list-style: none; padding: 0; margin: 18px 0; }
.pasi-instalare li {
  counter-increment: pas;
  display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--border);
  font-size: 13.5px; line-height: 1.5;
}
.pasi-instalare li::before {
  content: counter(pas);
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 800; font-size: 12.5px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* --- Bara de navigare pentru testarea machetei (doar demo, nu apare in aplicatia reala) --- */
.nav-macheta {
  max-width: 980px; margin: 0 auto; padding: 10px 16px 90px;
  font-size: 11.5px; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 6px 10px;
  border-top: 1px dashed var(--border); margin-top: 24px; padding-top: 12px;
}
.nav-macheta strong { width: 100%; color: var(--navy-dark); font-size: 11px; text-transform: uppercase; }
.nav-macheta a { color: var(--navy); text-decoration: none; }
.nav-macheta a:hover { text-decoration: underline; }

/* ============================================================
   DESKTOP — breakpoint 640px
   ============================================================ */
@media (min-width: 640px) {
  .grid-aplicatii { grid-template-columns: repeat(2, 1fr); }
  .bottom-nav { display: none; }
  .continut-poarta { padding-bottom: 32px; }
  .tastatura-pin { max-width: 260px; margin: 0 auto; }
}

@media (min-width: 900px) {
  .grid-aplicatii { grid-template-columns: repeat(3, 1fr); }
}
