﻿/* A.R.M.S v205.38 — mandatory Medical / ELP / Proficiency Check access gate */

body[data-arms-license-state="pending"] #sideMenu .arms147-item:not([data-route="DASHBOARD"]):not([data-route="DEMOGRAPHICS"]):not([data-route="DAILY"]),
body[data-license-restricted] #sideMenu .arms147-item:not([data-route="DASHBOARD"]):not([data-route="DEMOGRAPHICS"]):not([data-route="DAILY"]),
.arms-access-gated-v30,
.arms-access-empty-section-v30 {
  display: none !important;
}

#armsLicenseUpdateV30 { display: none !important; }

.profile-v23-license.arms20539-license-card-clickable {
  position: relative;
  cursor: pointer !important;
  outline: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease !important;
}

.profile-v23-license.arms20539-license-card-clickable:hover,
.profile-v23-license.arms20539-license-card-clickable:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(56, 213, 255, .58) !important;
  box-shadow: 0 16px 34px rgba(2, 12, 27, .24), 0 0 0 3px rgba(56, 213, 255, .1) !important;
}

.profile-v23-license.arms20539-license-card-clickable::after {
  content: "UPDATE";
  position: absolute;
  top: 10px;
  right: 11px;
  padding: 4px 7px;
  border: 1px solid rgba(56, 213, 255, .24);
  border-radius: 999px;
  color: #7dd3fc;
  background: rgba(14, 165, 233, .1);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .1em;
}

.arms20539-license-card-hint {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  color: #9fb3ca;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
}

.arms20539-license-card-hint i { color: #38d5ff; }

.arms20539-card-editor-overlay {
  z-index: 1000002 !important;
  padding: 18px;
  background: rgba(2, 8, 23, .78) !important;
  backdrop-filter: blur(14px);
}

.arms20539-card-editor {
  position: relative;
  width: min(440px, 100%);
  padding: 26px;
  border: 1px solid rgba(214, 168, 79, .42);
  border-radius: 22px;
  color: #f8fafc;
  background: linear-gradient(145deg, #071426, #0b2038);
  box-shadow: 0 32px 90px rgba(0, 0, 0, .52), inset 0 1px 0 rgba(255,255,255,.07);
}

.arms20539-card-editor-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 12px;
  color: #dbeafe;
  background: rgba(255,255,255,.06);
  cursor: pointer;
}

.arms20539-card-editor-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 14px;
  border: 1px solid rgba(247,201,107,.5);
  border-radius: 16px;
  color: #f7c96b;
  background: rgba(214,168,79,.12);
  font-size: 20px;
}

.arms20539-card-editor-kicker {
  color: #f7c96b;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
}

