/* ================================================
   طرح رنگی: طلایی (اصلی) + فیروزه‌ای (کمکی)
   ================================================ */
:root {
  --golden-l: rgb(175, 130, 55);
  --golden-d: rgb(175, 130, 55);
  --bg-green: #43bb91;

  --bg-abi: rgb(0, 56, 159); /* طلایی تیره — دکمه‌ها */
  --bg-abi2: rgb(37, 54, 246); /* طلایی متوسط — hover */
  --bg-khak: #f7f8fa;
  --bg-khak2: #e5e7eb;
  --bg-sefid: #ffffff;
  --white: #ffffff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --green: #10b981;
  --red: #ef4444;
  --orange: #f59e0b;
  --shadow: 0 4px 16px rgba(175, 130, 55, 0.1);
  --shadow-lg: 0 10px 30px rgba(175, 130, 55, 0.18);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.2s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
  background: linear-gradient(135deg, #f7f8fa 0%, #eef2f7 100%);
  color: var(--text);
  direction: rtl;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  text-align: justify;
}

.container {
  max-width: 500px;
  margin: 40px auto;
  padding: 0 20px;
  width: 100%;
}
.container-wide {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
  width: 100%;
}

/* ============ Header ============ */
.header {
  background: linear-gradient(135deg, var(--golden-d) 0%, var(--golden-l) 100%);
  color: var(--white);
  padding: 16px 0;
  box-shadow: 0 4px 12px rgba(175, 130, 55, 0.2);
  border-bottom: 3px solid var(--turq);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
}
.header .user-info {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
}
.header .user-info button {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  transition: var(--transition);
}
.header .user-info button:hover {
  background: var(--turq);
  border-color: var(--turq);
}

/* ============ Card ============ */
.card {
  background: var(--bg-sefid);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-bottom: 20px;
  border-top: 4px solid var(--golden-l);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--golden-d),
    var(--golden-d)
  );
}
.card h2 {
  text-align: center;
  color: var(--golden-d);
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 700;
}
.card .subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ============ Form ============ */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}
input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--bg-khak2);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  transition: var(--transition);
  background: var(--bg-sefid);
  color: var(--text);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--turq);
  box-shadow: 0 0 0 4px rgba(0, 184, 182, 0.12);
}
input:disabled {
  background: var(--bg-khak);
  cursor: not-allowed;
}

input[type="text"].otp-input {
  text-align: center;
  font-size: 26px;
  letter-spacing: 12px;
  font-family: monospace;
  direction: ltr;
  font-weight: 700;
  color: var(--golden-d);
  padding-left: 20px;
}

/* ============ Button ============ */
button.btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--golden-d) 0%, var(--golden-l) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(175, 130, 55, 0.3);
  position: relative;
  overflow: hidden;
}
button.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(175, 130, 55, 0.4);
}
button.btn:active:not(:disabled) {
  transform: translateY(0);
}
button.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button.btn-secondary {
  background: linear-gradient(135deg, var(--turq) 0%, var(--turq2) 100%);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(0, 184, 182, 0.3);
}
button.btn-secondary:hover:not(:disabled) {
  box-shadow: 0 6px 18px rgba(0, 184, 182, 0.4);
}

button.btn-danger {
  background: linear-gradient(135deg, #dc2626, var(--red));
}
button.btn-danger:hover:not(:disabled) {
  background: #b91c1c;
}

button.btn-outline {
  background: transparent;
  color: var(--golden-d);
  border: 2px solid var(--golden-d);
  box-shadow: none;
}
button.btn-outline:hover:not(:disabled) {
  background: var(--golden-l);
  color: var(--white);
  transform: translateY(-1px);
}

button.link-btn {
  background: none;
  border: none;
  color: var(--turq);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  font-size: 14px;
  padding: 4px;
  font-weight: 600;
  transition: var(--transition);
  border-bottom: 1px dashed var(--turq);
}
button.link-btn:hover {
  color: var(--golden-d);
  border-bottom-color: var(--golden-d);
}

/* ============ Alert ============ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.6;
  border-right: 4px solid;
}
.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: var(--red);
}
.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border-color: var(--green);
}
.alert-info {
  background: #f0fdfa;
  color: #115e59;
  border-color: var(--turq);
}
.alert-warning {
  background: #fffbeb;
  color: #92400e;
  border-color: var(--orange);
}
.hidden {
  display: none !important;
}

/* ============ Spinner ============ */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============ Resend ============ */
.resend-section {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}
.resend-section button {
  margin-top: 4px;
}

/* ============ Dashboard ============ */
.welcome-box {
  background: linear-gradient(135deg, var(--golden-d) 0%, var(--golden-l) 100%);
  color: var(--white);
  padding: 28px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(175, 130, 55, 0.25);
  position: relative;
  overflow: hidden;
}
.welcome-box h2 {
  color: var(--white);
  text-align: right;
  margin-bottom: 6px;
  font-size: 22px;
}
.welcome-box p {
  opacity: 0.95;
  font-size: 14px;
}

/* ============ Menu ============ */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.menu-item {
  background: var(--bg-sefid);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
}
.menu-item::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 0;
  background: var(--turq);
  transition: var(--transition);
}
.menu-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--golden-l);
}
.menu-item:hover::before {
  height: 100%;
}
.menu-item .icon {
  font-size: 34px;
  margin-bottom: 10px;
}
.menu-item .label {
  font-size: 14px;
  font-weight: 700;
  color: var(--golden-d);
}

/* ============ Info List ============ */
.info-list {
  list-style: none;
}
.info-list li {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px dashed var(--bg-khak2);
  font-size: 14px;
}
.info-list li:last-child {
  border-bottom: none;
}
.info-list .label {
  color: var(--text-muted);
  font-weight: 500;
}
.info-list .value {
  font-weight: 700;
  color: var(--text);
}

/* ============ Badge ============ */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid;
}
.badge-pending {
  background: #fffbeb;
  color: #92400e;
  border-color: var(--golden-l);
}
.badge-confirmed {
  background: #f0fdfa;
  color: #115e59;
  border-color: var(--turq);
}
.badge-rejected {
  background: #fef2f2;
  color: #991b1b;
  border-color: var(--red);
}
.badge-cancelled {
  background: #f3f4f6;
  color: #374151;
  border-color: #d1d5db;
}

/* ============ Footer ============ */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: auto;
}

/* ============ Loading Overlay ============ */
.loading-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.loading-overlay .spinner {
  width: 40px;
  height: 40px;
  border-width: 4px;
  border-top-color: var(--golden-d);
}

/* ============ Responsive ============ */
@media (max-width: 480px) {
  .header h1 {
    font-size: 16px;
  }
  .welcome-box h2 {
    font-size: 18px;
  }
  .card {
    padding: 20px;
  }
}
