/* ==========================================
   BLACKVEIL NFC ID — FINAL CSS V1.1
   ========================================== */

:root {
  color-scheme: dark;

  --bg: #090a0e;
  --panel: #151821;
  --panel2: #1c202a;
  --red: #d12636;
  --white: #f8f9fb;
  --muted: #a1a8b5;
  --border: #303541;

  font-family: Inter, system-ui, -apple-system,
    "Segoe UI", Arial, sans-serif;
}

/* RESET */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;

  background:
    radial-gradient(
      ellipse at 50% -10%,
      #37151c 0,
      transparent 42%
    ),
    var(--bg);

  color: var(--white);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

a,
button {
  touch-action: manipulation;
}

/* ==========================================
   MAIN CONTAINER
   ========================================== */

.shell {
  width: min(calc(100% - 36px), 1050px);
  margin-inline: auto;
}

/* ==========================================
   HEADER
   ========================================== */

.topbar {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;

  min-width: 0;

  font-size: 18px;
  font-weight: 850;
  letter-spacing: 1.5px;
}

.brand-mark {
  display: grid;
  place-items: center;

  width: 46px;
  height: 46px;
  flex-shrink: 0;

  border-radius: 12px;
  background: #a91929;

  font-size: 16px;
  letter-spacing: 0;
}

.brand small {
  display: block;
  margin-top: 3px;

  font-size: 9px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 2px;
}

.red,
.role {
  color: #ff4b5b;
}

.language {
  min-width: 80px;
  flex-shrink: 0;
  padding: 11px 19px;

  border: 1px solid #575b65;
  border-radius: 999px;

  background: #1b1e26;
  color: #ffffff;

  cursor: pointer;
}

/* ==========================================
   DESKTOP LAYOUT
   ========================================== */

.layout {
  display: grid;

  grid-template-columns:
    minmax(0, 0.9fr)
    minmax(0, 1.1fr);

  gap: 22px;
  align-items: stretch;

  margin: 35px auto 20px;
}

.card {
  min-width: 0;
  padding: 36px;

  background: linear-gradient(
    145deg,
    #191c25,
    #11141b
  );

  border: 1px solid var(--border);
  border-radius: 24px;

  box-shadow: 0 20px 65px #0005;
}

/* ==========================================
   PERSONAL PROFILE
   ========================================== */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 510px;
  text-align: center;
}

.portrait {
  width: 152px;
  height: 152px;
  flex-shrink: 0;

  padding: 5px;
  overflow: hidden;

  border: 2px solid var(--red);
  border-radius: 50%;

  background: #272c36;
}

.portrait img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  border-radius: 50%;
}

.eyebrow {
  margin: 25px 0 8px;

  color: var(--muted);
  font-size: 11px;
  letter-spacing: 2px;
}

.hero h1 {
  margin: 5px 0 10px;

  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.25;

  overflow-wrap: anywhere;
}

.role {
  margin: 0 0 7px;

  font-size: 14px;
  font-weight: 750;
  letter-spacing: 1px;
}

.muted {
  margin: 0;
  color: var(--muted);
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;

  margin-top: 28px;
  padding: 9px 14px;

  border-radius: 99px;
  background: #242932;

  color: #cbd0d9;
  font-size: 10px;
  letter-spacing: 1px;
}

.dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;

  border-radius: 50%;
  background: #f14c5c;
}

/* ==========================================
   CONTACT SECTION
   ========================================== */

.contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 16px;

  margin-bottom: 24px;
}

.section-title h2 {
  margin: 0;

  font-size: 14px;
  letter-spacing: 2px;
  white-space: nowrap;
}

.line {
  height: 1px;
  flex: 1;
  background: #414550;
}

.actions {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 14px;
}

.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;

  min-width: 0;
  min-height: 100px;
  padding: 12px;

  background: var(--panel2);
  color: var(--white);

  border: 1px solid #363c49;
  border-radius: 14px;

  text-align: center;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.5px;

  cursor: pointer;
}

/* ==========================================
   SVG ICONS — FIXED SIZE
   ========================================== */

.actions .action svg.symbol {
  display: block;

  width: 26px;
  height: 26px;

  min-width: 26px;
  min-height: 26px;

  max-width: 26px;
  max-height: 26px;

  flex: 0 0 26px;

  color: #ff4b5b;
  fill: none;
  overflow: visible;
}

