/* ============================================================
   صَنَّعلي — Careers  |  career.sannaly.com
   Brand: Dark #2C1810 · Brown #4A2419 · Copper #B8743D
          Cream #F5EBE0 · Sandy #F5D9B8 · Soft #8B5A3C
   Font: Cairo
   ============================================================ */
:root {
  --primary-dark:  #2C1810;
  --primary-brown: #4A2419;
  --accent-copper: #B8743D;
  --bg-cream:      #F5EBE0;
  --text-on-dark:  #F5D9B8;
  --soft-brown:    #8B5A3C;
  --white:         #FFFFFF;
  --ok:            #2e7d52;
  --bad:           #b0413a;
  --font: 'Cairo', system-ui, sans-serif;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 4px 24px rgba(44,24,16,.10);
  --shadow-lg: 0 10px 44px rgba(44,24,16,.20);
  --t: all .25s ease;
}
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.8;
  color: var(--primary-dark);
  background: var(--bg-cream);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}
/* English: flip the whole page to LTR (header, markers, text flow) */
[dir="ltr"] body { direction: ltr; }
[dir="ltr"] input, [dir="ltr"] textarea, [dir="ltr"] select { text-align: left; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: var(--t); }
button, input, select, textarea { font-family: var(--font); }
.container { max-width: 980px; margin: 0 auto; padding: 0 22px; }

/* ---------- Header ---------- */
.topbar {
  background: var(--primary-dark);
  color: var(--text-on-dark);
  padding: 14px 0;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow);
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 40px; width: auto; border-radius: 8px; }
.brand b { font-size: 1.25rem; font-weight: 900; color: var(--white); }
.brand span { font-size: .8rem; color: var(--accent-copper); font-weight: 700; }
.topbar a.adminlink { color: var(--text-on-dark); font-size: .85rem; opacity: .8; }
.topbar a.adminlink:hover { opacity: 1; }
.navright { display: flex; align-items: center; gap: 12px; }
.langbtn {
  background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.32);
  border-radius: 999px; padding: 5px 13px; font-family: inherit; font-size: .8rem; font-weight: 800;
  cursor: pointer; line-height: 1.4; transition: var(--t);
}
.langbtn:hover { background: rgba(255,255,255,.24); }

/* ---------- Terms & agree ---------- */
.terms { margin-top: 8px; text-align: start; }
.terms li { position: relative; padding: 7px 30px 7px 0; color: var(--soft-brown); }
.terms li::before { content: "§"; position: absolute; right: 0; top: 6px; width: 22px; height: 22px; background: var(--primary-brown); color: #fff; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 900; }
[dir="ltr"] .terms li { padding: 7px 0 7px 30px; }
[dir="ltr"] .terms li::before { right: auto; left: 0; }
.agree { display: flex; align-items: flex-start; gap: 9px; justify-content: center; text-align: start; margin: 4px 0 6px; font-size: .92rem; color: var(--primary-brown); }
.agree input { margin-top: 5px; flex: 0 0 auto; width: 17px; height: 17px; accent-color: var(--accent-copper); cursor: pointer; }
.agree a { color: var(--accent-copper); font-weight: 800; text-decoration: underline; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--primary-brown), var(--primary-dark));
  color: var(--text-on-dark);
  padding: 64px 0 72px;
  text-align: center;
}
.hero .eyebrow { color: var(--accent-copper); font-weight: 800; letter-spacing: 3px; font-size: .82rem; text-transform: uppercase; }
.hero h1 { color: var(--white); font-size: clamp(1.7rem, 4.5vw, 2.7rem); font-weight: 900; margin: 14px 0 10px; line-height: 1.35; }
.hero p { max-width: 620px; margin: 0 auto; opacity: .92; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }
.chip {
  background: rgba(245,217,184,.12); border: 1px solid rgba(245,217,184,.25);
  color: var(--text-on-dark); padding: 8px 16px; border-radius: 999px; font-size: .9rem; font-weight: 700;
}
.chip b { color: var(--white); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent-copper); color: var(--white); font-weight: 800;
  padding: 14px 30px; border: none; border-radius: 999px; font-size: 1rem; cursor: pointer;
  box-shadow: var(--shadow); transition: var(--t);
}
.btn:hover { background: #a5642f; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; border: 2px solid var(--accent-copper); color: var(--accent-copper); }
.btn.sm { padding: 8px 16px; font-size: .85rem; }

/* ---------- Cards / sections ---------- */
.section { padding: 56px 0; }
.card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 30px; text-align: right; border: 1px solid rgba(184,116,61,.14);
}
.card + .card { margin-top: 22px; }
h2.title { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 900; color: var(--primary-brown); margin-bottom: 8px; }
.lead { color: var(--soft-brown); margin-bottom: 18px; }