.arms20539-card-editor h3 {
  margin: 5px 0 7px;
  color: inherit;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.arms20539-card-editor > p {
  margin: 0;
  color: #aebfd2;
  font-size: 12px;
  line-height: 1.55;
}

.arms20539-card-editor-field {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  cursor: pointer;
}

.arms20539-card-editor-field span {
  color: #c9d7e7;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.arms20539-card-editor-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid rgba(148,163,184,.34);
  border-radius: 12px;
  color: #f8fafc;
  background: #061325;
  color-scheme: dark;
  font: 850 14px/1 inherit;
  outline: none;
  cursor: pointer;
}

.arms20539-card-editor-field input::-webkit-calendar-picker-indicator {
  cursor: pointer;
}

.arms20539-card-editor-field input:focus {
  border-color: #d6a84f;
  box-shadow: 0 0 0 4px rgba(214,168,79,.14);
}

.arms20539-card-editor-message {
  display: none;
  margin-top: 12px;
  padding: 10px 11px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
}

.arms20539-card-editor-message:not(:empty) { display: block; }
.arms20539-card-editor-message.is-error { color: #fecaca; background: rgba(127,29,29,.28); border: 1px solid rgba(248,113,113,.28); }
.arms20539-card-editor-message.is-working { color: #bfdbfe; background: rgba(30,64,175,.22); border: 1px solid rgba(96,165,250,.22); }
.arms20539-card-editor-message.is-success { color: #bbf7d0; background: rgba(20,83,45,.34); border: 1px solid rgba(74,222,128,.34); }

.arms20539-card-editor-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
  margin-top: 18px;
}

.arms20539-card-editor-actions button {
  min-height: 44px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.arms20539-card-editor-actions .secondary { color: #dbeafe; border: 1px solid rgba(148,163,184,.32); background: rgba(255,255,255,.06); }
.arms20539-card-editor-actions .primary { color: #07111f; border: 1px solid #d6a84f; background: linear-gradient(135deg,#f7d58a,#d6a84f); }
.arms20539-card-editor-actions button:disabled { opacity: .58; cursor: wait; }

body[data-theme="light"] .profile-v23-license.arms20539-license-card-clickable::after {
  color: #075985;
  border-color: #a8d8f0;
  background: #e8f7ff;
}

body[data-theme="light"] .arms20539-license-card-hint { color: #587087; }
body[data-theme="light"] .arms20539-card-editor {
  color: #10233b;
  border-color: #b8cee5;
  background: linear-gradient(145deg,#ffffff,#eaf5ff);
  box-shadow: 0 30px 80px rgba(24,62,96,.24), inset 0 1px 0 #fff;
}
body[data-theme="light"] .arms20539-card-editor-close { color: #163a60; border-color: #b8cee5; background: #eef6ff; }
body[data-theme="light"] .arms20539-card-editor > p,
body[data-theme="light"] .arms20539-card-editor-field span { color: #587087; }
body[data-theme="light"] .arms20539-card-editor-field input { color: #10233b; border-color: #b8cee5; background: #fff; color-scheme: light; }
body[data-theme="light"] .arms20539-card-editor-message.is-success { color: #166534; background: #dcfce7; border-color: #86efac; }

.arms20538-gate-banner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin: 0 0 18px;
  padding: 17px 18px;
  overflow: hidden;
  border: 1px solid rgba(214, 168, 79, .42);
  border-radius: 18px;
  color: #f8fafc;
  background:
    linear-gradient(118deg, rgba(214, 168, 79, .14), transparent 38%),
    linear-gradient(135deg, #071426 0%, #0b1e35 58%, #102943 100%);
  box-shadow: 0 18px 42px rgba(2, 6, 23, .24), inset 0 1px 0 rgba(255,255,255,.07);
}

.arms20538-gate-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.035), transparent);
}

.arms20538-gate-icon,
.arms20538-editor-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(247, 201, 107, .5);
  border-radius: 15px;
  color: #f7c96b;
  background: rgba(214, 168, 79, .12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  font-size: 20px;
}

.arms20538-gate-copy { min-width: 0; }

.arms20538-gate-kicker,
.arms20538-editor-kicker {
  margin-bottom: 4px;
  color: #f7c96b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
}

.arms20538-gate-copy h2,
.arms20538-editor-head h3 {
  margin: 0;
  color: inherit;
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 900;
  letter-spacing: -.02em;
}

.arms20538-gate-copy p,
.arms20538-editor-head p {
  margin: 5px 0 0;
  color: #b9c8db;
  font-size: 12px;
  line-height: 1.55;
}

.arms20538-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.arms20538-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid rgba(251, 191, 36, .26);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(120, 53, 15, .22);
  font-size: 10px;
  font-weight: 800;
}

.arms20538-chip.is-expired,
.arms20538-chip.is-error { color: #fecaca; border-color: rgba(248,113,113,.3); background: rgba(127,29,29,.25); }

.arms20538-gate-actions,
.arms20538-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.arms20538-gate-actions { justify-content: flex-end; max-width: 310px; }

.arms20538-gate-actions button,
.arms20538-save-btn,
.arms20538-check-btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #d6a84f;
  border-radius: 11px;
  color: #06111f;
  background: linear-gradient(135deg, #f7d58a, #d6a84f);
  box-shadow: 0 8px 20px rgba(214,168,79,.18);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.arms20538-gate-actions button.secondary,
.arms20538-check-btn {
  color: #dbeafe;
  border-color: rgba(148, 163, 184, .38);
  background: rgba(15, 35, 58, .82);
  box-shadow: none;
}

.arms20538-license-editor {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid rgba(214,168,79,.3);
  border-radius: 18px;
  color: #eaf2fc;
  background: linear-gradient(145deg, rgba(7,20,38,.98), rgba(12,34,57,.96));
  box-shadow: 0 18px 38px rgba(2,6,23,.2), inset 0 1px 0 rgba(255,255,255,.05);
}

.arms20538-editor-head {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 14px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(148,163,184,.18);
}

.arms20538-editor-state {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.arms20538-editor-state.restricted { color: #fecaca; background: rgba(127,29,29,.3); border: 1px solid rgba(248,113,113,.3); }
.arms20538-editor-state.valid { color: #a7f3d0; background: rgba(6,78,59,.34); border: 1px solid rgba(52,211,153,.3); }

.arms20538-date-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin-top: 16px;
}

.arms20538-date-field {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 13px;
  background: rgba(2, 12, 27, .42);
}

.arms20538-date-field > span {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.arms20538-date-field b { color: #f8fafc; font-size: 12px; }
.arms20538-date-field small { color: #fbbf24; font-size: 9px; font-weight: 800; text-align: right; }
.arms20538-date-field.is-valid small { color: #34d399; }
.arms20538-date-field.is-expired small { color: #f87171; }

.arms20538-date-field input {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(148,163,184,.3);
  border-radius: 10px;
  color: #eaf2fc;
  background: #071426;
  color-scheme: dark;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  outline: none;
}

.arms20538-date-field input:focus { border-color: #d6a84f; box-shadow: 0 0 0 3px rgba(214,168,79,.14); }

.arms20538-form-message {
  display: none;
  margin: 13px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
}

.arms20538-form-message:not(:empty) { display: block; }
.arms20538-form-message.is-error { color: #fecaca; background: rgba(127,29,29,.24); border: 1px solid rgba(248,113,113,.25); }
.arms20538-form-message.is-success { color: #a7f3d0; background: rgba(6,78,59,.26); border: 1px solid rgba(52,211,153,.25); }
.arms20538-form-message.is-working { color: #bfdbfe; background: rgba(30,64,175,.2); border: 1px solid rgba(96,165,250,.22); }

.arms20538-form-actions { margin-top: 14px; }
.arms20538-save-btn:disabled,
.arms20538-check-btn:disabled { cursor: wait; opacity: .64; }

body[data-theme="light"] .arms20538-gate-banner {
  color: #10233b;
  border-color: #b8cee5;
  background: linear-gradient(135deg, #f8fbff 0%, #eaf5ff 52%, #dceeff 100%);
  box-shadow: 0 18px 40px rgba(35,72,112,.13), inset 0 1px 0 #fff;
}

body[data-theme="light"] .arms20538-gate-icon,
body[data-theme="light"] .arms20538-editor-icon { color: #7a571d; background: #fff6db; border-color: #d8bd7a; }
body[data-theme="light"] .arms20538-gate-kicker,
body[data-theme="light"] .arms20538-editor-kicker { color: #7a571d; }
body[data-theme="light"] .arms20538-gate-copy p,
body[data-theme="light"] .arms20538-editor-head p { color: #5f7188; }
body[data-theme="light"] .arms20538-chip { color: #7c4a03; background: #fff7dc; border-color: #e5c778; }
body[data-theme="light"] .arms20538-chip.is-expired,
body[data-theme="light"] .arms20538-chip.is-error { color: #9f1239; background: #fff1f2; border-color: #fecdd3; }
body[data-theme="light"] .arms20538-gate-actions button.secondary,
body[data-theme="light"] .arms20538-check-btn { color: #163a60; background: #eef6ff; border-color: #b8cee5; }

body[data-theme="light"] .arms20538-license-editor {
  color: #10233b;
  border-color: #b8cee5;
  background: linear-gradient(145deg, #ffffff, #edf6ff);
  box-shadow: 0 18px 38px rgba(35,72,112,.12), inset 0 1px 0 #fff;
}

body[data-theme="light"] .arms20538-editor-head { border-color: #cbdced; }
body[data-theme="light"] .arms20538-date-field { background: rgba(255,255,255,.76); border-color: #c4d8ea; }
body[data-theme="light"] .arms20538-date-field b { color: #10233b; }
body[data-theme="light"] .arms20538-date-field input {
  color: #10233b;
  background: #fff;
  border-color: #b8cee5;
  color-scheme: light;
}

@media (max-width: 920px) {
  .arms20538-gate-banner,
  .arms20538-editor-head { grid-template-columns: auto minmax(0,1fr); }
  .arms20538-gate-actions,
  .arms20538-editor-state { grid-column: 1 / -1; }
  .arms20538-gate-actions { justify-content: flex-start; max-width: none; }
  .arms20538-date-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .arms20538-gate-banner,
  .arms20538-license-editor { padding: 15px; border-radius: 15px; }
  .arms20538-gate-icon,
  .arms20538-editor-icon { width: 42px; height: 42px; border-radius: 13px; }
  .arms20538-gate-actions button,
  .arms20538-form-actions button { flex: 1 1 100%; }
}