/* Fallback for old text icons */

.action .symbol:not(svg) {
  display: inline-block;
  font-size: 25px;
  line-height: 1;
  color: #ff4b5b;
}

/* ==========================================
   VEHICLE & COMPANY BUTTONS
   ========================================== */

.emergency,
.company {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  min-height: 58px;
  padding: 14px;

  border-radius: 13px;

  text-align: center;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.4px;
}

.emergency {
  margin-top: 22px;
  background: #b91d2d;
}

.company {
  border: 1px solid #4a505d;
  background: #1c2028;
}

.hint {
  margin: 10px 0 14px;

  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

/* ==========================================
   INTERACTIONS
   ========================================== */

.action,
.company,
.emergency,
.language {
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

@media (hover: hover) {
  .action:hover,
  .company:hover {
    border-color: #f14b5b;
    transform: translateY(-2px);
  }

  .emergency:hover {
    background: #d3293b;
  }
}

.action:active,
.company:active,
.emergency:active {
  transform: scale(0.98);
}

.action:focus-visible,
.company:focus-visible,
.emergency:focus-visible,
.language:focus-visible {
  outline: 3px solid #ff7380;
  outline-offset: 3px;
}

.action[aria-disabled="true"],
.emergency[aria-disabled="true"],
.company[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==========================================
   FOOTER
   ========================================== */

footer {
  padding: 26px 10px 38px;

  color: #858c9a;
  font-size: 10px;
  letter-spacing: 1.3px;
  text-align: center;
}

/* ==========================================
   NOTIFICATIONS
   ========================================== */

.toast {
  position: fixed;

  bottom: calc(
    20px + env(safe-area-inset-bottom)
  );

  left: 50%;
  z-index: 10;

  display: none;

  width: max-content;
  max-width: min(90vw, 400px);

  padding: 12px 18px;

  transform: translateX(-50%);

  background: #2a303c;
  color: #ffffff;

  border: 1px solid #6d7583;
  border-radius: 12px;

  text-align: center;
}

.toast.show {
  display: block;
}

/* ==========================================
   ARABIC / RTL
   ========================================== */

[dir="rtl"] .brand,
[dir="rtl"] .eyebrow,
[dir="rtl"] .role,
[dir="rtl"] .section-title h2 {
  letter-spacing: 0;
}

/* ==========================================
   TABLET
   ========================================== */

@media (max-width: 900px) {
  .layout {
    gap: 16px;
  }

  .card {
    padding: 26px;
  }

  .hero {
    min-height: 450px;
  }
}

/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 740px) {
  .shell {
    width: min(calc(100% - 28px), 480px);
  }

  .topbar {
    min-height: 78px;
  }

  .brand {
    font-size: 15px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;

    margin: 10px auto 20px;
  }

  .card {
    padding: 26px 20px;
    border-radius: 20px;
  }

  .hero {
    min-height: 0;
    padding-block: 26px;
  }

  .portrait {
    width: 108px;
    height: 108px;
  }

  .eyebrow {
    margin-top: 18px;
  }

  .hero h1 {
    font-size: clamp(22px, 6vw, 28px);
  }

  .status {
    margin-top: 20px;
  }

  .contact {
    padding-bottom: 26px;
  }

  .actions {
    gap: 10px;
  }

  .action {
    min-height: 90px;
    gap: 10px;
  }

  /* Small icons on phones */

  .actions .action svg.symbol {
    width: 24px;
    height: 24px;

    min-width: 24px;
    min-height: 24px;

    max-width: 24px;
    max-height: 24px;

    flex: 0 0 24px;
  }

  .section-title {
    margin-bottom: 16px;
  }

  .emergency {
    margin-top: 16px;
  }
}

/* ==========================================
   SMALL PHONES
   ========================================== */

@media (max-width: 350px) {
  .shell {
    width: calc(100% - 20px);
  }

  .card {
    padding: 22px 14px;
  }

  .actions {
    gap: 9px;
  }

  .action {
    font-size: 10px;
  }

  .brand {
    font-size: 13px;
  }

  .language {
    min-width: 65px;
    padding: 10px 12px;
  }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}