@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&display=swap');

:root {
  --primary: #1e40af;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-dark: #1e3a5f;
  --accent: #0284c7;
  --bg-primary: #f8fafc;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --danger: #ef4444;
  --border: #e2e8f0;
  --radius: 14px;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Almarai', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  direction: rtl;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 16px;
}

.app-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand-header {
  text-align: center;
  padding: 10px 0 0 0;
}

.brand-logo {
  width: 140px;
  height: auto;
  max-height: 90px;
  object-fit: contain;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.brand-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-box {
  background-color: var(--primary-light);
  border-right: 4px solid var(--primary);
  padding: 14px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-label {
  color: var(--text-secondary);
}

.info-val {
  font-weight: 700;
  color: var(--primary-dark);
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.2s ease;
  outline: none;
  background: #f8fafc;
}

.form-control:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
}

.btn {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}

.btn-primary:active {
  transform: translateY(1px);
  background-color: var(--primary-hover);
}

.btn-success {
  background-color: var(--success);
  color: white;
}

.btn-outline {
  background-color: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-primary);
}

/* OTP Input Boxes */
.otp-container {
  display: flex;
  gap: 12px;
  justify-content: center;
  direction: ltr;
  margin: 20px 0;
}

.otp-input {
  width: 54px;
  height: 60px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}

.otp-input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.15);
}

/* Modal Signature Canvas */
.signature-canvas-wrapper {
  border: 2px dashed var(--primary);
  border-radius: 12px;
  background: #ffffff;
  touch-action: none;
  margin-bottom: 14px;
  overflow: hidden;
  position: relative;
}

canvas.signature-pad {
  width: 100%;
  height: 220px;
  display: block;
  cursor: crosshair;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.alert-danger {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.footer-credits {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
  padding: 16px 0;
}
