/* Licențe EAM - Modern glass UX foundation */
:root {
  --bg-page: #ffffff;
  --bg-card: #ffffff;
  --bg-card-solid: #ffffff;
  --bg-glass: #ffffff;
  --primary: rgb(4, 92, 140);
  --primary-hover: rgb(3, 78, 118);
  --primary-light: rgba(4, 92, 140, 0.12);
  --accent: rgb(4, 92, 140);
  --text: #102a43;
  --text-muted: #486581;
  --border: #d9e2ec;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px -4px rgb(16 42 67 / 0.22);
  --shadow-lg: 0 10px 28px -14px rgb(16 42 67 / 0.3);
  --focus-ring: 0 0 0 3px rgba(4, 92, 140, 0.22);
  --status-pending-bg: #fef3c7;
  --status-accepted-bg: #d1fae5;
  --status-rejected-bg: #fee2e2;
}

* { box-sizing: border-box; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-page);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }

/* Shared top shell */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  backdrop-filter: none;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 0.75rem 0;
}
.app-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.app-header .brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.app-header .nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.app-header .nav-links > a,
.app-header .nav-links > button,
.app-header .nav-links > span,
.app-header .nav-links > .notif-wrap > button {
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  border: none;
  background: transparent;
}
.app-header .nav-links > a:hover,
.app-header .nav-links > button:hover,
.app-header .nav-links > .notif-wrap > button:hover,
.app-header .nav-links > .active {
  background: var(--primary-light);
  color: var(--primary);
}
.app-header .nav-links .user-info {
  color: var(--text-muted);
  font-weight: 500;
  margin-right: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid #e4ebf3;
  border-radius: 999px;
  background: #f8fafc;
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 0.82rem;
  flex: 0 0 32px;
  border: 1px solid #bfdbfe;
}
.user-meta {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
}
.user-meta-name {
  font-size: 0.78rem;
  color: #102a43;
  font-weight: 600;
}
.user-meta-role {
  font-size: 0.68rem;
  color: #486581;
}
.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  background: #fff;
}
.profile-avatar-large {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  font-size: 1rem;
}
.profile-photo-frame {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #d9e2ec;
  box-shadow: 0 6px 18px -12px rgba(16, 42, 67, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  flex: 0 0 96px;
}
.profile-photo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  background: #fff;
}
.profile-photo-fallback {
  color: #1d4ed8;
  font-size: 1.55rem;
  font-weight: 700;
}
.profile-identity {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  background: #f8fafc;
  border: 1px solid #e4ebf3;
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
}
.profile-identity-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.profile-identity-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #102a43;
}
.profile-identity-subtitle {
  font-size: 0.9rem;
  color: #486581;
}
.profile-account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.profile-account-item {
  border: 1px solid #e4ebf3;
  border-radius: 12px;
  background: #f8fafc;
  padding: 0.68rem 0.75rem;
}
.profile-account-item-wide {
  grid-column: span 3;
}
.profile-account-label {
  font-size: 0.76rem;
  color: #486581;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.profile-account-value {
  margin-top: 0.1rem;
  font-size: 0.98rem;
  color: #102a43;
  font-weight: 600;
}
.profile-account-break {
  word-break: break-word;
}
.app-header .nav-links .logout {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}

