/* ========================================
   Employee account pages: «عروضي» and «حسابي»
   pages/portal/my-decks.html, pages/portal/profile.html
======================================== */

.acc-page {
  --a-navy: #00344b;
  --a-navy-2: #002b3d;
  --a-mint: #00ceb7;
  --a-teal: #169c8c;
  --a-ink: #17323f;
  --a-muted: #5d717b;
  --a-line: #e3eaec;
  --a-soft: #f4f8f9;
  background: var(--a-soft);
  color: var(--a-ink);
}

.acc-page [hidden] { display: none !important; }

.acc-wrap {
  width: min(calc(100% - 72px), var(--container, 1320px));
  margin-inline: auto;
}

/* ---------- Buttons ---------- */

.acc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}

.acc-btn:hover { transform: translateY(-1px); }
.acc-btn:disabled { opacity: .55; cursor: progress; transform: none; }
.acc-btn-mint { background: var(--a-mint); color: var(--a-navy-2); box-shadow: 0 8px 20px rgba(0, 206, 183, .25); }
.acc-btn-navy { background: var(--a-navy); color: #fff; }
.acc-btn-navy:hover { background: #004a68; }
.acc-btn-line { border: 1px solid #c9d6da; background: #fff; color: var(--a-navy); }

.acc-icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--a-line);
  border-radius: 10px;
  background: #fff;
  color: #8a9ca4;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}

.acc-icon-btn svg { width: 20px; height: 20px; }
.acc-icon-btn:hover { border-color: #e7b5ae; color: #a3271b; }

.acc-link { color: var(--a-teal); font-size: 14px; font-weight: 700; text-decoration: none; }

/* ---------- Page head ---------- */

.acc-head {
  background: linear-gradient(135deg, #004663 0%, var(--a-navy) 55%, var(--a-navy-2) 100%);
  color: #fff;
}

.acc-head-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 44px 0 40px;
}

.acc-crumb {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, .65);
  font-size: 13px;
}

.acc-crumb a { color: rgba(255, 255, 255, .7); text-decoration: none; }
.acc-crumb a:hover { color: #fff; }
.acc-crumb span:last-child { color: var(--a-mint); }

.acc-head h1 { margin: 0 0 8px; font-size: clamp(28px, 3vw, 38px); }
.acc-head p { max-width: 620px; margin: 0; color: rgba(255, 255, 255, .78); font-size: 15.5px; line-height: 1.8; }
.acc-head .acc-btn-line { border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .08); color: #fff; }

.acc-body { padding: 32px 0 80px; display: grid; gap: 28px; }

.acc-kicker { color: var(--a-teal); font-size: 13px; font-weight: 700; }

/* ---------- In-progress deck ---------- */

.acc-current {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 22px;
  border: 1px solid #bfe9e2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(0, 52, 75, .08);
}

.acc-current-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.acc-current-strip img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--a-line);
  border-radius: 8px;
  background: var(--a-soft);
}

.acc-current-info h2 { margin: 4px 0 6px; color: var(--a-navy); font-size: 22px; }
.acc-current-info p { margin: 0 0 12px; color: var(--a-muted); font-size: 14px; }

.acc-bar { display: block; max-width: 420px; height: 6px; overflow: hidden; border-radius: 3px; background: #e6eef0; }
.acc-bar i { display: block; width: 0; height: 100%; border-radius: 3px; background: var(--a-mint); transition: width .6s ease; }

/* ---------- Saved decks ---------- */

.acc-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.acc-section-head h2 { margin: 0 0 4px; color: var(--a-navy); font-size: 22px; }
.acc-section-head p { margin: 0; color: var(--a-muted); font-size: 14px; }

.acc-tools { display: flex; gap: 10px; }

.acc-tools input,
.acc-tools select {
  height: 42px;
  padding: 0 14px;
  border: 1px solid #d3dfe2;
  border-radius: 10px;
  background: #fff;
  color: var(--a-ink);
  font-family: inherit;
  font-size: 14px;
}

.acc-tools input { width: 240px; }
.acc-tools input:focus,
.acc-tools select:focus { outline: 0; border-color: var(--a-navy); }

.acc-decks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.acc-deck {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--a-line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.acc-deck:hover {
  border-color: #bfe9e2;
  box-shadow: 0 18px 40px rgba(0, 52, 75, .12);
  transform: translateY(-3px);
}

.acc-cover {
  display: grid;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef3f4;
  border-bottom: 1px solid var(--a-line);
}

.acc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.acc-cover.is-collage {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  background: #fff;
}

.acc-cover.is-collage img.is-main { grid-row: 1 / -1; }

.acc-cover.is-empty {
  place-items: center;
  background: linear-gradient(135deg, #f1f7f8, #e3f2ef);
  color: var(--a-muted);
  font-size: 14px;
}

.acc-cover-empty { color: var(--a-muted); font-size: 14px; }

.acc-deck-body { display: grid; gap: 4px; padding: 16px 18px 6px; }
.acc-deck-body h3 { margin: 0; overflow: hidden; color: var(--a-navy); font-size: 17px; white-space: nowrap; text-overflow: ellipsis; }
.acc-deck-body p { margin: 0; color: var(--a-muted); font-size: 13.5px; }
.acc-deck-body small { color: #8a9ca4; font-size: 12.5px; }

.acc-deck-actions { display: flex; gap: 8px; margin-top: auto; padding: 14px 18px 18px; }
.acc-deck-actions .acc-btn { flex: 1; }

.acc-empty {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 56px 24px;
  border: 1px dashed #c9d6da;
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

.acc-empty strong { color: var(--a-navy); font-size: 18px; }
.acc-empty span { color: var(--a-muted); font-size: 14px; }
.acc-empty .acc-btn { margin-top: 10px; }

/* ---------- Profile ---------- */

.acc-person { display: flex; align-items: center; gap: 22px; }

.acc-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  border: 3px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: linear-gradient(145deg, #005a7d, #00283a);
  color: var(--a-mint);
  font-size: 36px;
  font-weight: 700;
}

.acc-profile-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.acc-card {
  display: grid;
  gap: 16px;
  padding: 26px;
  border: 1px solid var(--a-line);
  border-radius: 18px;
  background: #fff;
}

.acc-card h2 { margin: 0; color: var(--a-navy); font-size: 19px; }

.acc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.acc-stats div { display: flex; flex-direction: column-reverse; gap: 2px; padding: 14px; border-radius: 12px; background: var(--a-soft); }
.acc-stats dd { margin: 0; color: var(--a-navy); font-size: 28px; font-weight: 700; line-height: 1.1; }
.acc-stats dt { color: var(--a-muted); font-size: 12.5px; }

.acc-info { display: grid; gap: 0; margin: 0; }
.acc-info div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid #f0f4f5; }
.acc-info div:last-child { border-bottom: 0; }
.acc-info dt { color: var(--a-muted); font-size: 13.5px; }
.acc-info dd { margin: 0; color: var(--a-ink); font-size: 14px; font-weight: 600; text-align: left; overflow-wrap: anywhere; }

.acc-note { margin: 0; color: var(--a-muted); font-size: 13px; line-height: 1.7; }

.acc-form { display: grid; gap: 14px; }
.acc-form label { display: grid; gap: 6px; }
.acc-form label span { color: var(--a-navy); font-size: 13.5px; font-weight: 700; }
.acc-form label small { color: var(--a-muted); font-size: 12px; }

.acc-form input {
  height: 46px;
  padding: 0 14px;
  border: 1px solid #c9d6da;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
}

.acc-form input:focus { outline: 0; border-color: var(--a-navy); box-shadow: 0 0 0 3px rgba(0, 52, 75, .12); }

.acc-form-status { min-height: 1.4em; margin: 0; font-size: 13.5px; }
.acc-form-status.is-error { color: #a3271b; }
.acc-form-status.is-ok { color: var(--a-teal); font-weight: 600; }

/* ---------- Toast ---------- */

.acc-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 3000;
  max-width: min(560px, calc(100% - 32px));
  padding: 14px 22px;
  border-radius: 12px;
  background: var(--a-navy);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .2s ease, transform .2s ease;
}

.acc-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.acc-toast.is-error { background: #8f2418; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .acc-profile-grid { grid-template-columns: 1fr 1fr; }
  .acc-current { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .acc-wrap { width: calc(100% - 32px); }
  .acc-head-inner { flex-direction: column; align-items: flex-start; }
  .acc-profile-grid { grid-template-columns: 1fr; }
  .acc-tools { width: 100%; }
  .acc-tools input { flex: 1; width: auto; }
}
