.employee-profile-page{
  background:#f6f8fb;
  color:#102033;
}

.profile-hero{
  background:linear-gradient(135deg,#0b1726 0%,#123653 52%,#eef7f8 52%,#ffffff 100%);
  padding:42px 18px 30px;
}

.profile-hero-inner{
  max-width:1120px;
  margin:0 auto;
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  gap:30px;
  align-items:center;
}

.profile-hero-inner.has-qr{
  grid-template-columns:220px minmax(0,1fr) minmax(210px,250px);
  grid-template-areas:"photo identity qr";
  gap:24px;
}

.profile-hero-inner.has-qr .profile-photo-wrap{
  grid-area:photo;
}

.profile-hero-inner.has-qr .profile-identity{
  grid-area:identity;
}

.profile-photo-wrap{
  width:220px;
  aspect-ratio:1;
  border:6px solid #fff;
  border-radius:8px;
  background:#e7eef5;
  box-shadow:0 18px 38px rgba(13,34,58,.22);
  overflow:hidden;
}

.profile-photo{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

.profile-initials{
  display:grid;
  place-items:center;
  width:100%;
  height:100%;
  background:linear-gradient(135deg,#0f766e,#2563eb);
  color:#fff;
  font-size:54px;
  font-weight:900;
  letter-spacing:0;
}

.profile-identity{
  min-width:0;
  padding:28px;
  border:1px solid #dbe5ef;
  border-radius:8px;
  background:rgba(255,255,255,.94);
  box-shadow:0 16px 40px rgba(15,38,70,.10);
}

.profile-hero-qr{
  grid-area:qr;
  width:100%;
  max-width:250px;
  justify-self:end;
}

.profile-hero-qr::before,
.profile-hero-qr::after,
.profile-hero-qr-link::before,
.profile-hero-qr-link::after{
  display:none;
  content:none;
}

.profile-hero-qr-link{
  display:grid;
  gap:10px;
  justify-items:center;
  border:1px solid #d6e1ec;
  border-radius:8px;
  background:#fff;
  padding:14px;
  color:#27445e;
  text-align:center;
  text-decoration:none;
  box-shadow:0 16px 36px rgba(15,38,70,.12);
}

.profile-hero-qr-link:hover,
.profile-hero-qr-link:focus-visible{
  border-color:#0f766e;
  color:#0f766e;
}

.profile-hero-qr-link img{
  display:block;
  width:min(100%,220px);
  aspect-ratio:1;
  box-sizing:border-box;
  border:1px solid #e0e8f0;
  border-radius:6px;
  background:#fff;
  padding:8px;
  object-fit:contain;
}

.profile-hero-qr-link span{
  color:inherit;
  font-size:13px;
  font-weight:900;
  line-height:1.3;
}

.profile-company{
  display:inline-flex;
  align-items:center;
  gap:10px;
  color:#0f2742;
  text-decoration:none;
  font-weight:900;
  margin-bottom:14px;
}

.profile-company img{
  width:34px;
  height:34px;
  object-fit:contain;
}

.profile-identity h1{
  margin:0;
  color:#0b1726;
  font-size:clamp(34px,5vw,58px);
  line-height:1.05;
  letter-spacing:0;
}

.profile-secondary{
  margin:10px 0 0;
  color:#31526e;
  font-size:clamp(21px,3vw,30px);
  line-height:1.35;
  font-weight:800;
}

.profile-meta{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-top:18px;
}

.profile-meta span{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  border:1px solid #cddbea;
  border-radius:999px;
  background:#f7fbff;
  color:#27445e;
  padding:6px 11px;
  font-size:14px;
  font-weight:800;
}

.profile-language{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:20px;
}

.profile-language a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:36px;
  border:1px solid #cddbea;
  border-radius:8px;
  color:#27445e;
  background:#fff;
  text-decoration:none;
  font-weight:900;
}

.profile-language a.active,
.profile-language a:hover{
  border-color:#0f766e;
  background:#0f766e;
  color:#fff;
}

.profile-actions-band{
  padding:18px;
  background:#fff;
  border-bottom:1px solid #e0e8f0;
}

.profile-actions{
  max-width:1120px;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(138px,1fr));
  gap:10px;
}

.profile-action{
  min-height:54px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  border:1px solid #cbd8e6;
  border-radius:8px;
  background:#102033;
  color:#fff;
  padding:11px 12px;
  text-decoration:none;
  font-weight:900;
  line-height:1.2;
  text-align:center;
}

.profile-action:hover{
  background:#0f766e;
  border-color:#0f766e;
  color:#fff;
}

.profile-action.disabled{
  background:#eef3f7;
  color:#64748b;
  cursor:not-allowed;
}

.profile-content{
  max-width:1120px;
  margin:0 auto;
  padding:30px 18px 56px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.profile-section{
  border:1px solid #dbe5ef;
  border-radius:8px;
  background:#fff;
  padding:22px;
  box-shadow:0 12px 30px rgba(15,38,70,.07);
}

.profile-section span{
  display:block;
  color:#0f766e;
  font-size:13px;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
  margin-bottom:10px;
}

.profile-section div{
  color:#243b53;
  font-size:17px;
  line-height:1.75;
}

.profile-socials{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.profile-socials a{
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-height:42px;
  border:1px solid #cbd8e6;
  border-radius:8px;
  color:#102033;
  padding:9px 12px;
  text-decoration:none;
  font-weight:800;
}

.profile-socials a:hover{
  border-color:#2563eb;
  color:#2563eb;
}

.profile-not-found{
  max-width:720px;
  margin:54px auto;
  padding:34px 20px;
  text-align:center;
}

.profile-not-found img{
  width:64px;
  height:64px;
  object-fit:contain;
  margin-bottom:16px;
}

.profile-not-found h1{
  margin:0 0 10px;
  color:#0b1726;
  font-size:38px;
  letter-spacing:0;
}

.profile-not-found p{
  color:#536879;
  line-height:1.6;
  margin:0 0 18px;
}

.profile-not-found a{
  display:inline-flex;
  min-height:44px;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  background:#102033;
  color:#fff;
  padding:10px 14px;
  text-decoration:none;
  font-weight:900;
}

.employee-qr-page{
  background:#f6f8fb;
}

.profile-qr-preview{
  padding:34px 18px 58px;
  background:linear-gradient(180deg,#0b1726 0 270px,#f6f8fb 270px 100%);
}

.profile-qr-inner{
  max-width:1120px;
  margin:0 auto;
}

.profile-qr-company{
  color:#fff;
  margin-bottom:22px;
}

.profile-qr-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(300px,420px);
  gap:24px;
  align-items:stretch;
}

.profile-qr-copy,
.profile-qr-code-panel{
  border:1px solid #dbe5ef;
  border-radius:8px;
  background:#fff;
  box-shadow:0 18px 42px rgba(15,38,70,.12);
}

.profile-qr-copy{
  padding:28px;
}

.profile-qr-eyebrow{
  display:block;
  color:#0f766e;
  font-size:13px;
  font-weight:900;
  text-transform:uppercase;
  margin-bottom:12px;
}

.profile-qr-copy h1{
  margin:0;
  color:#0b1726;
  font-size:clamp(34px,5vw,56px);
  line-height:1.05;
  letter-spacing:0;
}

.profile-qr-actions{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:22px;
}

.profile-qr-code-panel{
  display:grid;
  gap:14px;
  align-content:center;
  justify-items:center;
  padding:24px;
  text-align:center;
}

.profile-qr-code-panel img{
  display:block;
  width:min(100%,360px);
  aspect-ratio:1;
  border:1px solid #e0e8f0;
  border-radius:8px;
  background:#fff;
}

.profile-qr-code-panel p{
  max-width:100%;
  margin:0;
  color:#536879;
  font-size:13px;
  font-weight:800;
  overflow-wrap:anywhere;
}

[dir="rtl"] .profile-identity,
[dir="rtl"] .profile-section,
[dir="rtl"] .profile-qr-copy{
  text-align:right;
}

[dir="rtl"] .profile-meta,
[dir="rtl"] .profile-language,
[dir="rtl"] .profile-socials,
[dir="rtl"] .profile-qr-actions{
  justify-content:flex-start;
}

@media(max-width:980px){
  .profile-hero-inner.has-qr{
    grid-template-columns:220px minmax(0,1fr);
    grid-template-areas:
      "photo identity"
      "photo qr";
  }

  .profile-hero-qr{
    max-width:240px;
    justify-self:start;
  }
}

@media print{
  body.employee-qr-page{
    background:#fff;
    color:#000;
  }

  .employee-qr-page header,
  .employee-qr-page .site-header,
  .employee-qr-page .footer,
  .employee-qr-page footer,
  .employee-qr-page .profile-language,
  .employee-qr-page .profile-qr-actions,
  .employee-qr-page script{
    display:none !important;
  }

  .profile-qr-preview{
    min-height:auto;
    padding:0;
    background:#fff;
  }

  .profile-qr-inner{
    max-width:none;
  }

  .profile-qr-company{
    color:#000;
    justify-content:center;
    margin:0 0 14px;
  }

  .profile-qr-layout{
    display:block;
  }

  .profile-qr-copy,
  .profile-qr-code-panel{
    border:0;
    box-shadow:none;
    padding:0;
    text-align:center;
  }

  .profile-qr-copy h1{
    color:#000;
    font-size:28px;
    margin-bottom:8px;
  }

  .profile-qr-eyebrow,
  .profile-secondary,
  .profile-meta{
    display:none;
  }

  .profile-qr-code-panel img{
    width:78mm;
    max-width:78mm;
    border:0;
    margin:12mm auto 4mm;
  }

  .profile-qr-code-panel p{
    color:#000;
    font-size:10pt;
  }
}

@media(max-width:760px){
  .profile-hero{
    background:linear-gradient(180deg,#0b1726 0 138px,#f6f8fb 138px 100%);
    padding-top:28px;
  }

  .profile-hero-inner{
    grid-template-columns:1fr;
    gap:16px;
  }

  .profile-hero-inner.has-qr{
    grid-template-columns:1fr;
    grid-template-areas:
      "photo"
      "identity"
      "qr";
  }

  .profile-photo-wrap{
    width:min(190px,64vw);
    margin:0 auto;
  }

  .profile-identity{
    padding:22px;
  }

  .profile-actions,
  .profile-content,
  .profile-qr-layout,
  .profile-qr-actions{
    grid-template-columns:1fr;
  }

  .profile-action,
  .profile-qr-actions .profile-action{
    justify-content:flex-start;
  }

  .profile-hero-qr{
    max-width:240px;
    justify-self:center;
  }

  .profile-hero-qr-link{
    padding:12px;
  }

  .profile-hero-qr-link img{
    width:min(100%,220px);
  }

  .profile-qr-preview{
    padding:26px 14px 46px;
    background:linear-gradient(180deg,#0b1726 0 210px,#f6f8fb 210px 100%);
  }

  .profile-qr-copy,
  .profile-qr-code-panel{
    padding:20px;
  }
}

@media(max-width:420px){
  .profile-identity h1{
    font-size:32px;
  }

  .profile-secondary{
    font-size:20px;
  }

  .profile-meta span,
  .profile-action,
  .profile-socials a{
    width:100%;
  }
}
