/* =========================
   Apple-ish UI (iOS/macOS)
   Replace entire old CSS with this file
   ========================= */
@font-face {
  font-family: 'IRANSansWeb';
  src: url('IRANSansWeb.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
html,
body,
button,
input,
textarea,
select {
  font-family:
    'IRANSansWeb',
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    system-ui,
    sans-serif !important;
}


:root{
  --bg0:#0b0f17;
  --bg1:#0d1220;
  --text:#f5f7ff;
  --muted:rgba(245,247,255,.72);
  --muted2:rgba(245,247,255,.55);

  --glass:rgba(255,255,255,.08);
  --glass2:rgba(255,255,255,.06);
  --border:rgba(255,255,255,.14);
  --border2:rgba(255,255,255,.10);

  --shadow: 0 22px 70px rgba(0,0,0,.45);
  --shadow2: 0 10px 28px rgba(0,0,0,.30);

  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 12px;

  --pad: 18px;

  --blue:#0a84ff;          /* iOS blue */
  --teal:#34d399;          /* mint */
  --pink:#ff2d55;          /* iOS pink */
  --orange:#ff9f0a;        /* iOS orange */

  --focus: 0 0 0 4px rgba(10,132,255,.28);
}

/* Better defaults */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "SF Pro Display", "SF Pro Text",
               Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  letter-spacing: .1px;

  /* macOS-ish deep gradient */
  background:
    radial-gradient(1100px 700px at 75% -10%, rgba(10,132,255,.35), transparent 60%),
    radial-gradient(900px 650px at 20% 0%, rgba(52,211,153,.20), transparent 60%),
    radial-gradient(800px 600px at 45% 105%, rgba(255,45,85,.18), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

/* Layout */
.wrap{
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 16px 44px;
}

.hero{
  margin-bottom: 16px;
}
.hero h1{
  margin: 0 0 8px;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 760;
  line-height: 1.15;
}
.hero p{
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

/* Main card */
.card{
  position: relative;
  border-radius: var(--radius-xl);
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}

/* subtle noise */
.card::before{
  content:"";
  position:absolute;
  inset:-2px;
  pointer-events:none;
  opacity:.12;
  background-image:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,.14), transparent 38%),
    radial-gradient(circle at 80% 0%, rgba(10,132,255,.12), transparent 42%),
    radial-gradient(circle at 30% 95%, rgba(52,211,153,.10), transparent 42%);
}

/* Dropzone */
.dropzone{
  position: relative;
  border-radius: var(--radius-xl);
  padding: 18px;
  background: rgba(0,0,0,.22);
  border: 1px dashed rgba(255,255,255,.25);
  outline: none;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.dropzone:focus{ box-shadow: var(--focus); }
.dropzone:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.34);
  background: rgba(0,0,0,.26);
}
.dropzone.drag{
  border-style: solid;
  border-color: rgba(10,132,255,.65);
  background: rgba(10,132,255,.12);
  box-shadow: 0 0 0 4px rgba(10,132,255,.18);
}

.dz-inner{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap: 9px;
  position: relative;
  z-index: 1;
}
.dz-icon{
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display:grid;
  place-items:center;
  font-size: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: var(--shadow2);
}
.dz-title{
  font-size: 15px;
  font-weight: 700;
}
.dz-sub{
  color: var(--muted2);
  font-size: 12.5px;
}
.dz-hint{
  margin-top: 6px;
  color: var(--muted2);
  font-size: 12px;
  line-height: 1.55;
}

/* Controls row */
.controls{
  margin-top: 14px;
  display:flex;
  gap: 12px;
  align-items:center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.label{
  display:flex;
  gap: 10px;
  align-items:center;
  color: var(--muted);
  font-size: 13px;
}

.label input{
  width: 96px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border2);
  background: rgba(0,0,0,.25);
  color: var(--text);
  outline: none;
  transition: box-shadow .16s ease, border-color .16s ease;
}
.label input:focus{
  border-color: rgba(10,132,255,.55);
  box-shadow: var(--focus);
}

/* Buttons */
.btn{
  appearance:none;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
  font-size: 13.5px;
  font-weight: 650;
  text-decoration: none;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  user-select:none;
}
.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
}
.btn:active{
  transform: translateY(0px) scale(.99);
}
.btn:focus{
  outline:none;
  box-shadow: var(--focus);
}
.btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}

