* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f0f0f0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.header {
  background-color: #003259;
  color: white;
  margin-bottom: 20px;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  padding: 20px;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: bold;
}

.logo img {
  width: 120px;
  height: auto;
  margin-left: 10px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-email {
  font-size: 14px;
}

.header-exit {
  font-size: 14px;
  cursor: pointer;
  color: #e0ffff;
  text-decoration: none;
}

.header-exit:hover {
  text-decoration: underline;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  background-color: white;
  position: relative;
  width: 100vw;
  overflow-x: hidden;
}
.content-container {
  width: 100%;
  max-width: 1200px;
  background-color: white;
  border-radius: 5px;
  margin-bottom: 20px;
  padding: 20px;
}

.visa-info {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 30px;
  padding: 20px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(70, 130, 180, 0.12) 0%,
    rgba(70, 130, 180, 0.06) 100%
  );
  border: 1px solid rgba(70, 130, 180, 0.2);
}

.visa-info-card {
  flex: 0 1 auto;
  min-width: min(160px, 100%);
  padding: 16px 18px;
  background: white;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.visa-info-label {
  font-size: 11px;
  font-weight: 600;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  line-height: 1.3;
}

.visa-info-value {
  font-size: 15px;
  font-weight: 500;
  margin-top: 2px;
  color: #1a202c;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.visa-info-date-input {
  min-height: 20px;
  height: 42px;
  padding: 10px 12px;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

.visa-info-date-input:focus {
  outline: none;
  border-color: #4682b4;
  box-shadow: 0 0 0 3px rgba(70, 130, 180, 0.15);
}

.visa-info-lock {
  margin-left: auto;
  align-self: center;
  flex-shrink: 0;
  order: 999;
}

.visa-info .top-content {
  flex: 0 1 auto;
  min-width: min(160px, 100%);
  max-width: none;
}

.payment-info {
  margin-bottom: 30px;
}

.applicant-info {
  margin-bottom: 30px;
  width: 100%;
}

.applicant-details {
  width: 100%;
}

/* First applicant card: photo + content */
.applicant-card--first {
  padding: 0;
  overflow: hidden;
}

.applicant-card-inner {
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  padding: 4px;
}

.applicant-card-photo {
  flex-shrink: 0;
  width: clamp(120px, 20vw, 200px);
  height: clamp(120px, 20vw, 200px);
  min-width: 120px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  /* border: 1px solid rgba(0, 0, 0, 0.08); */
  background: #f8fafc;
  /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); */
}

.applicant-card-photo .photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.applicant-card-content {
  flex: 1;
  min-width: 0;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Standalone photo-upload (if used elsewhere) */
.photo-upload {
  width: clamp(120px, 20vw, 200px);
  height: clamp(120px, 20vw, 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  /* border: 2px solid rgba(0, 0, 0, 0.08); */
  background: #fff;
}

.photo-upload input[type="file"] {
  display: none;
}

.photo-upload:hover {
  border-color: rgba(70, 130, 180, 0.35);
}

.photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  margin-bottom: 30px;
  font-family: inherit;
}

.status-table tbody tr {
  background: linear-gradient(
    135deg,
    rgba(70, 130, 180, 0.1) 0%,
    rgba(70, 130, 180, 0.05) 100%
  );
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.status-table td {
  padding: 16px 20px;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: #1a202c;
  line-height: 1.45;
  letter-spacing: 0.01em;
  vertical-align: middle;
}

.status-table td:first-child {
  border-radius: 12px;
  border-right: none;
}

.status-table td:last-child {
  border-radius: 0 12px 12px 0;
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

.status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  color: #059669;
  background: rgba(5, 150, 105, 0.12);
  letter-spacing: 0.02em;
}

.status-icon.red {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
}

.footer {
  width: 100%;
  background-color: #0f2744;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.footer-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 32px;
}

.footer-top {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-top p {
  margin: 0 0 10px 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.footer-top p:last-child {
  margin-bottom: 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-left {
  flex: 1;
  min-width: 200px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-left li {
  margin: 0 0 12px 0;
  padding: 0;
}

.footer-left li:last-of-type {
  margin-bottom: 20px;
}

.footer-left a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.footer-left a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-left p {
  margin: 0 0 8px 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}

.footer-left p:last-child {
  margin-bottom: 0;
}

.footer-right {
  text-align: right;
  min-width: 220px;
}

.footer-right p {
  margin: 0 0 14px 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.footer-right p:last-child {
  margin-bottom: 0;
}

.footer-right #footerEmail {
  margin-top: 4px;
}

.footer-certification {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-certification p {
  margin: 0;
}

.footer-certification a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.footer-certification a:hover {
  color: #fff;
  text-decoration: underline;
}

.certifications {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.certification-badge {
  width: 80px;
  height: 80px;
  background-color: #003366;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  text-align: center;
}

.additional-info {
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.additional-info ul {
  list-style-type: none;
  padding: 0;
}

.additional-info li {
  margin-bottom: 5px;
}

.logo {
  height: 50px;
  background-color: #003259;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
}

.footer-image {
  width: 200px;
  height: 200px;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ccc;
  margin-left: 20px;
}

a {
  color: #e0ffff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.hidden {
  display: none;
}

.highlighted-row {
  background-color: rgba(178, 34, 34, 0.3);
  /* Прозрачный фон с цветом #B22222 */
}

.highlighted-row-green {
  background-color: rgba(152, 251, 152, 0.3);
  /* Прозрачный фон с цветом #98FB98 */
}

.visa-info-highlight {
  background: linear-gradient(
    135deg,
    rgba(70, 130, 180, 0.18) 0%,
    rgba(70, 130, 180, 0.08) 100%
  );
  border-color: rgba(70, 130, 180, 0.25);
}

.status-table .biometric-done {
  background: linear-gradient(
    135deg,
    rgba(5, 150, 105, 0.08) 0%,
    rgba(5, 150, 105, 0.04) 100%
  );
  border-color: rgba(5, 150, 105, 0.15);
}

.status-table .application-transferred {
  background: linear-gradient(
    135deg,
    rgba(220, 38, 38, 0.06) 0%,
    rgba(220, 38, 38, 0.03) 100%
  );
  border-color: rgba(220, 38, 38, 0.12);
}

.underline {
  text-decoration: underline;
}

#photoPreview {
  width: 200px;

  object-fit: contain;
}

.section-border {
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 20px 22px;
  margin-bottom: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  background: linear-gradient(
    135deg,
    rgba(70, 130, 180, 0.12) 0%,
    rgba(70, 130, 180, 0.06) 100%
  );
}

.section-border span,
.section-border div {
  font-size: 15px;
  font-weight: 500;
  color: #1a202c;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.bank-replenishment {
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 20px 22px;
  margin-bottom: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  background: linear-gradient(
    135deg,
    rgba(70, 130, 180, 0.12) 0%,
    rgba(70, 130, 180, 0.06) 100%
  );
}

.bank-replenishment h3 {
  color: #1a202c;
  font-weight: 600;
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.bank-replenishment p,
.bank-replenishment span,
.bank-replenishment div {
  margin: 8px 0;
  font-size: 15px;
  font-weight: 500;
  color: #2d3748;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

body {
  display: flex;
  width: 100vw;
  height: 100vh;
  justify-content: center;
  align-items: center;
}

.login-form {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  width: 300px;
}

.login-form h2 {
  margin-top: 0;
  color: #003259;
  text-align: center;
}

.login-form input[type="email"],
.login-form input[type="password"] {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.login-form button {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 5px;
  background-color: #003259;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.login-form button:hover {
  background-color: #004080;
}

.login-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  padding: 24px;
  overflow: hidden;
}

.login-wrapper::before {
  content: "";
  position: fixed;
  inset: 0;
  background: #e5e5e5;
  z-index: 0;
}

.login-wrapper::after {
  content: "";
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 1;
}

.login-wrapper .login-container {
  position: relative;
  z-index: 2;
}

.login-container {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.login-header {
  padding: 24px 24px 16px;
  text-align: center;
  background-color: #003359;
  color: #fff;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 6px;
}

.login-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.login-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.login-subtitle {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.03em;
}

.login-body {
  padding: 20px 24px 24px;
}

.login-intro {
  margin: 0 0 16px 0;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  line-height: 1.4;
}

.login-form-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.login-container .form-group {
  margin-bottom: 14px;
}

.login-container .form-group:last-of-type {
  margin-bottom: 12px;
}

.login-container .form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  letter-spacing: 0.01em;
}

.login-container .form-group input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  box-sizing: border-box;
  background: #fff;
  color: #1a202c;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-container .form-group input::placeholder {
  color: #94a3b8;
}

.login-container .form-group input:focus {
  outline: none;
  border-color: #1e3a5f;
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
}

.login-container .captcha-container {
  margin: 12px 0 18px 0;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(70, 130, 180, 0.06) 0%, rgba(70, 130, 180, 0.03) 100%);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.captcha-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
}

.captcha-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #1e3a5f;
}

.login-container .sign-in-button {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background-color: #003359;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: opacity 0.2s ease, transform 0.02s ease;
}

.login-container .sign-in-button:hover {
  opacity: 0.95;
}

.login-container .sign-in-button:active {
  transform: scale(0.99);
}

.login-footer {
  padding: 14px 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #f8fafc;
}

.login-copyright {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  text-align: center;
  line-height: 1.4;
}

/* Legacy form-group/captcha/button when used outside login (e.g. other forms) */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #333;
}

.form-group input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

.captcha-container {
  margin: 1rem 0;
  padding: 1rem;
  background-color: #f5f5f5;
  border-radius: 4px;
}

.sign-in-button {
  width: 100%;
  padding: 0.75rem;
  background-color: #1023d1;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.sign-in-button:hover {
  background-color: #1023d1;
}

.footer-links {
  margin-top: 1rem;
  text-align: center;
}

.footer-links a {
  color: #464a4e;
  text-decoration: none;
  margin: 0 0.5rem;
}

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

.top-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 1;
  min-width: 20%;
  max-width: 165px;
}

.w100 {
  width: 100%;
}
.time-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 165px;
}

.time-trigger {
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  background: #fff;
  font-size: 14px;
  min-height: 20px;
  height: 42px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 4px;
}

.time-popup {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: white;
  border: 1px solid #ccc;
  padding: 12px;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
  width: 400px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.time-option {
  background-color: #e3f2fd;
  border-radius: 20px;
  padding: 6px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  user-select: none;
}

.time-option.selected {
  background-color: #42a5f5;
  color: white;
  font-weight: bold;
}

.selected-pill {
  background-color: #90caf9;
  border-radius: 14px;
  padding: 4px 10px;
  font-size: 13px;
}

.time-selected {
  font-size: 0.9em;
  margin-top: 10px;
  max-width: 600px;
}

#multiDatePicker ::placeholder {
  color: black;
}
.lock-button {
  background-color: rgb(192, 0, 0);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
}
.lock-button img {
  width: 24px;
  height: 24px;
}

.locked {
  background-color: rgb(192, 0, 0);
}

.unlocked {
  background-color: rgb(0, 192, 0);
}
.submit-date {
  width: 100%;
  display: none;
  color: white;
  font-size: 14px;
  justify-content: center;
  font-style: bold;
  align-items: center;
  cursor: pointer;
  background-color: rgb(2, 120, 216);
  border-radius: 4px;
  height: 40px;
}

.thx-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 9999;
}

.thx-popup-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.thx-popup-content {
  background-color: #fff;
  padding: 40px 60px;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  font-size: 24px;

  color: #333;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 20px;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  max-width: 90%;
}

/* Scale up when visible */
.thx-popup-overlay.show .thx-popup-content {
  transform: scale(1);
}

.thx-popup-content img {
  width: 60px;
  height: 60px;
}
.thx-popup-content a {
  align-self: center;
}
.popup-text {
  font-size: 18px;
}

.popup-close {
  position: absolute;
  top: 24px;
  right: 16px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.popup-close img {
  width: 24px;
  height: 24px;
}

.file-button {
  height: 40px;
  padding: 0px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background-color: #004080;
  border-radius: 4px;
  cursor: pointer;
  max-width: 200px;
  transition: transform 0.3s ease;
  color: white;
  font-size: 18px;
}
.file-button img {
  width: 24px;
  height: 24px;
}

.file-button:hover {
  transform: scale(0.98);
}

.invoice {
  /* opacity: 0.6; */
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70vw;
  overflow: scroll;
  height: 80vh;
  overflow-x: hidden;
  padding-right: 20px;
}
.invoice-header {
  align-self: flex-end;
  font-size: 24px;
  margin-bottom: 12px;
  font-family: Arial, Helvetica, sans-serif;
}

.invoice-subheader {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 32px;
}

.invoice-header-img {
  display: flex;
  gap: 30px;
}

.invoice-subheader img {
  width: 30vw;
  height: auto;
  object-fit: contain;
}

.invoice p {
  font-size: 14px;
}

.invoice-number {
  align-self: flex-end;
}

.invoice-org {
  width: 300px;
  font-size: 16px;
  height: 100%;
  line-height: 30px;
  font-family: Arial, Helvetica, sans-serif;
  border: none;
  resize: none;
}

.double-line {
  height: 1px;
  border-top: 1px solid black;
  width: 100%;
}
.double-line {
  margin-top: 2px;
}

.invoice-top {
  display: flex;

  width: 100%;
  margin-top: 32px;
}
.invoice-top-left {
  flex: 1;
  display: flex;
  gap: 30px;
}
.invoice-top-left p {
  width: fit-content;
  margin: 0;
  white-space: nowrap;
  font-size: 14px;
}

.invoice-top-left-double {
  display: flex;
  gap: 8px;
  width: 100%;
}

.invoice-top-left-double textarea {
  flex: 1;
  font-size: 16px;
  line-height: 30px;
  height: 70px;
  font-family: Arial, Helvetica, sans-serif;
  resize: none;
  border: none;

  padding: 0;
}

.invoice-top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;

  width: 50%;
  gap: 16px;
}

.invoice-top-right p {
  margin: 0;
}

.invoice-top-right-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  width: 100%;
}

.invoice-top-right-row p:first-child {
  font-size: 14px;
  width: 100%;
  text-align: right;
}
.invoice-top-right-row p:last-child {
  width: 30%;
  text-align: left;
}

.invoice-top-right-row {
  font-size: 12px;
}

.invoice-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  justify-content: space-between;
}

.invoice-list-header {
  height: 30px;
  width: 99%;
  background-color: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;

  border: 1px solid black;
  border-right: none;
  gap: 1%;
}

.invoice-list-header-item {
  color: black;
  font-size: 14px;

  display: flex;
  align-items: center;
  width: 22%;
  font-weight: bold;
  border-right: 1px solid black;
  height: 100%;
}

.invoice-list-header-item-first {
  width: 34%;

  padding-left: 8px;
  justify-content: flex-start;
  border-right: 1px solid black;
  height: 100%;
}

.invoice-list-item {
  display: flex;
  align-items: center;
  width: 100%;
  height: 30px;
  gap: 1%;

  border-bottom: 1px solid black;
}

.invoice-list-item-value {
  width: 22%;
  border-right: 1px solid black;
  height: 100%;
  display: flex;
  align-items: center;
}

.invoice-list-item-value input {
  text-align: center;
}

.invoice-list-item input {
  width: 100%;
}
.invoice-list-item-value-first {
  width: 34%;
  padding-left: 8px;
  height: 100%;
  border-right: 1px solid black;
  border-left: 1px solid black;
  justify-content: flex-start;
}
.invoice-list-item-value-first input {
  text-align: left;
}
.invoice-list-item-value-first input {
  width: 100%;
}

.invoice-list-item-delete {
  display: flex;
  justify-content: center;
  align-items: center;
  color: red;
  cursor: pointer;
  font-size: 14px;
  width: 10%;
}

.invoice-list-content {
  width: calc(99% + 1px);
  display: flex;
  flex-direction: column;

  justify-content: center;
}
.invoice-list-button {
  cursor: pointer;
  height: 36px;
  padding: 0px 16px;
  border-radius: 4px;
  border: 1px solid #4caf50;
  color: #4caf50;
  display: flex;
  font-size: 14px;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
}

.invoice-details-wrapper {
  display: flex;
  width: 100%;
  justify-content: flex-end;
  margin-top: 16px;
}

.invoice-details {
  display: none;
  flex-direction: column;
  width: 60%;
}
.invoice-details p {
  font-size: 13px;
  width: fit-content;
  margin: 0;
  margin-bottom: 8px;
}

.invoice-details-textarea {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  border: none;
  resize: none;
  height: fit-content;
  line-height: 20px;
}

.invoice-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 30%;
  gap: 16px;
}

.invoice-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 14px;
  padding-bottom: 4px;
  margin-right: 1%;
  border-bottom: 1px solid black;
}
.invoice-total-row p {
  margin: 0;
}
.invoice-total-row p:nth-child(1) {
  font-weight: bold;
}
.tax {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tax-input {
  width: 70px;
  text-align: center;
}

.clear-tax {
  height: 30px;
  width: 30px;
  background-color: #003366;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border-radius: 8px;
}

.invoice-amount-input {
  padding-left: 8px;
  width: 80px;
}

.invoice-total-add-button {
  color: #4caf50;
  cursor: pointer;
  font-weight: bold;
  margin: 12px 0px;
}
.invoice-terms-textarea {
  align-self: flex-start;
  resize: none;
  width: 60%;
  text-align: left;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  border: none;
  line-height: 20px;
}

.invoice-terms {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  margin-top: 40px;
}

.invoice-terms p {
  margin-bottom: 4px;
  font-size: 13px;
}

.invoice-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}
.invoice-checkbox input {
  height: 20px;
  width: 20px;
}

