:root {
  --primary: #1976d2;
  --secondary: #bbdefb;
  --primary-dark: #0d47a1;
  --danger: #e74c3c;
  --info: #3498db;
  --light: #f8f9fa;
  --dark: #2c3e50;
  --gray: #6c757d;
  --border: #dee2e6;
  --success: #d4edda;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
@font-face {
  font-family: "Vazir";
  src: url("/assets/fonts/Vazir.eot");
  src: local("/assets/fonts/Vazir"),
    url("/assets/fonts/Vazir.woff") format("woff"),
    url("/assets/fonts/Vazir.ttf") format("truetype");
}
body {
  font-family: "Vazir" !important;
  background: linear-gradient(315deg, #e9e9e9 0%, #ffffff 100%);
  min-height: 100vh;
  padding: 20px;
  color: var(--dark);
  line-height: 1.7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  max-width: 750px;
  width: 100%;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header {
  background: var(--secondary);
  color: var(--primary);
  padding: 30px 25px;
  text-align: center;
}

.header h1 {
  font-size: 1.6rem;
  margin: 0;
  font-weight: 700;
}
.header p {
  font-size: 0.95rem;
  margin-top: 8px;
  opacity: 0.9;
}

.form-container {
  padding: 30px 25px;
  background: #fff;
}

.input-group {
  margin-bottom: 24px;
}
.input-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
  color: var(--dark);
  font-size: 1.05rem;
}

.input-combo {
  display: flex;
  align-items: stretch;
  border: 2px solid #e0e0e0;
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s ease;
  background: #f8f9fa;
  position: relative;
  min-height: 58px;
}

.input-combo:focus-within {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgb(39 99 174 / 30%);
}

.prefix {
  background: var(--primary);
  color: white;
  padding: 0 20px;
  display: flex;
  align-items: center;
  font-weight: bold;
  font-size: 1.1rem;
  white-space: nowrap;
  order: 1;
}

.input-field {
  flex: 1;
  padding: 16px 50px 16px 16px;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  direction: ltr;
  text-align: left;
  outline: none;
}

.input-field::placeholder {
  color: #aaa;
}

.clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: #ddd;
  color: #666;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

.clear-btn:hover {
  background: #ccc;
}

button[type="submit"] {
  font-family: "Vazir" !important;
  background: var(--primary);
  color: white;
  border: none;
  padding: 16px;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgb(39 99 174 / 30%);
  margin-top: 10px;
}

button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgb(39 99 174 / 30%);
}

.alert {
  padding: 16px;
  border-radius: 12px;
  margin: 20px 0;
  font-weight: bold;
  text-align: center;
  font-size: 1rem;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.error {
  background: #fdf2f2;
  color: var(--danger);
  border: 1px solid #f5c6cb;
}
.success {
  background: var(--success);
  color: #155724;
  border: 1px solid #c3e6cb;
}

/* رنگ‌های وضعیت سفارش */
.status-pending {
  background-color: #ffc107 !important;
  color: #000 !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: bold;
  display: inline-block;
}
.status-shipped {
  background-color: #17a2b8 !important;
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: bold;
  display: inline-block;
}
.status-completed {
  background-color: #28a745 !important;
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: bold;
  display: inline-block;
}

.order-details {
  display: none;
  background: var(--light);
  padding: 30px 25px;
  border-top: 1px solid var(--border);
}

.order-details h3 {
  color: var(--primary);
  font-size: 1.4rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary);
}

.info-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 25px;
}
.info-item {
  background: white;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.info-item strong {
  color: var(--primary);
  display: block;
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.info-item span {
  color: var(--dark);
  font-weight: 500;
}

.tracking-code {
  background: #fffbe6;
  border: 2px solid #facc15;
  color: #164194;
  padding: 8px 16px;
  border-radius: 10px;
  font-family: monospace;
  font-weight: bold;
  font-size: 1.2rem;
  display: inline-block;
  margin-top: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.tracking-code:hover {
  background: #164194;
  color: #facc15;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 251, 230, 0.3);
}

.items {
  list-style: none;
  padding: 0;
  margin: 25px 0;
}
.items li {
  background: white;
  padding: 18px;
  margin: 12px 0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s;
}

.items li:hover {
  transform: translateY(-3px);
}
.items img {
  height: 85px;
  object-fit: cover;
}

.item-info h4 {
  margin: 0 0 8px;
  color: var(--dark);
  font-size: 1.1rem;
}
.item-info p {
  margin: 4px 0;
  color: var(--gray);
  font-size: 0.95rem;
}
.item-info a {
  color: var(--info);
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
}
.item-info a:hover {
  text-decoration: underline;
}

/* --- موبایل: کنار هم --- */
@media (max-width: 480px) {
  body {
    padding: 0;
    align-items: stretch;
  }
  .container {
    border-radius: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  .header {
    padding: 25px 20px;
  }
  .header h1 {
    font-size: 1.4rem;
  }
  .form-container,
  .order-details {
    padding: 25px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .input-combo {
    flex-direction: row !important;
    flex-wrap: nowrap;
    min-height: 54px;
    position: relative;
  }

  .prefix {
    padding: 0 14px;
    font-size: 1rem;
    min-width: 60px;
    order: 1;
  }

  .input-field {
    padding: 14px 48px 14px 12px;
    font-size: 1rem;
    text-align: left;
  }

  .clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    font-size: 16px;
    margin: 0;
  }

  .items li {
    flex-direction: column;
    text-align: center;
  }
  .items img {
    width: 100px;
    height: 100px;
  }
}
