/* =========================
   GLOBAL RESET
========================= */

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

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: #f4f7fb;
  color: #1f2937;
}

/* =========================
   MAIN CONTENT
========================= */

.main-content {
  padding: 28px;
}

/* =========================
   TOPBAR
========================= */

.topbar {
  background: #ffffff;
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 22px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.topbar-left h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 6px;
}

.topbar-left p {
  font-size: 14px;
  color: #6b7280;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* =========================
   STATUS BADGE
========================= */

.status-badge {
  background: #fff7ed;
  color: #ea580c;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

/* =========================
   CARD
========================= */

.section-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.08);
  border: 1px solid #eef2f6;
}

/* =========================
   HEADER
========================= */

.section-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2f6;
}

.section-header h2 {
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* =========================
   SUBTITLE
========================= */

.section-subtitle {
  margin: 18px 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  padding-left: 6px;
}

/* =========================
   FORM GRID
========================= */

.form-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

/* Row layouts */

.form-grid:nth-of-type(1) {
  grid-template-columns: repeat(5, 1fr);
}

.form-grid:nth-of-type(2),
.form-grid:nth-of-type(3) {
  grid-template-columns: repeat(5, 1fr);
}

.form-grid:nth-of-type(4) {
  grid-template-columns: repeat(2, 1fr);
}

/* =========================
   FORM GROUP
========================= */

.form-group {
  display: flex;
  flex-direction: column;
}

/* =========================
   LABEL
========================= */

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

/* Required star */

.required {
  color: red;
  margin-left: 3px;
}

/* =========================
   INPUT / SELECT
========================= */

.form-group input,
.form-group select {

  height: 44px;

  padding: 0 14px;

  border-radius: 10px;

  border: 1px solid #d1d5db;

  font-size: 14px;

  background: #ffffff;

  transition: 0.2s ease;

}

/* Focus */

.form-group input:focus,
.form-group select:focus {

  border-color: #1a7a89;

  box-shadow: 0 0 0 3px rgba(26,122,137,0.15);

}

/* Placeholder */

.form-group input::placeholder {
  color: #9ca3af;
}

/* Readonly */

input[readonly] {
  background: #f9fafb;
}

/* =========================
   FILE INPUT
========================= */

input[type="file"] {
  padding: 10px;
  height: auto;
}

/* =========================
   BUTTONS
========================= */

.form-actions {

  margin-top: 26px;

  display: flex;

  gap: 14px;

}

/* Buttons */

.btn {

  border: none;

  border-radius: 10px;

  padding: 12px 22px;

  font-size: 14px;

  font-weight: 600;

  cursor: pointer;

  transition: 0.25s;

  display: inline-flex;

  align-items: center;

  gap: 8px;

}

/* Primary */

.btn.primary {

  background: #1a7a89;

  color: white;

  box-shadow: 0 4px 12px rgba(26,122,137,0.25);

}

.btn.primary:hover {

  background: #16626e;

  transform: translateY(-1px);

}

/* Secondary */

.btn.secondary {

  background: #eef2f6;

  color: #1f2937;

}

.btn.secondary:hover {

  background: #e5e7eb;

}

/* =========================
   FOOTER
========================= */

.footer {

  margin-top: 30px;

  text-align: center;

  color: #6b7280;

  font-size: 14px;

}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1200px) {

  .form-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

}

@media (max-width: 600px) {

  .form-grid {
    grid-template-columns: 1fr !important;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .main-content {
    padding: 18px;
  }

}


/* =========================
   FORM GRID BASE
========================= */

.form-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

/* =========================
   ROW LAYOUTS (STABLE)
========================= */

.row-1 {
  grid-template-columns: repeat(4, 1fr);
}

.row-2 {
  grid-template-columns: repeat(5, 1fr);
}

.row-3 {
  grid-template-columns: repeat(5, 1fr);
}

.row-4 {
  grid-template-columns: repeat(2, 1fr);
}

input[type="file"] {
  width: 100%;
}

@media (max-width: 1200px) {

  .form-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

}

@media (max-width: 600px) {

  .form-grid {
    grid-template-columns: 1fr !important;
  }

}
.custom-dropdown {
  position: relative;
  width: 100%;
}
/* Customer input full height */

.custom-dropdown input {

  width: 100%;

  height: 100%;

  min-height: 46px;

  box-sizing: border-box;

}

.dropdown-list {

  position: absolute;

  top: 100%;

  left: 0;

  width: 100%;

  max-height: 260px;

  overflow-y: auto;

  background: #ffffff;

  border: 1px solid #e5e7eb;

  border-radius: 12px;

  box-shadow: 0 10px 24px rgba(0,0,0,0.12);

  z-index: 999;

  display: none;

}

.dropdown-item {

  padding: 12px 14px;

  font-size: 14px;

  cursor: pointer;

}

.dropdown-item:hover {

  background: #1a7a89;

  color: white;

}

.no-data {

    color: #64748b;
    font-size: 13px;

    text-align: center;

    padding: 10px;

    cursor: default;

    background: #f8fafc;

}

/* =========================
SUCCESS POPUP
========================= */

#successPopup {

  position: fixed;

  top: 0;
  left: 0;

  width: 100%;
  height: 100%;

  background:
    rgba(0,0,0,0.4);

  display: flex;

  justify-content: center;
  align-items: center;

  z-index: 9999;

  animation:
    fadeIn 0.25s ease;

}

.popup-card {

  background: #ffffff;

  padding: 28px 32px;

  border-radius: 12px;

  text-align: center;

  width: 340px;

  box-shadow:
    0 12px 30px rgba(0,0,0,0.2);

  animation:
    scaleIn 0.25s ease;

}

.popup-icon {

  font-size: 48px;

  color: #16a34a;

  margin-bottom: 10px;

}

.popup-card h2 {

  margin: 10px 0;

  font-size: 22px;

  font-weight: 600;

}

.popup-card p {

  font-size: 15px;

  color: #555;

  margin-bottom: 18px;

}

.popup-btn {

  background: #108082;

  color: #fff;

  border: none;

  padding: 10px 22px;

  border-radius: 8px;

  font-size: 14px;

  cursor: pointer;

  transition: 0.2s;

}

.popup-btn:hover {

  background: #0d6f71;

}

/* Animations */

@keyframes fadeIn {

  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }

}

@keyframes scaleIn {

  from {
    transform: scale(0.9);
  }

  to {
    transform: scale(1);
  }

}
.custom-alert-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.custom-alert-box {
    width: 420px;
    max-width: 90%;
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 15px 50px rgba(0,0,0,.25);
    animation: popupScale .25s ease;
}

@keyframes popupScale {
    from {
        transform: scale(.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.custom-alert-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

.custom-alert-message {
    line-height: 1.7;
    color: #555;
}

.custom-alert-btn {
    margin-top: 20px;
    width: 100%;
    border: none;
    padding: 12px;
    border-radius: 10px;
    background: #108082;
    color: white;
    cursor: pointer;
    font-weight: 600;
}