@media (max-width: 768px) {
  .content-container {
    padding: 20px 16px;
  }

  .applicant-info {
    margin-bottom: 24px;
  }

  .applicant-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;

  }

  .applicant-card-inner {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
    padding: 4px;
  }

  .applicant-card-photo {
    width: clamp(100px, 40vw, 160px);
    height: clamp(100px, 40vw, 160px);
    min-width: 100px;
    min-height: 100px;
  }

  .applicant-card-content {
    width: 100%;
    min-height: 0;
  }

  .visa-info {
    gap: 12px;
    padding: 20px 16px;
  }

  .visa-info-card {
    min-width: min(140px, 100%);
  }

  .visa-info-lock {
    margin-left: auto;
  }

  .payment-info {

  }

  .payment-info .bank-replenishment {
    margin-left: 0;
    margin-right: 0;
  }

  .status-table {
  }

  .section-border {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .footer-content {
    padding: 28px 20px 24px;
  }

  .footer-top {
    margin-bottom: 24px;
    padding-bottom: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 28px;
  }

  .footer-left,
  .footer-right {
    min-width: 0;
  }

  .footer-right {
    text-align: left;
  }

  .footer-certification {
    margin-top: 24px;
    padding-top: 20px;
  }

  .login-container {
    width: 90%;
  }

  /* .invoice-list-header-item {
    width: 16%;
  }
  .invoice-list-header-item-first {
    width: 44.45%;
  }
  .invoice-list-item-value {
    width: 17.9%;
  }
  .invoice-list-item-value-first {
    width: 45.3%;
  } */
  .thx-popup-content {
    max-width: 95%;
    padding: 40px 20px;
  }
  .invoice {
    width: 90vw;
  }
  .invoice-subheader img {
    left: 5px;
  }
}

