/* public/assets/app.css */

:root{
  --brand-dark: #0b4f54;
  --brand-dark-2: #083f43;
  --accent: #1fc8a6;
  --accent-2: #17b395;

  --text: #0b1b1c;
  --muted-on-dark: rgba(255,255,255,.78);
  --bg: #ffffff;
  --border: rgba(0,0,0,.10);

  --container: 1100px;
}

/* Font stacks (êàê òû çàìåðèëà) */
:root{
  --ff-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
               "Segoe UI Symbol", "Noto Color Emoji";

  /* "Times /*Palatino*/" — ïî ñóòè fallback: Times, çàòåì Palatino */
  --ff-brand: Times, Palatino, "Palatino Linotype", "Book Antiqua", serif;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  background: var(--bg);
  color: var(--text);

  /* ÁÀÇÀ: ñèñòåìíûé øðèôò, normal/400 */
  font-family: var(--ff-system);
  font-style: normal;
  font-weight: 400;

  /* áàçîâûé ðàçìåð äëÿ îáû÷íîãî òåêñòà */
  font-size: 16px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
}

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; }

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== Header ===== */
.site-header{
  background: var(--brand-dark);
  color:#fff;
  height: 56px;
  display:flex;
  align-items:center;
  padding-top: 4px;
  padding-bottom: 4px;
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  width:100%;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width: 0;
}

.brand-logo{
  display:block;
  width:28px;
  height:28px;
}

/* ÏÈÐÎÃÎÂÑÊÈÉ ÓÍÈÂÅÑÈÒÅÒ — Times/Palatino, 28.8px, normal/400 */
.brand-title{
  font-family: Times;
  font-size: 28.8px;
  font-style: normal;
  font-weight: 600;

  letter-spacing: .8px;
  text-transform: uppercase;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Nav ===== */
.nav{
  display:flex;
  align-items:center;
  gap:18px;
}

.nav-link{
  font-family: var(--ff-system);
  font-style: normal;
  font-weight: 400;
  font-size: 16px;

  color: rgba(255,255,255,.92);
  padding: 8px 6px;
}

.nav-link:hover{
  color:#fff;
  text-decoration:underline;
}




/* Mobile toggle */
.nav-toggle{
  display:none;
  background: transparent;
  border:0;
  padding:10px;
  border-radius:10px;
  cursor:pointer;

  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.nav-toggle:focus{
  outline:2px solid rgba(255,255,255,.35);
  outline-offset:2px;
}
.nav-toggle__bar{
  display:block;
  width:20px;
  height:2px;
  background:#fff;
  margin: 0;
  border-radius:2px;
}

/* ===== Main ===== */
.site-main{
  /* min-height: calc(100vh - 56px - 260px);
  padding: 28px 0 60px;  */
flex: 1 0 auto;
}

.page-center{
  max-width: 760px;
  margin: 0 auto;
  text-align:center;
  padding-bottom: 50px;
}

/* Êðàñíûé çàãîëîâîê — ñèñòåìíûé, 56px, normal/400 */
.h1{
  margin: 16px 0 20px;
  font-family: var(--ff-system);
  font-size: 56px;
  line-height: 1.12;
  font-style: normal;
  font-weight: 400;
  color: #c63a3a;
}

/* Êíîïêà — ñèñòåìíûé, 19.2px, normal/400 */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  padding: 5px 18px;
  border-radius: 6px;
  border: 1px solid transparent;

  background: var(--accent);
  color: #ffffff;

  font-family: var(--ff-system);
  font-size: 16px;
  font-style: normal;
  font-weight: 600;

  letter-spacing: .02em;
  text-transform: uppercase;

  box-shadow: 0 8px 18px rgba(31,200,166,.25);
  cursor: pointer;
}

.btn:hover{
  background: var(--accent-2);
  text-decoration:none;
}

/* Áëîêè òåêñòà êàê íà ñòðàíèöå */
.text-block{
  max-width: 640px;
  margin: 0 auto;
  text-align:left;
}

.text-block h2{
  font-family: var(--ff-system);
  font-style: normal;
  font-weight: 400;
  font-size: 20px;
  margin: 22px 0 10px;
}

.text-block p,
.text-block li{
  font-family: var(--ff-system);
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(0,0,0,.78);
}

.text-block ul{
  margin: 10px 0 0 20px;
}

/* ===== Flash ===== */
.flash-wrap{
  padding-top: 14px;
}

.flash{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 10px 0 0;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.05);

  font-family: var(--ff-system);
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
}

.flash-success{ border-color: rgba(31,200,166,.35); }
.flash-warning{ border-color: rgba(255,193,7,.4); }
.flash-danger{ border-color: rgba(220,53,69,.35); }

/* ===== Footer ===== */
.site-footer{
  background: var(--brand-dark);
  color: #fff;
  padding-top: 22px;
  flex-shrink: 0;
}

