@import url('https://fonts.googleapis.com/css2?family=Frank+Ruhl+Libre:wght@400;500;700;900&family=Assistant:wght@400;500;600;700&display=swap');

:root {
  --paper: #F7F4EC;
  --ink: #23211C;
  --muted: #8A8578;
  --bronze: #A8763E;
  --teal: #1F3D3B;
  --line: #D8D2C4;
  --card: #FFFFFF;
  --danger: #8C3A2B;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Assistant', sans-serif;
  direction: rtl;
}

h1, h2, h3 { font-family: 'Frank Ruhl Libre', serif; margin: 0; }

a { color: var(--teal); }

.wrap { max-width: 640px; margin: 0 auto; padding: 32px 20px 80px; }
.wrap-narrow { max-width: 440px; margin: 0 auto; padding: 48px 20px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 640px; margin: 0 auto; padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.topbar a.brand { font-family: 'Frank Ruhl Libre', serif; font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--ink); }
.topbar form { margin: 0; }
.link-btn {
  background: none; border: none; color: var(--muted); font-family: 'Assistant', sans-serif;
  font-size: 0.9rem; cursor: pointer;
}

label { display: block; font-size: 0.9rem; margin-bottom: 6px; }
input, textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-family: 'Assistant', sans-serif; font-size: 1rem;
  margin-bottom: 16px;
}
textarea { resize: vertical; min-height: 80px; }
input[type="file"] { padding: 8px; }
input[type="checkbox"] { width: auto; margin-left: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 20px; border-radius: 8px; font-weight: 600; font-size: 1rem;
  border: 1px solid var(--teal); cursor: pointer; text-decoration: none; font-family: 'Assistant', sans-serif;
}
.btn-solid { background: var(--teal); color: var(--paper); }
.btn-outline { background: transparent; color: var(--teal); }
.btn-block { width: 100%; }
.btn-danger { border-color: var(--danger); color: var(--danger); background: none; padding: 6px 10px; font-size: 0.85rem; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 16px;
}

.seal {
  width: 56px; height: 56px; border-radius: 50%; border: 2px dashed var(--bronze);
  display: flex; align-items: center; justify-content: center; transform: rotate(-6deg); flex-shrink: 0;
}
.seal-inner {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--bronze);
  display: flex; align-items: center; justify-content: center; color: var(--bronze); font-size: 1.2rem;
}

.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tab {
  padding: 8px 14px; border-radius: 999px; font-size: 0.9rem; border: 1px solid var(--line);
  text-decoration: none; color: var(--muted);
}
.tab.active { background: var(--teal); border-color: var(--teal); color: var(--paper); }

.error-box {
  background: #FBEAEA; color: var(--danger); padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 0.9rem;
}
.success-box {
  background: #E9F1EB; color: var(--teal); padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 0.9rem;
}

.cred-item, .exp-item {
  display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid #EFEBDF;
}
.cred-item:last-child, .exp-item:last-child { border-bottom: none; }
.cred-type { font-size: 0.75rem; color: var(--bronze); margin-bottom: 2px; }
.cred-title, .exp-role { font-weight: 600; }
.cred-meta, .exp-meta { font-size: 0.85rem; color: var(--muted); }
.cred-desc, .exp-desc { font-size: 0.9rem; margin-top: 4px; color: #5c5850; }

.empty {
  text-align: center; padding: 32px 16px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); margin-bottom: 16px;
}

.mode-option {
  display: block; padding: 16px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 12px; cursor: pointer;
}
.mode-option input { width: auto; margin-left: 8px; margin-bottom: 0; }
.mode-option .title { font-weight: 600; }
.mode-option .desc { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }

.qr-box {
  display: flex; align-items: center; gap: 16px; background: var(--teal); color: var(--paper);
  padding: 20px; border-radius: 12px; margin-top: 20px;
}
.qr-box img { border-radius: 8px; background: #fff; padding: 6px; }
.qr-box .url { font-size: 0.85rem; word-break: break-all; opacity: 0.9; }

.type-picker { display: flex; gap: 8px; margin-bottom: 16px; }
.type-picker label {
  flex: 1; text-align: center; padding: 8px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 0.85rem; margin-bottom: 0; cursor: pointer;
}
.type-picker input { display: none; }
.type-picker input:checked + span { font-weight: 700; }

.footer-note { font-size: 0.8rem; color: var(--muted); text-align: center; margin-top: 24px; }