.chat-wrapper {
  position: fixed;
  bottom: 24px;
  right: 32px;
  display: none;
  justify-content: center;
  align-items: flex-end;
  flex-direction: column;
  z-index: 1000;
}

.chat {
  height: 520px;
  width: 380px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  display: none;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease, transform 0.25s ease;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%);
  color: #fff;
  border-radius: 16px 16px 0 0;
  min-height: 64px;
  flex-shrink: 0;
}

.chat-header-left {
  display: flex;
  gap: 12px;
  align-items: center;
}

.chat-header-left-image {
  height: 44px;
  width: 44px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  position: relative;
  flex-shrink: 0;
}

.chat-header-left-image img {
  height: 26px;
  width: 26px;
  opacity: 0.95;
}

.chat-header-left-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-header-left-text-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
}

.chat-header-left-text-status {
  font-size: 12px;
  font-weight: 500;
  color: rgba(74, 222, 128, 0.95);
  letter-spacing: 0.02em;
}

.chat-header-right {
  cursor: pointer;
  height: 36px;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.chat-header-right:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(0.95);
}

.chat-header-right img {
  height: 20px;
  width: 20px;
}

.chat-header-left-image-status {
  position: absolute;
  bottom: 2px;
  right: 2px;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  background: #4ade80;
  border: 2px solid #1e3a5f;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.chat-button {
  height: 56px;
  width: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 16px rgba(30, 58, 95, 0.35);
}