.footer-inner{
  display:grid;
  grid-template-columns: 1.1fr 1.1fr 0.8fr;
  gap: 22px;
  padding-bottom: 18px;
}

.footer-title{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-style: normal;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 10px;
}

.footer-text{
  font-family: var(--ff-system);
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  color: var(--muted-on-dark);
  margin-bottom: 8px;
}

.footer-list{
/*  list-style:none;  */
  margin:0;
  padding-left:20px;
}
.footer-list li{ margin: 6px 0; }

.footer-link{
  font-family: var(--ff-system);
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  color: #aff;
}
.footer-link:hover{
  color:#fff;
  text-decoration:none;
}

.social{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.social-link{
  font-family: var(--ff-system);
  font-style: normal;
  font-weight: 400;
  font-size: 14px;

  color: var(--muted-on-dark);
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
}
.social-link:hover{
  color:#fff;
  border-color: rgba(255,255,255,.35);
  text-decoration:none;
}

.footer-bottom{
  border-top: 1px solid rgba(255,255,255,.14);
  padding: 12px 0;
}
.footer-bottom-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;

  font-family: var(--ff-system);
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  color: var(--muted-on-dark);
}

.login-form form div:not(:last-child), .reg-form form div:not(:last-child), .profile-form  div:not(:last-child) {
  padding-bottom: 20px;
}

.login-form form div:first-child, .reg-form form div:first-child, .profile-form div:first-child {
  padding-top: 30px;
}

.login-form input, .reg-form input, .profile-form  input {
  width: 300px;

}

.reg-form input {
  margin-left: 10px;

}

.profile-form .form-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.profile-form .form-row select {
    text-align: center;        
    width: 100%;
}


#registration_form_agreeTerms {
    width: fit-content;
}

.profile-link{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
}

.profile-link__icon{
  display: block;
  transition: filter 150ms ease, opacity 150ms ease;
}

/* ïîäñâåòêà èêîíêè ïðè íàâåäåíèè íà âåñü ëèíê */
.profile-link:hover .profile-link__icon{
  filter: brightness(1.25);
  opacity: 0.95;
}

.profile-link__text{
  text-decoration: none;
}

/* tooltip */
.profile-link__tooltip{
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%);
  white-space: nowrap;

  padding: 10px 12px;
  border-radius: 10px;

  background: rgba(0,0,0,0.85);
  color: #fff;

  font-size: 16px;
  font-weight: 400;
  font-style: normal;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}

/* ìàëåíüêèé òðåóãîëüíèê */
.profile-link__tooltip::before{
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 6px 6px 6px;
  border-style: solid;
  border-color: transparent transparent rgba(0,0,0,0.85) transparent;
}

/* ïîêàçûâàåì tooltip ïðè íàâåäåíèè íà èêîíêó ÈËÈ òåêñò (ò.ê. hover íà âñ¸ì <a>) */
.profile-link:hover .profile-link__tooltip{
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

#select2-profile_form_department-container {
    padding-left: 5px !important;
}

/* ===== Responsive ===== */
@media (max-width: 900px){
  .footer-inner{
    grid-template-columns: 1fr;
  }
  .footer-bottom-inner{
    flex-direction: column;
    align-items:flex-start;
  }
}

@media (max-width: 760px){
  .nav-toggle{ display:inline-flex; }

  .nav{
    display:none;
    position:absolute;
    left:0;
    right:0;
    top:48px;
    background: var(--brand-dark);
    border-top: 1px solid rgba(255,255,255,.12);
    padding: 10px 16px 14px;
    flex-direction: column;
    align-items:flex-start;
    gap:8px;
    z-index: 1000;
  }
  .nav--open{ 
    display:flex; 
    flex-direction: column; 

  }
  .nav-link{ padding: 10px 0; }

  /* Ïîä ìîáèëêó: çàãîëîâîê ÷óòü ìåíüøå, èíà÷å îãðîìíûé */
  .h1{
    font-size: 40px;
    line-height: 1.15;
  }

  .btn{
    font-size: 18px;
    padding: 10px 16px;
  }

  .brand-title{
    font-size: 22px;
  }
}

@media (max-width: 570px){
.profile-form .form-row select {
    text-align: center;        
/*    max-width: 400px;  */
}
}

.sf-toolbarreset, .skip-link {
    display: none;
}


.select2-container--open .select2-dropdown {
  max-width: calc(100vw - 16px) !important; /* 8px ñëåâà + 8px ñïðàâà */
  box-sizing: border-box !important;
}

.select2-results {
  max-width: 100% !important;
}


.select2-results__option {
  white-space: normal !important;
  overflow-wrap: anywhere !important; /* ëó÷øèé âàðèàíò */
  word-break: break-word !important;  /* çàïàñíîé */
}


.select2-selection__rendered {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}


#profile_form_department + .select2 .select2-results__option {
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