/* Primary (iOS-like gradient) */
.btn.primary{
  border-color: rgba(10,132,255,.45);
  background:
    linear-gradient(180deg, rgba(10,132,255,.95), rgba(10,132,255,.65));
  box-shadow:
    0 16px 34px rgba(10,132,255,.18),
    inset 0 1px 0 rgba(255,255,255,.22);
}
.btn.primary:hover{
  background:
    linear-gradient(180deg, rgba(10,132,255,1), rgba(10,132,255,.72));
}

/* Lists / items */
.list{
  margin-top: 14px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.item{
  border-radius: var(--radius-lg);
  padding: 12px 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 22px rgba(0,0,0,.22);
  display:grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}
.name{
  font-size: 13.8px;
  font-weight: 680;
  word-break: break-word;
}
.meta{
  color: var(--muted);
  font-size: 12.4px;
  line-height: 1.55;
  margin-top: 4px;
}

.badge{
  color: rgba(245,247,255,.72);
  font-size: 12px;
  font-weight: 650;
}

/* Progress */
.progress{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow:hidden;
  margin-top: 10px;
  border: 1px solid rgba(255,255,255,.08);
}
.bar{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(10,132,255,1), rgba(52,211,153,1));
  transition: width .12s ease;
}

/* Results panel */
.results{
  margin-top: 16px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.result{
  border-radius: var(--radius-xl);
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow2);
}
.row{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  align-items:center;
  justify-content: space-between;
}
.result a{
  color: rgba(184,210,255,1);
  text-decoration:none;
}
.result a:hover{
  text-decoration: underline;
}

/* Footer */
.foot{
  margin-top: 14px;
  color: var(--muted2);
  font-size: 12px;
}

/* Small-screen polish */
@media (max-width: 560px){
  .card{ padding: 14px; }
  .dropzone{ padding: 16px; }
  .item{ grid-template-columns: 1fr; }
  .row{ justify-content:flex-start; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; }
}


select.select{
  width: 150px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border2);
  background: rgba(0,0,0,.25);
  color: var(--text);
  outline: none;
  appearance: none;
  cursor: pointer;

  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,.6) 50%),
    linear-gradient(135deg, rgba(255,255,255,.6) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
select.select:focus{
  border-color: rgba(10,132,255,.55);
  box-shadow: var(--focus);
}


/* =========================
   ADMIN (scoped)
   ========================= */
body.admin {
  direction: rtl;
}

.admin .admin-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 18px;
}

.admin .admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

/* کارت‌ها */
.admin .admin-card {
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(10px);
}

/* لینک کارت */
.admin .admin-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* تایپو */
.admin .admin-title {
  font-size: 22px;
  margin: 0 0 14px;
}

.admin .admin-muted {
  opacity: .7;
}

/* فرم */
.admin .admin-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.admin .admin-label {
  font-size: 13px;
  opacity: .8;
}

.admin .admin-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.16);
  outline: none;
}

.admin .admin-input:focus {
  border-color: rgba(0,0,0,.35);
}

/* دکمه */
.admin .admin-btn {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.14);
  background: #111;
  color: #fff;
  cursor: pointer;
}

/* لینک خروج */
.admin .admin-link {
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
}

/* alert */
.admin .admin-alert {
  border: 1px solid rgba(176,0,32,.35);
  background: rgba(176,0,32,.06);
  color: #b00020;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
}

/* grid */
.admin .admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

