:root {
  --bg: #0f1316;
  --frame: #171c21;
  --surface: #1c2229;
  --surface2: #242b33;
  --border: #2e3640;
  --borderSoft: #262d35;
  --text: #f1ece0;
  --textDim: #9aa4ad;
  --gold: #c9a15c;
  --goldSoft: rgba(201, 161, 92, 0.14);
  --green: #79a98a;
  --greenSoft: rgba(121, 169, 138, 0.14);
  --red: #bd6152;
  --redSoft: rgba(189, 97, 82, 0.14);
}
* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  font-family: "Tajawal", sans-serif;
  color: var(--text);
}
.heading { font-family: "El Messiri", serif; }

.app-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.phone {
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  background: var(--frame);
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (min-width: 480px) {
  .phone { min-height: 780px; border-radius: 2rem; box-shadow: 0 25px 60px rgba(0,0,0,.5); }
}

.header { position: relative; padding: 20px 20px 16px; background: var(--surface); border-bottom: 1px solid var(--borderSoft); }
.header-top { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { width: 36px; height: 36px; border-radius: 12px; background: var(--goldSoft); display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 18px; }
.brand-name { font-size: 18px; color: var(--text); line-height: 1; }
.brand-sub { font-size: 11px; color: var(--textDim); margin-top: 4px; }
.icon-btn { width: 36px; height: 36px; border-radius: 12px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 15px; background: var(--goldSoft); color: var(--gold); }
.icon-btn.off { background: var(--surface2); color: var(--textDim); }

.content { flex: 1; overflow-y: auto; padding: 16px 20px; }
.section-title { font-size: 16px; color: var(--text); margin-bottom: 12px; }
label { display: block; margin-bottom: 12px; }
.field-label { display: block; font-size: 12px; color: var(--textDim); margin-bottom: 6px; }
input[type="text"], select, textarea {
  width: 100%; background: var(--surface2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: "Tajawal", sans-serif; outline: none;
}
input[type="text"]:focus, select:focus, textarea:focus { border-color: var(--gold); }
textarea { resize: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--border); background: var(--surface2); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.switch { width: 40px; height: 24px; border-radius: 999px; border: none; cursor: pointer; position: relative; background: var(--border); }
.switch.on { background: var(--gold); }
.switch .knob { position: absolute; top: 2px; right: 18px; width: 20px; height: 20px; border-radius: 999px; background: #fff; transition: .15s; }
.switch.on .knob { right: 2px; }

.doc-btn { width: 100%; border: 1px dashed var(--border); background: transparent; color: var(--textDim); border-radius: 8px; padding: 12px; font-size: 14px; cursor: pointer; margin-bottom: 12px; font-family: "Tajawal", sans-serif; display: flex; align-items: center; justify-content: center; gap: 8px; }
.doc-btn.on { border-color: var(--green); color: var(--green); }
.submit-btn { width: 100%; background: var(--gold); color: #1a1408; border: none; border-radius: 8px; padding: 13px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: "Tajawal", sans-serif; }
.submit-btn:disabled { opacity: .6; cursor: default; }
.form-error { color: var(--red); background: var(--redSoft); border-radius: 8px; padding: 9px 12px; font-size: 12.5px; margin-bottom: 12px; }

.list-label { font-size: 12px; color: var(--textDim); margin: 20px 0 8px; }
.empty { font-size: 12px; color: var(--textDim); text-align: center; padding: 24px 0; }
.item-card { border: 1px solid var(--borderSoft); background: var(--surface); border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.item-name { font-size: 14px; color: var(--text); }
.item-sub { font-size: 11px; color: var(--textDim); margin-top: 3px; }
.chip { font-size: 11px; padding: 4px 10px; border-radius: 999px; font-weight: 500; white-space: nowrap; }
.chip.pending { color: var(--gold); background: var(--goldSoft); }
.chip.approved { color: var(--green); background: var(--greenSoft); }
.chip.rejected { color: var(--red); background: var(--redSoft); }

.flash { background: var(--goldSoft); color: var(--gold); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.req-card { border: 1px solid var(--borderSoft); background: var(--surface); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.req-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.req-who { display: flex; align-items: center; gap: 8px; }
.avatar { width: 32px; height: 32px; border-radius: 999px; background: var(--goldSoft); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.reason-tag { font-size: 11px; padding: 4px 8px; border-radius: 999px; background: var(--surface2); color: var(--textDim); }
.req-details { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 12px; color: var(--textDim); background: var(--surface2); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.req-details b { color: var(--text); font-weight: 500; }
.req-note { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 6px; margin-top: 2px; }
.req-actions { display: flex; gap: 8px; }
.btn-approve, .btn-reject { flex: 1; border-radius: 8px; padding: 9px; font-size: 14px; font-weight: 500; cursor: pointer; font-family: "Tajawal", sans-serif; display: flex; align-items: center; justify-content: center; gap: 6px; }
.btn-approve { background: var(--green); color: #0f1e17; border: none; }
.btn-reject { background: transparent; color: var(--red); border: 1px solid var(--red); }

.top-actions { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.count-badge { font-size: 12px; background: var(--goldSoft); color: var(--gold); padding: 2px 9px; border-radius: 999px; margin-right: 6px; }
.export-btn, .link-btn { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; font-family: "Tajawal", sans-serif; }

.centered-message { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: var(--textDim); font-size: 14px; }