/* Notifications */
.notif-wrap { position: relative; }
.notif-trigger {
  position: relative;
  cursor: pointer;
}
.notif-badge {
  position: absolute;
  top: -3px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: #ef4444;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}
.notif-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(360px, calc(100vw - 2rem));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  display: none;
  overflow: hidden;
  z-index: 200;
}
.notif-menu.open { display: block; }
.notif-head {
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.notif-item {
  display: block;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #edf2fb;
  color: var(--text);
  text-decoration: none;
  font-size: 0.86rem;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: #f8faff; }
.notif-item small { color: var(--text-muted); display: block; }
.notif-menu .notif-item,
.notif-menu .notif-item:hover {
  color: var(--text);
}

/* Cards */
.app-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  backdrop-filter: none;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.app-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: #cddaf8;
}
.app-card .card-header {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}
.app-card .card-body { padding: 1.25rem; }

/* Contact page */
.contact-ident-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}
.contact-ident-item {
  border: 1px solid #e4ebf3;
  border-radius: 12px;
  background: #f8fafc;
  padding: 0.65rem 0.75rem;
}
.contact-ident-item-full {
  grid-column: 1 / -1;
}
.contact-ident-label {
  font-size: 0.76rem;
  color: #486581;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.contact-ident-value {
  font-size: 0.97rem;
  color: #102a43;
  font-weight: 600;
  line-height: 1.35;
}
.contact-ident-break {
  word-break: break-word;
}
.contact-action-box {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.contact-call-btn {
  width: 100%;
  justify-content: center;
}

/* Profile phone card */
.profile-phone-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.profile-phone-item {
  border: 1px solid #e4ebf3;
  border-radius: 12px;
  background: #f8fafc;
  padding: 0.7rem 0.75rem;
}
.profile-phone-item-full {
  grid-column: 1 / -1;
}
.profile-phone-label {
  font-size: 0.76rem;
  color: #486581;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.profile-phone-value {
  margin-top: 0.1rem;
  font-size: 0.98rem;
  color: #102a43;
  font-weight: 600;
}
.profile-phone-form {
  border: 1px solid #e4ebf3;
  border-radius: 12px;
  background: #fbfdff;
  padding: 0.8rem;
}
.profile-phone-form-row {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 0.65rem;
  align-items: center;
}
.profile-phone-form-row .btn {
  white-space: nowrap;
}

/* KPI + helper components */
.kpi-tile {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.85rem 1rem;
}
.kpi-tile .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  font-weight: 600;
}
.kpi-tile .value {
  font-size: 1.45rem;
  line-height: 1.1;
  font-weight: 700;
}
.help-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  border-radius: 999px;
  border: 1px solid #bcccdc;
  color: var(--primary);
  background: #f0f4f8;
  padding: 0.22rem 0.62rem;
}
.inline-hint {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.step-card {
  border: 1px dashed #bcccdc;
  background: #f8fafc;
  border-radius: 12px;
  padding: 0.75rem;
}
.empty-state-action {
  margin-top: 0.75rem;
  display: inline-flex;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.status-pending { background: var(--status-pending-bg); color: #b45309; }
.status-accepted { background: var(--status-accepted-bg); color: #047857; }
.status-rejected { background: var(--status-rejected-bg); color: #b91c1c; }

/* Request cards */
.request-card {
  background: var(--bg-card-solid);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.1rem;
  margin-bottom: 1rem;
}
.request-card .request-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.request-card .request-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.request-card .request-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid #e8edf8;
}
.request-card .request-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn-app {
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}
.btn-app-primary { background: var(--primary); color: #fff; }
.btn-app-primary:hover { background: var(--primary-hover); color: #fff; transform: translateY(-1px); }
.btn-app-success { background: #059669; color: #fff; }
.btn-app-success:hover { background: #047857; color: #fff; }
.btn-app-outline-danger { background: transparent; color: #dc2626; border: 2px solid #dc2626; }
.btn-app-outline-danger:hover { background: #dc2626; color: #fff; }
.btn-app-outline-primary {
  background: #fff;
  color: var(--primary);
  border: 1px solid #9fb3c8;
}
.btn-app-outline-primary:hover {
  background: #f0f4f8;
  color: var(--primary-hover);
}
.btn-app.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; }

/* Auth pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: #f8fafc;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-glass);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  backdrop-filter: none;
  padding: 2rem;
}
.auth-card h1 {
  font-size: 1.45rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.45rem;
}
.auth-subtitle {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.35rem;
}
.auth-card .auth-footer {
  text-align: center;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid #e5ebf8;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.auth-card .auth-footer a { font-weight: 500; }

/* Auth slide layout (register / google register) */
body.auth-slide-page {
  background:
    linear-gradient(115deg, rgba(2, 57, 89, 0.58) 0%, rgba(4, 92, 140, 0.34) 44%, rgba(7, 126, 153, 0.28) 100%),
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 36%),
    linear-gradient(160deg, #0a4f69 0%, #0b6c7c 48%, #0f8a91 100%);
  min-height: 100vh; /* fallback */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.auth-slide-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(420px, 0.85fr);
}
.auth-slide-side {
  display: flex;
  align-items: flex-end;
  padding: 3rem clamp(1.2rem, 2.5vw, 3rem);
}
.auth-slide-brand {
  color: #fff;
  max-width: 380px;
}
.auth-slide-logo {
  font-size: clamp(1.6rem, 2.1vw, 2.1rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.auth-slide-tagline {
  margin: 0.65rem 0 0;
  font-size: 0.97rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
}
.auth-slide-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(1.35rem + env(safe-area-inset-top))
    calc(1.35rem + env(safe-area-inset-right))
    calc(1.35rem + env(safe-area-inset-bottom))
    calc(1.35rem + env(safe-area-inset-left));
}
.auth-page.auth-page-slide {
  width: 100%;
  min-height: auto;
  padding: 0;
  background: transparent;
}
.auth-card.auth-card-slide {
  margin: 0 auto;
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 8.2rem)); /* fallback */
  max-height: min(760px, calc(100dvh - 8.2rem));
  overflow: auto;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 24px 46px -26px rgba(16, 42, 67, 0.65);
}
body.auth-slide-page .app-footer {
  background: transparent;
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}
body.auth-slide-page .app-footer .footer-inner {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(228, 235, 243, 0.9);
}

/* Layout and page intro */
.app-page { padding: 1.5rem 0 3rem; }
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text);
}
.page-subtitle {
  color: var(--text-muted);
  font-size: 0.93rem;
  margin-bottom: 1rem;
}

/* Wizard */
.wizard-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.wizard-step {
  flex: 1;
  min-width: 140px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 500;
  font-size: 0.9rem;
  background: #d9e2ec;
  color: var(--text-muted);
}
.wizard-step.active { background: var(--primary); color: #fff; }
.wizard-step.done { background: var(--status-accepted-bg); color: #047857; }

/* Alerts */
.alert-app {
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  border: none;
}
.alert-app.alert-success { background: var(--status-accepted-bg); color: #065f46; }
.alert-app.alert-danger { background: var(--status-rejected-bg); color: #991b1b; }
.alert-app.alert-info { background: #e0f2fe; color: #075985; }

/* OTP digit boxes — grid pe 6 coloane ca să nu dispară o căsuță pe ecrane înguste */
.otp-digit-wrap {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.4rem;
  width: 100%;
  max-width: 360px;
  margin: 1rem auto;
  box-sizing: border-box;
}
.otp-digit-box {
  width: 100%;
  min-width: 0;
  max-width: 52px;
  height: 56px;
  margin: 0 auto;
  border: 2px solid #d9e2ec;
  border-radius: 10px;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: #102a43;
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.otp-digit-box:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}
.otp-info-box {
  background: #f0f4f8;
  border: 1px solid #e4ebf3;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  color: #334e68;
  margin-bottom: 0.75rem;
}
.otp-info-box strong {
  color: #102a43;
}
.otp-timer {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}
.otp-timer .otp-timer-value {
  font-weight: 700;
  color: var(--primary);
}
.otp-resend-link {
  display: block;
  text-align: center;
  margin-top: 0.65rem;
  font-size: 0.88rem;
}
@media (max-width: 520px) {
  .otp-digit-wrap {
    max-width: 100%;
    gap: 0.3rem;
  }
  .otp-digit-box {
    max-width: none;
    height: 50px;
    font-size: 1.15rem;
  }
}

/* Tables */
.app-card .table { margin-bottom: 0; }
.app-card .table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.app-card .table td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #e4ebf3;
}
.app-card .table tbody tr:last-child td { border-bottom: none; }
.app-card .table tbody tr:hover { background: #f8fafc; }

/* Forms */
.form-card .form-label { font-weight: 500; color: var(--text); }
.form-card .form-select,
.form-card .form-control {
  border-radius: var(--radius-sm);
  border: 1px solid #bcccdc;
}
.form-card .form-select:focus,
.form-card .form-control:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}
.form-control:focus, .form-select:focus, button:focus-visible, a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Tooltips and tour */
.help-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #9fb3c8;
  background: #f0f4f8;
  color: var(--primary);
  font-size: 0.72rem;
  margin-left: 0.35rem;
  cursor: help;
}
.tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  z-index: 300;
  display: none;
}
.tour-overlay.open { display: block; }
.tour-popover {
  position: fixed;
  z-index: 301;
  max-width: min(340px, calc(100vw - 2rem));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 0.9rem;
  display: none;
}
.tour-popover .title {
  font-weight: 700;
  font-size: 0.94rem;
  margin-bottom: 0.35rem;
}
.tour-popover .desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.tour-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 2.2rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Footer institutional */
.app-footer {
  margin-top: 2rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
  background: #fff;
}
.app-footer .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  border: 1px solid #e6edf5;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  padding: 0.55rem 0.9rem;
}
.app-footer .footer-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.35;
}
.app-footer .footer-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1px;
}
.app-footer .footer-meta strong {
  color: var(--primary);
  font-weight: 700;
}
.app-footer .footer-note {
  margin-top: 2px;
  font-size: 0.75rem;
  color: #7b8794;
}
.app-footer .footer-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  padding-left: 0.4rem;
}
.app-footer .footer-logo {
  display: block;
  width: 88px;
  height: auto;
  max-height: 30px;
  max-width: 100%;
  image-rendering: -webkit-optimize-contrast;
}

/* Prevent accidental oversized logos/images in footer */
.app-footer img.footer-logo {
  width: 88px !important;
  height: auto !important;
  max-height: 30px !important;
  object-fit: contain !important;
}
.app-footer img.footer-logo-ase {
  width: 128px !important;
  max-height: 44px !important;
}

/* Teme ocupate */
.topic-taken { text-decoration: line-through; color: var(--text-muted); }
.topic-taken .badge { text-decoration: none; }

/* Responsive and accessibility */
@media (max-width: 768px) {
  .app-header { padding: 0.55rem 0; }
  .app-header .container { align-items: flex-start; gap: 0.5rem; }
  .app-header .brand { font-size: 1.02rem; width: 100%; }
  .app-header .nav-links {
    width: 100%;
    gap: 0.45rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .app-header .nav-links > .user-info {
    grid-column: 1 / -1;
    width: 100%;
    margin-right: 0;
    padding: 0.4rem 0.55rem;
    font-size: 0.82rem;
    border-radius: 12px;
    gap: 0.5rem;
  }
  .user-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
  }
  .user-meta-name { font-size: 0.8rem; }
  .user-meta-role { font-size: 0.72rem; }
  .app-header .nav-links .user-info small {
    display: block;
    margin-left: 0.25rem;
  }
  .app-header .nav-links > a,
  .app-header .nav-links > button,
  .app-header .nav-links > span,
  .app-header .nav-links > .notif-wrap > button,
  .app-header .nav-links > form > button {
    width: 100%;
    text-align: center;
    font-size: 0.81rem;
    padding: 0.43rem 0.56rem;
    border-radius: 10px;
    border: 1px solid #d9e2ec;
    background: #fff;
  }
  .app-header .nav-links > .logout { border-color: #bfd3ea; }
  .app-header .nav-links > .notif-wrap { width: 100%; }
  .notif-wrap { position: static; }
  .notif-menu {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    top: 84px;
    width: auto;
    max-height: 56vh;
    overflow-y: auto;
    z-index: 600;
    border-radius: 12px;
  }
  .page-title { font-size: 1.25rem; }
  .app-card .card-body { padding: 1rem; }
  .contact-ident-grid { grid-template-columns: 1fr; }
  .contact-ident-item { padding: 0.62rem 0.68rem; }
  .contact-ident-value { font-size: 0.95rem; }
  .profile-account-grid { grid-template-columns: 1fr; }
  .profile-account-item-wide { grid-column: auto; }
  .profile-phone-grid { grid-template-columns: 1fr; }
  .profile-phone-form-row { grid-template-columns: 1fr; }
  .profile-phone-form-row .btn { width: 100%; }
  .request-card { padding: 0.9rem; }
  .app-footer .footer-inner { justify-content: center; text-align: center; }
  .app-footer .footer-logo-link { padding-left: 0; }
  .app-footer .footer-logo { width: 80px; }
  .app-footer img.footer-logo { width: 80px !important; }
  .app-footer img.footer-logo-ase { width: 112px !important; max-height: 40px !important; }
}

@media (max-width: 980px) {
  .auth-slide-shell {
    grid-template-columns: 1fr;
  }
  .auth-slide-side {
    display: none;
  }
  .auth-slide-main {
    padding: calc(0.95rem + env(safe-area-inset-top))
      calc(0.95rem + env(safe-area-inset-right))
      calc(0.95rem + env(safe-area-inset-bottom))
      calc(0.95rem + env(safe-area-inset-left));
  }
  .auth-card.auth-card-slide {
    max-height: calc(100vh - 6.4rem); /* fallback */
    max-height: calc(100dvh - 6.4rem);
    border-radius: 14px;
    padding: 1.35rem;
  }
}

@media (max-width: 520px) {
  .auth-card.auth-card-slide {
    padding: 1.15rem;
    border-radius: 14px;
  }
  .auth-card.auth-card-slide h1 {
    font-size: 1.25rem;
  }
  .auth-card.auth-card-slide .auth-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* —— Staff hub (admin / secretariat) —— */
.staff-app-shell .page-title {
  letter-spacing: -0.02em;
}
.staff-hub-nav {
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(4, 92, 140, 0.06), rgba(4, 92, 140, 0.02));
  border: 1px solid var(--border);
  padding: 0.5rem;
}
.staff-hub-nav-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.staff-hub-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.staff-hub-pill:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--border);
}
.staff-hub-pill.is-active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}
.staff-kpi-tile .card-body {
  padding: 1rem 1.1rem;
}
.staff-kpi-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.staff-kpi-value {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}
.staff-card-elevated {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.staff-card-muted {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1px solid var(--border);
}
.staff-live-pre {
  background: #061521;
  color: #cdeffd;
  padding: 12px;
  border-radius: var(--radius-sm);
  min-height: 220px;
  max-height: 320px;
  overflow: auto;
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}
.staff-status-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: 0.08em;
  background: #94a3b8;
}
.staff-status-dot-open { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25); }
.staff-status-dot-extension { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22); }
.staff-status-dot-before { background: #3b82f6; }
.staff-status-dot-closed { background: #ef4444; }
.staff-status-dot-off,
.staff-status-dot-unset { background: #94a3b8; }
.staff-status-dot-bad_date { background: #dc2626; }
.staff-status-dot-unknown { background: #64748b; }