.feat { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.feat .item { display: flex; gap: 12px; align-items: flex-start; background: var(--bg-cream); padding: 16px; border-radius: var(--radius-sm); }
.feat .item .ico { flex: 0 0 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-copper); color: #fff; font-weight: 900; }
.feat .item b { display: block; color: var(--primary-brown); }
.feat .item span { font-size: .92rem; color: var(--soft-brown); }
ul.checklist { margin-top: 8px; }
ul.checklist li { position: relative; padding: 6px 30px 6px 0; }
ul.checklist li::before { content: "✓"; position: absolute; right: 0; top: 7px; width: 22px; height: 22px; background: var(--accent-copper); color: #fff; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 900; }

/* ---------- Job list ---------- */
.joblist { display: grid; gap: 16px; }
.job {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-right: 5px solid var(--accent-copper); text-align: right; transition: var(--t);
}
.job:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.job h3 { font-size: 1.2rem; font-weight: 900; color: var(--primary-brown); }
.job .sub { color: var(--soft-brown); font-size: .9rem; margin-top: 4px; }

/* ---------- Form ---------- */
.form { display: grid; gap: 16px; margin-top: 8px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; text-align: right; }
.field label { font-weight: 700; font-size: .92rem; color: var(--primary-brown); }
.field label .req { color: var(--bad); }
.field input, .field select, .field textarea {
  border: 1.5px solid rgba(139,90,60,.3); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 1rem; background: #fff; color: var(--primary-dark); transition: var(--t);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-copper); box-shadow: 0 0 0 3px rgba(184,116,61,.15); }
.field textarea { min-height: 90px; resize: vertical; }
.filebox {
  border: 2px dashed rgba(139,90,60,.4); border-radius: var(--radius-sm); padding: 18px; text-align: center; cursor: pointer; color: var(--soft-brown); background: var(--bg-cream); transition: var(--t);
}
.filebox:hover { border-color: var(--accent-copper); color: var(--primary-brown); }
.filebox.has { border-style: solid; border-color: var(--ok); color: var(--ok); font-weight: 700; }
.note { font-size: .85rem; color: var(--soft-brown); }
.msg { padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 700; display: none; }
.msg.show { display: block; }
.msg.ok { background: #e7f4ec; color: var(--ok); border: 1px solid #bfe0cd; }
.msg.err { background: #fbeae9; color: var(--bad); border: 1px solid #f0c8c5; }

/* ---------- Footer ---------- */
footer { background: var(--primary-dark); color: var(--text-on-dark); text-align: center; padding: 28px 0; margin-top: 40px; font-size: .9rem; }
footer a { color: var(--accent-copper); }

/* ---------- Admin ---------- */
.admin-wrap { max-width: 1180px; }
.login-box { max-width: 380px; margin: 70px auto; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.stat { background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 12px 18px; text-align: center; flex: 1; min-width: 110px; }
.stat .n { font-size: 1.5rem; font-weight: 900; color: var(--accent-copper); }
.stat .l { font-size: .8rem; color: var(--soft-brown); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.toolbar input[type=search] { flex: 1; min-width: 200px; border: 1.5px solid rgba(139,90,60,.3); border-radius: 999px; padding: 10px 18px; }
table.apps { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.apps th, table.apps td { padding: 12px 14px; text-align: right; border-bottom: 1px solid rgba(139,90,60,.12); font-size: .92rem; vertical-align: middle; }
table.apps th { background: var(--primary-brown); color: var(--text-on-dark); font-weight: 700; position: sticky; top: 0; }
table.apps tr:hover td { background: var(--bg-cream); }
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.b-new { background: #e8eefc; color: #34508f; }
.b-reviewing { background: #fff2dd; color: #946400; }
.b-contacted { background: #e2f0ff; color: #2563a6; }
.b-interview { background: #efe4fb; color: #6c40a8; }
.b-rejected { background: #fbeae9; color: var(--bad); }
.b-hired { background: #e7f4ec; color: var(--ok); }
select.statussel { border: 1.5px solid rgba(139,90,60,.3); border-radius: 8px; padding: 6px 10px; font-size: .85rem; }
.linkcv { color: var(--accent-copper); font-weight: 800; }

/* Login: password eye, remember, switch link */
.pwwrap { position: relative; }
.pwwrap input { width: 100%; padding-left: 44px; }
.pwwrap .eye { position: absolute; top: 50%; left: 6px; transform: translateY(-50%); background: none; border: 0; cursor: pointer; font-size: 1.05rem; line-height: 1; padding: 6px; border-radius: 8px; }
.pwwrap .eye:hover { background: rgba(184,116,61,.12); }
.remember { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--soft-brown); cursor: pointer; margin: -4px 0 2px; }
.remember input { width: 17px; height: 17px; accent-color: var(--accent-copper); cursor: pointer; }
.switch { text-align: center; font-size: .88rem; color: var(--soft-brown); margin-top: 14px; }
.switch a { color: var(--accent-copper); font-weight: 800; text-decoration: none; }
.switch a:hover { text-decoration: underline; }

/* Pending account requests panel */
.pending-card { border: 1.5px solid #f0d9c4; background: #fffaf4; margin-bottom: 18px; }
.pcount { display: inline-block; min-width: 22px; text-align: center; background: var(--accent-copper); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: .8rem; font-weight: 800; margin-right: 6px; }
.prow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(139,90,60,.12); }
.prow:last-child { border-bottom: 0; }
.prow .note { white-space: normal; }
.pacts { display: flex; gap: 8px; flex-shrink: 0; }

@media (max-width: 720px) {
  .prow { flex-direction: column; align-items: stretch; }
  .feat { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .job { flex-direction: column; align-items: stretch; text-align: center; }
  table.apps { display: block; overflow-x: auto; white-space: nowrap; }
}