.chat-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.4);
}

.chat-button:active {
  transform: scale(0.98);
}

.chat-button img {
  height: 28px;
  width: 28px;
}

.chat-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
  padding: 16px;
  position: relative;
  gap: 10px;
  min-height: 0;
}

.chat-list::-webkit-scrollbar {
  width: 6px;
}

.chat-list::-webkit-scrollbar-track {
  background: transparent;
}

.chat-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

.chat-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  text-align: center;
  line-height: 1.5;
  letter-spacing: 0.01em;
  padding: 0 20px;
  display: none;
}

.chat-input {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 12px 16px 16px;
  gap: 10px;
  background: rgba(255, 255, 255, 0.8);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0 0 16px 16px;
  flex-shrink: 0;
}

.chat-input textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #1a202c;
  padding: 10px 14px;
  border-radius: 12px;
  resize: none;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0.01em;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-input textarea::placeholder {
  color: #94a3b8;
}

.chat-input textarea:focus {
  outline: none;
  border-color: rgba(30, 58, 95, 0.4);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.chat-input-button {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  height: 44px;
  width: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-input-button:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 12px rgba(30, 58, 95, 0.3);
}

.chat-input-button:active {
  transform: scale(0.96);
}

.chat-input-button img {
  height: 22px;
  width: 22px;
}

.chat-list-message {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  max-width: 82%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding: 12px 14px 28px 14px;
  color: #fff;
  border-radius: 14px 14px 14px 4px;
  width: fit-content;
  position: relative;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.chat-list-message p,
.chat-list-message .message-content {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.chat-list-message-operator {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  border-radius: 14px 14px 14px 4px;
  align-self: flex-start;
}

.chat-list-message-user {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%);
  border-radius: 14px 4px 14px 14px;
  align-self: flex-end;
  box-shadow: 0 1px 4px rgba(15, 39, 68, 0.2);
}

.chat-list-message-date {
  font-size: 11px;
  font-weight: 500;
  position: absolute;
  bottom: 8px;
  right: 14px;
  color: rgba(255, 255, 255, 0.75);
  align-self: flex-end;
  letter-spacing: 0.02em;
}

.hide {
  display: none;
}

.status {
  width: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  height: 80px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
}

.status-error {
  background-color: #9c04044f;
  border: 1px solid #ff0000;
  color: #ff0000;
}

.status-success {
  background-color: #4caf4f70;
  border: 1px solid #4caf50;
  color: #4caf50;
}

.chat-list-date-separator {
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  margin: 12px 0 4px;
  padding: 6px 12px;
  letter-spacing: 0.02em;
}

.chat-list-date-separator p {
  margin: 0;
}

button img {
  width: 20px;
  height: 20px;
}

button:hover img {
  opacity: 0.8;
}

.edit-controls {
  display: none;
  align-items: center;
}

.edit-controls input {
  margin-right: 10px;
  padding: 5px;
}

.confirm-edit,
.cancel-edit {
  padding: 5px;
  cursor: pointer;
  background-color: #28a745;
  color: white;
  border: none;
}

.cancel-edit {
  background-color: #dc3545;
}

.edit-input {
  width: 100%;
  margin-bottom: 8px;
  height: 100px;
}
.edit-btn,
.delete-btn {
  padding: 0px;
}

#selectedImagePreview {
  max-width: 50px;
  max-height: 100px;
  margin-right: 10px;
}

#imageModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#imageModalContent {
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

#modalImage {
  max-width: 80%;
  max-height: 80%;
}

#closeModalButton {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  height: 30px;
  width: 30px;
  z-index: 1001;
}

#closeModalButton img {
  width: 100%;
  height: 100%;
}

.add-image-button img {
  height: 32px;
  width: 32px;
  cursor: pointer;
}

#imagePreviewContainer {
  display: none;
}

#deleteImageButton {
  border: none;
  background-color: transparent;
  cursor: pointer;
}
