*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
  overscroll-behavior-x: none;
  max-width: 100vw;
}

body {
  font-family: "Rubik", sans-serif;
  background-color: #f5f8fb;
  color: #0c3058;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  position: relative;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== loader ===== */
.header, .v-frame-root { display: none; }

noscript + #loader,
#loader:has(noscript) { display: flex !important; }

#loader {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 999999;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.noscript-message {
  color: #d32f2f;
  padding: 20px;
  font-size: 16px;
  font-weight: bold;
  direction: rtl;
}

.loader-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader-img { width: 36px; }

#loader p {
  margin: 4px 0;
  color: #333;
  font-size: 0.9rem;
}

/* ===== header ===== */
header {
  background-color: #0c3058;
  color: white;
  padding: 12px 20px;
  font-weight: 500;
  font-size: 1rem;
  display: flex;
  align-items: center;
  width: 100%;
  flex-shrink: 0;
}

header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

header .logo span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

header img {
  width: 32px;
  flex-shrink: 0;
}

/* ===== main layout ===== */
.main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px;
  width: 100%;
}

.container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.06);
  padding: 32px 28px;
  max-width: 480px;
  width: 100%;
  min-width: 0;
  text-align: center;
  overflow: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
}

.container > img {
  width: 80px;
  margin: 0 auto 16px;
}

/* ===== typography ===== */
h1 {
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: #0c3058;
  line-height: 1.4;
}

p {
  font-size: 0.95rem;
  margin-bottom: 12px;
  line-height: 1.6;
}

/* ===== form ===== */
.links {
  text-align: right;
  margin-bottom: 12px;
}

.links a {
  display: block;
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 3px;
  color: #1a5296;
}

.links a:hover { text-decoration: underline; }

form {
  text-align: right;
  width: 100%;
}

form a {
  display: block;
  font-size: 0.85rem;
  color: #1a5296;
  text-decoration: none;
  margin-top: 10px;
  overflow-wrap: break-word;
  word-break: break-word;
}

form a:hover { text-decoration: underline; }

.footer-text {
  margin-top: 16px;
  color: #555;
  font-size: 0.82rem;
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.5;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 10px;
  color: #0c3058;
  text-align: right;
}

input[type="text"],
input[type="tel"],
input[type="password"],
input[type="date"],
input[type="file"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 10px 12px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

input[type="date"] {
  -webkit-appearance: auto;
  appearance: auto;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus {
  outline: none;
  border-color: #0c3058;
}

button, .refund-btn {
  background-color: #0c3058;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 6px;
  width: 100%;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  margin-top: 12px;
  min-height: 46px;
  transition: background-color 0.2s;
  display: block;
}

button:hover, .refund-btn:hover { background-color: #0a2644; }

button:disabled {
  background-color: #9e9e9e !important;
  cursor: not-allowed;
  opacity: 0.7;
}

/* ===== validation ===== */
.error { border-color: #d32f2f !important; }

.error-msg {
  text-align: right;
  color: #d32f2f;
  font-size: 0.8rem;
  margin-top: 2px;
  display: block;
  min-height: 16px;
}

.success-msg {
  color: green;
  font-size: 0.88rem;
  margin-top: 4px;
}

/* ===== footer ===== */
.footer {
  background-color: #0c3058;
  color: white;
  text-align: center;
  padding: 12px 16px;
  font-size: 0.82rem;
  width: 100%;
  flex-shrink: 0;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  line-height: 2;
}

.foot-links a {
  color: white;
  margin: 0 6px;
  text-decoration: none;
  white-space: nowrap;
}

.foot-links a:hover { text-decoration: underline; }

/* ===== bank selector ===== */
.container--banks {
  max-width: 700px;
}

.bas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.bas a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #fff;
}

.bas a img {
  width: 100%;
  height: 80px;
  object-fit: contain;
  display: block;
}

.bas a span { display: none; }

/* ===== upload ===== */
.upload-section {
  border: 1px dashed #0c3058;
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
  text-align: center;
  background-color: #f8fbfe;
}

.upload-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.upload-buttons label {
  background-color: #0c3058;
  color: #fff;
  padding: 9px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  transition: background 0.2s;
}

.upload-buttons label:hover { background-color: #0a2644; }
.upload-buttons input { display: none; }

/* ===== mobile ===== */
@media (max-width: 480px) {
  header {
    padding: 10px 14px;
  }

  header img {
    width: 26px;
  }

  header .logo span {
    font-size: 0.88rem;
  }

  .main {
    padding: 12px 10px;
  }

  .container {
    padding: 20px 14px;
    border-radius: 8px;
    box-shadow: none;
  }

  .container > img {
    width: 60px;
    margin-bottom: 12px;
  }

  h1 {
    font-size: 1.05rem;
    margin-bottom: 12px;
  }

  label {
    margin-top: 8px;
    font-size: 0.88rem;
  }

  input[type="text"],
  input[type="tel"],
  input[type="password"],
  input[type="date"] {
    padding: 9px 10px;
    margin-top: 4px;
  }

  button, .refund-btn {
    padding: 11px 12px;
    margin-top: 10px;
    min-height: 44px;
  }

  .links {
    margin-bottom: 8px;
  }

  .links a {
    font-size: 0.82rem;
  }

  form a {
    font-size: 0.82rem;
    margin-top: 8px;
  }

  .footer-text {
    font-size: 0.78rem;
    margin-top: 12px;
  }

  .foot-links {
    font-size: 0.75rem;
  }

  .foot-links a {
    margin: 0 4px;
  }
}
