/* ==========================================================
   Project 02 — Employee Shift Management
   رنگ: کهربایی / نارنجی
   ========================================================== */

@import url('/_core/fonts.css');


/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0805;
  color: #ffffff;
  font-family: 'Vazirmatn', 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[dir="ltr"] body { font-family: 'Inter', system-ui, sans-serif; }

img, svg, canvas { display: block; max-width: 100%; }


/* ---------- متغیرها ---------- */
:root {
  --bg: #0a0805;
  --bg-card: #14100a;
  --text: #ffffff;
  --text-dim: #b0a898;
  --text-muted: #6a6055;
  --amber: #ffa726;
  --amber-bright: #ffb84d;
  --amber-soft: rgba(255, 167, 38, 0.12);
  --amber-glow: rgba(255, 167, 38, 0.4);
  --success: #4ade80;
  --line: rgba(255, 167, 38, 0.12);
  --line-soft: rgba(255, 255, 255, 0.06);
}


/* ---------- Layout ---------- */
.project {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* ---------- پس‌زمینه ---------- */
.project-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bg-grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(rgba(255, 167, 38, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 167, 38, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 25%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 25%, transparent 70%);
}

.bg-glow {
  position: absolute;
  top: 50%;
  inset-inline-start: 5%;
  transform: translateY(-50%);
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 167, 38, 0.09) 0%, transparent 60%);
  filter: blur(50px);
  pointer-events: none;
  animation: bgGlowFloat 14s ease-in-out infinite;
}

@keyframes bgGlowFloat {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50%      { transform: translateY(-52%) scale(1.06); }
}


/* ---------- Grid دو ستونه ---------- */
.project-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1440px;
  padding: 0 clamp(24px, 5vw, 80px);
  display: grid;
  /* در RTL: ستون اول (راست) = visual, ستون دوم (چپ) = text */
  grid-template-columns: minmax(360px, 1.4fr) minmax(280px, 1fr);
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}


/* ==========================================================
   ستون بصری — داشبورد
   ========================================================== */
.project-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  animation: visualEnter 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes visualEnter {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}


/* ---------- داشبورد ---------- */
.dashboard {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #14100a 0%, #0f0b06 100%);
  border: 1px solid var(--line);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 167, 38, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}


/* ---------- هدر داشبورد ---------- */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.dash-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-icon {
  width: 22px;
  height: 22px;
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-icon svg {
  width: 100%;
  height: 100%;
}

.dash-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.dash-clock {
  font-family: 'Inter', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 0.05em;
  text-shadow: 0 0 14px var(--amber-glow);
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 167, 38, 0.04);
}


/* ---------- بخش‌های داشبورد ---------- */
.dash-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dash-section-meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.7;
}

.dash-employees {
  flex: 1;
  min-height: 0;
}


/* ---------- نمودار شیفت‌ها ---------- */
.shift-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shift-row {
  display: grid;
  grid-template-columns: 60px 1fr 32px;
  align-items: center;
  gap: 12px;
}

.shift-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 500;
}

.shift-track {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  position: relative;
}

.shift-fill {
  height: 100%;
  width: var(--w, 50%);
  border-radius: 4px;
  background: linear-gradient(90deg, var(--amber), var(--amber-bright));
  box-shadow: 0 0 12px var(--amber-glow);
  animation: barGrow 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
  transform-origin: left center;
}

html[dir="rtl"] .shift-fill {
  transform-origin: right center;
  background: linear-gradient(270deg, var(--amber), var(--amber-bright));
}

@keyframes barGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.shift-count {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--amber);
  text-align: end;
}


/* ---------- لیست کارکنان ---------- */
.emp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.emp-row {
  display: grid;
  grid-template-columns: 32px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  animation: empEnter 0.6s ease both;
}

