/* Simple Zakat Calculator - Light UI (RTL) */
:root{
  --bg1: #f6fbff;
  --bg2: #f4fff8;
  --card: rgba(255,255,255,.78);
  --card2: rgba(255,255,255,.92);
  --text: #1b2430;
  --muted: rgba(27,36,48,.68);
  --border: rgba(27,36,48,.12);
  --shadow: 0 18px 50px rgba(16, 24, 40, .10);
  --radius: 18px;
  --ok: rgba(22, 163, 74, .12);
  --warn: rgba(234, 179, 8, .14);
  --bad: rgba(244, 63, 94, .12);
  --focus: rgba(59,130,246,.45);
}
*{ box-sizing: border-box; }
html,body{ height: 100%; }
body{
  margin: 0;
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(59,130,246,.18), transparent 60%),
    radial-gradient(800px 500px at 10% 30%, rgba(34,197,94,.16), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}
.container{
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
}
.hero{
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(246, 251, 255, .70);
  border-bottom: 1px solid var(--border);
}
.hero-inner{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 0;
}
.brand{ display: flex; gap: 12px; align-items: flex-start; }
.logo{
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 800;
  color: #0b3b84;
  background: linear-gradient(135deg, rgba(59,130,246,.22), rgba(34,197,94,.18));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}
h1{ margin: 0; font-size: 18px; line-height: 1.2; }
.sub{
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
  max-width: 720px;
}
.meta{
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.hero-actions{ display: flex; gap: 10px; flex-wrap: wrap; }
.grid{
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
  .hero-inner{ flex-direction: column; }
}
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
h2{ margin: 0 0 12px; font-size: 16px; }
h3{ margin: 0 0 10px; font-size: 14px; }
.group{ padding-top: 8px; border-top: 1px dashed rgba(27,36,48,.10); margin-top: 14px; }
.group:first-of-type{ border-top: 0; margin-top: 0; padding-top: 0; }
.grid2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 700px){
  .grid2{ grid-template-columns: 1fr; }
}
.field label{
  display: block;
  font-size: 12.5px;
  margin-bottom: 6px;
  color: rgba(27,36,48,.90);
}
.field input, .field select{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card2);
  color: var(--text);
  outline: none;
  font-family: inherit;
}
.field input:focus, .field select:focus{
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(59,130,246,.12);
}
.hint{
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.check{
  display: flex;
  gap: 10px;
  align-items: center;
  user-select: none;
}
.check input{ width: 18px; height: 18px; }
.btn{
  border: 1px solid var(--border);
  background: rgba(59,130,246,.12);
  color: #0b3b84;
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover{ background: rgba(59,130,246,.18); }
.btn-ghost{
  background: rgba(27,36,48,.06);
  color: rgba(27,36,48,.86);
}
.btn-ghost:hover{ background: rgba(27,36,48,.10); }
.btn-danger{
  background: rgba(244,63,94,.12);
  color: #9f1239;
  border-color: rgba(244,63,94,.22);
}
.btn-danger:hover{ background: rgba(244,63,94,.16); }
.row-actions{
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.result{
  position: sticky;
  top: 92px;
}
@media (max-width: 980px){
  .result{ position: static; }
}
.kpi{
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.75);
  padding: 12px;
  margin-top: 10px;
}
.kpi:first-of-type{ margin-top: 0; }
.kpi-l{ font-size: 12.5px; color: var(--muted); }
.kpi-v{ margin-top: 4px; font-size: 18px; font-weight: 900; color: #0b3b84; }
.status{
  margin-top: 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 12px;
  background: rgba(255,255,255,.70);
}
.status.ok{ background: var(--ok); border-color: rgba(22,163,74,.22); }
.status.warn{ background: var(--warn); border-color: rgba(234,179,8,.22); }
.status.bad{ background: var(--bad); border-color: rgba(244,63,94,.22); }
.st-title{ font-weight: 900; margin-bottom: 4px; }
.st-text{ font-size: 12.5px; color: rgba(27,36,48,.82); line-height: 1.7; }
.breakdown{ margin-top: 12px; }
.breakdown summary{
  cursor: pointer;
  font-weight: 800;
  color: rgba(27,36,48,.86);
}
.bd{ margin-top: 10px; display: grid; gap: 8px; }
.row{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255,255,255,.70);
  font-size: 12.5px;
}
.row .l{ color: rgba(27,36,48,.82); }
.row .v{ font-weight: 800; }
.actions{ margin-top: 12px; }
.manual{
  margin-top: 14px;
  border: 1px solid rgba(27,36,48,.14);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(255,255,255,.60);
}
.manual summary{
  cursor: pointer;
  font-weight: 900;
  color: rgba(27,36,48,.86);
}
.manual-grid{ margin-top: 12px; }
.manual .full{ grid-column: 1 / -1; }
.mini{
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.footer{
  text-align: center;
  padding: 22px 0 34px;
  color: var(--muted);
  font-size: 12.5px;
}
@media print{
  .hero, .btn, .actions, .manual{ display: none !important; }
  body{ background: white; }
  .card{ box-shadow: none; background: white; }
  .result{ position: static; }
}
