/* Copyright (c) 2026 Catalin Juganaru. All rights reserved. */
/*
    Document: filacss.css
    Creat   : 16 Mai 2025
    Autor   : Catalin Juganaru / SOFTCONTROL SRL
*/

.desktop-only{ display: none; }
.mobile-only{ display: initial; }

html { box-sizing: border-box; -webkit-text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: inherit; }

/* Make media scale down nicely */
img, svg, video { max-width: 100%; height: auto; }

/* iPhone notch safe area */
body.b1 { margin: 0; padding: env(safe-area-inset-top) 12px env(safe-area-inset-bottom); }

/* Touch-friendly controls; prevent Safari 300ms zoom on focus */
input, button { font-size: 16px; line-height: 1.2; }

/* Form: full width on small screens */
#d1,
#d2,
#d3 {
  width: min(100%, 480px);
  margin: 10px auto 0;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
}

/* Header mobile look (business) */
#d1{
  background: #ffffff;
  border: none;
  border-top: none;
  box-shadow: none;
  border-radius: 12px;
  overflow: hidden;
}

#t2 td{
  padding: 0 !important;
}

#t2 td[align="left"]{
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100% !important;
}

/* IronLink in stânga, sigla în dreapta (mobile only) */
#t2 td[align="left"] #f1{ order: 1; }
#t2 td[align="left"] .c1{
  order: 2;
  margin-left: auto !important;
}
/* ascunde celula din dreapta (contact desktop) pe mobil */
#t2 td[align="right"]{ display: none !important; }

#f1{
  padding: 0 !important;
  margin: 0 !important;
  font-size: 20px !important;
  color: rgb(35,37,119) !important;
  line-height: 1.1;
}

#loginForm{
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

/* reset pentru margin-left din desktop */
.login-grid{
  max-width: 100% !important;
  height: auto !important;
  margin: 8px auto 12px !important;
}

#loginForm input {
  width: 100%;
  height: 44px !important;
  min-height: 44px !important;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 16px !important;
}

#l1{
  width: 100% !important;
  display: block;
  text-align: left !important;
  padding: 0 0 4px 2px !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  color: rgb(35,37,119) !important;
}

#butLogin {
  width: 100%;
  min-height: 44px;
  padding: 12px 0;
  border-radius: 10px;
  display: block;
  margin: 12px 0 0 0;
  text-align: center;
  font-size: 18px !important;
}

/* Header: stack logo + text on narrow screens, keep side-by-side on wide */
#t2 { width: 100%; border-collapse: collapse; }
@media (max-width: 480px) {
  #t2 tr { display: table-row !important; }
  #t2 td { display: table-cell !important; }
  .c1 { width: 148px; height: auto; }         /* logo */
  .f1, .f2, .f3 { border: 0; }                /* remove debug borders on mobile */
  #d1::after{
    content: "Sistem Informatic Integrat";
    display: block;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e3e8e5;
    color: rgb(35,37,119);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: .2px;
  }
}

/* Footer: center items on mobile */
@media (max-width: 700px) {
  #d3 .delogare_scheme_left,
  #d3 .delogare_scheme_right { float: none; display: block; text-align: center; padding: 8px 0; }
}

/* Typo scale that doesn’t explode: clamp(min, preferred, max) */
.f1 { font-size: clamp(18px, 3.5vw, 24px); }  /* “IronLink” */
.f2 { font-size: clamp(14px, 2.8vw, 18px); }
.f3 { font-size: clamp(12px, 2.6vw, 16px); }

/* Make the banner image class flexible (your current .c2 has fixed height) */
.c1 { object-fit: contain; max-width: 100%; height: auto; }

/* === Layout general pe mobile (general.htm) === */

/* din două coloane (meniul + conținut) -> o singură coloană stivuită */
.login-grid,
.layout-grid {
  display: block;           /* în loc de grid pe 2 coloane */
}

/* secțiunile să nu se lipească de margini și să nu fie prea late */
.profile-form,
.profile-content {
  max-width: 480px;
  margin: 8px auto;
  padding: 10px;
}

/* === Formular profil: layout pe mobil === */

/* o singură coloană */
.profile-grid,
.password-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

/* etichetele să fie deasupra și aliniate la stânga */
.profile-grid label,
.password-grid label,
#l1 {
  display: block;
  width: auto;
  padding: 4px 0;
  margin: 0;
  text-align: left;
}

/* input-uri full width pe mobil */
.profileEditBox,
#user,
#pass,
#otp,
.profile-form input[type="text"],
.profile-form input[type="password"],
.profile-form input[type="tel"],
.profile-form input[type="email"] {
  width: 100% !important;
  max-width: none !important;
  margin: 2px 0 8px 0;
  padding-left: 10px;
  box-sizing: border-box;
}

/* butoane pe toată lățimea, unul sub altul */
.profile-buttons {
  flex-direction: column;
  align-items: stretch;
}

.profile-buttons button,
.butSalveaza {
  width: 100%;
  min-height: 44px;
}

#butLogout {
  width: 100%;
  min-height: 44px;
}

.global-toast-host{
  left: 10px;
  right: 10px;
  top: calc(env(safe-area-inset-top) + 8px);
}

.global-toast{
  max-width: 100%;
}