@keyframes empEnter {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

html[dir="rtl"] .emp-row {
  animation-name: empEnterRtl;
}

@keyframes empEnterRtl {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.emp-row.is-changing {
  background: rgba(255, 167, 38, 0.06);
  border-color: rgba(255, 167, 38, 0.25);
}

.emp-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--amber), rgba(255, 167, 38, 0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #1a1206;
  font-family: 'Inter', 'Vazirmatn', sans-serif;
}

.emp-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emp-time {
  font-family: 'Inter', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.emp-status {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  transition: all 0.4s ease;
}

.emp-status.is-active {
  color: var(--success);
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.emp-status.is-break {
  color: var(--amber);
  background: rgba(255, 167, 38, 0.1);
  border: 1px solid rgba(255, 167, 38, 0.3);
}

.emp-status.is-leave {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.25);
}


/* ---------- اکشن‌ها ---------- */
.dash-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.dash-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 7px;
  background: rgba(255, 167, 38, 0.04);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.dash-btn:hover {
  background: rgba(255, 167, 38, 0.08);
  border-color: rgba(255, 167, 38, 0.4);
  color: var(--amber);
  transform: translateY(-1px);
}

.btn-plus {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1;
  margin-top: -1px;
  color: var(--amber);
}


/* ==========================================================
   نوتیفیکیشن شناور
   ========================================================== */
.notif {
  position: absolute;
  top: -20px;
  inset-inline-end: -28px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(20, 16, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 167, 38, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 2;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.notif.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px var(--amber);
  animation: notifPulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes notifPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.3); opacity: 0.7; }
}

.notif-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notif-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.notif-text {
  font-size: 0.78rem;
  color: var(--text-dim);
}


/* ==========================================================
   کارت شناور: پوشش
   ========================================================== */
.float-stat {
  position: absolute;
  bottom: -18px;
  inset-inline-start: -32px;
  width: 160px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(20, 16, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 167, 38, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 2;
  pointer-events: none;
  animation: floatY 6s ease-in-out infinite;
}

.fs-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.fs-value {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.fs-unit {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-inline-start: 2px;
}

.fs-bar {
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.fs-fill {
  height: 100%;
  width: 92%;
  background: linear-gradient(90deg, var(--amber), var(--amber-bright));
  box-shadow: 0 0 8px var(--amber);
  border-radius: 2px;
  animation: barGrow 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.8s both;
}

html[dir="rtl"] .fs-fill {
  transform-origin: right center;
  background: linear-gradient(270deg, var(--amber), var(--amber-bright));
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}


/* ==========================================================
   ستون متن
   ========================================================== */
.project-text {
  display: flex;
  flex-direction: column;
  animation: textEnter 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes textEnter {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.project-num {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--amber);
  opacity: 0.75;
  margin-bottom: 32px;
}

.project-label {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 24px;
  width: fit-content;
}

.project-title {
  font-size: clamp(1.9rem, 4.5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
}

html[dir="rtl"] .project-title { line-height: 1.22; }

.title-line-2 {
  color: var(--amber);
  text-shadow: 0 0 40px var(--amber-glow);
}

.project-desc {
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.85;
  color: var(--text-dim);
  margin-bottom: 32px;
  max-width: 520px;
}


/* ---------- لیست قابلیت‌ها ---------- */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line-soft);
}

.feature-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
  transition: all 0.3s ease;
}

.feature-item:hover {
  padding-inline-start: 8px;
  border-bottom-color: rgba(255, 167, 38, 0.3);
}

.feature-num {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--amber);
  opacity: 0.6;
  padding-top: 3px;
}

.feature-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feature-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-dim);
}


/* ==========================================================
   ریسپانسیو
   ========================================================== */

@media (max-width: 1024px) {
  .project-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px clamp(20px, 5vw, 60px);
    max-height: 100vh;
    overflow-y: auto;
  }
  .project-visual {
    order: 2;
    aspect-ratio: 16 / 11;
  }
  .project-text { order: 1; }
  .notif { top: -14px; inset-inline-end: -14px; }
  .float-stat { bottom: -14px; inset-inline-start: -14px; }
}

@media (max-width: 640px) {
  .project-inner { padding: 24px 20px; gap: 28px; }
  .project-num { margin-bottom: 20px; font-size: 0.75rem; }
  .project-label { font-size: 0.62rem; padding: 5px 10px; margin-bottom: 16px; }
  .project-title { margin-bottom: 18px; }
  .project-desc { font-size: 0.88rem; margin-bottom: 24px; }
  .feature-item { grid-template-columns: 32px 1fr; gap: 10px; padding: 13px 0; }
  .feature-title { font-size: 0.9rem; }
  .feature-desc { font-size: 0.78rem; }
  .dashboard { padding: 16px 16px; gap: 12px; }
  .dash-header { padding-bottom: 10px; }
  .dash-title { font-size: 0.85rem; }
  .dash-clock { font-size: 0.72rem; padding: 3px 8px; }
  .shift-row { grid-template-columns: 48px 1fr 28px; gap: 8px; }
  .shift-label { font-size: 0.7rem; }
  .emp-row { grid-template-columns: 26px 1fr auto; gap: 8px; padding: 6px 8px; }
  .emp-avatar { width: 26px; height: 26px; font-size: 0.68rem; }
  .emp-name { font-size: 0.78rem; }
  .emp-time { display: none; }
  .emp-status { font-size: 0.6rem; padding: 2px 7px; }
  .dash-actions { gap: 6px; padding-top: 10px; }
  .dash-btn { font-size: 0.65rem; padding: 6px 6px; }
  .notif, .float-stat { display: none; }
}

@media (max-height: 620px) and (min-width: 1025px) {
  .project-title { font-size: clamp(1.5rem, 3.5vw, 2.4rem); }
  .project-desc { font-size: 0.85rem; }
  .dashboard { padding: 14px 16px; gap: 10px; }
  .emp-row { padding: 5px 8px; }
}


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}