/* ============================================= */
/* MOBILE RESPONSIVE - Scale Down Components     */
/* File: mobile-fix.css  (v2 - Smaller)         */
/* ============================================= */

@media (max-width: 480px) {
  /* === Header === */
  .main-header {
    padding: 0.4rem 0.7rem;
  }

  .header-logo {
    height: 22px;
  }

  .logo-text-brand {
    font-size: 0.72rem;
    letter-spacing: 0px;
  }

  .logo {
    padding: 3px;
    border-radius: 6px;
  }

  .logo-wrapper {
    gap: 6px;
  }

  .header-site-box {
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    gap: 0.35rem;
  }

  .site-company-text {
    font-size: 0.48rem;
    max-width: 75px;
  }

  .site-plot-text {
    font-size: 0.6rem;
    max-width: 75px;
  }

  .header-site-box svg {
    width: 10px;
    height: 10px;
  }

  .nav-title {
    font-size: 0.65rem;
    letter-spacing: 0px;
  }

  .global-back-btn {
    height: 34px;
    min-width: 92px;
    padding: 0 0.6rem;
    border-radius: 10px;
    margin-bottom: 0.4rem;
    font-size: 0.7rem;
    gap: 4px;
  }

  .global-back-btn svg {
    width: 16px;
    height: 16px;
  }

  /* === Content Area === */
  .content-wrapper {
    padding: 0.7rem 0.6rem;
  }

  /* === Menu Cards === */
  .grid-menu {
    gap: 0.5rem;
  }

  .menu-card {
    padding: 0.7rem 0.8rem;
    border-radius: 14px;
    gap: 0.75rem;
    box-shadow: 0 4px 10px rgba(30, 64, 175, 0.03);
  }

  .icon-wrapper {
    width: 33px;
    height: 33px;
    border-radius: 9px;
  }

  .icon-wrapper svg {
    width: 16px;
    height: 16px;
  }

  .card-label {
    font-size: 0.88rem;
    font-weight: 700;
  }

  .badge {
    font-size: 0.52rem;
    padding: 1px 5px;
  }

  /* === Page Header === */
  .page-header {
    gap: 0.6rem;
    margin-bottom: 1rem;
  }

  .page-header h2 {
    font-size: 1.15rem;
  }

  .back-btn {
    height: 34px;
    min-width: 92px;
    padding: 0 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    gap: 4px;
  }

  .back-btn svg {
    width: 15px;
    height: 15px;
  }

  /* === List Items === */
  .list-buttons {
    gap: 0.45rem;
  }

  .list-item {
    padding: 0.7rem 0.8rem;
    border-radius: 13px;
    gap: 0.65rem;
  }

  .list-item span {
    font-size: 0.82rem;
    font-weight: 600;
  }

  .item-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 0.85rem;
  }

  .item-icon svg {
    width: 14px;
    height: 14px;
  }

  /* === Footer === */
  .main-footer {
    padding: 0.5rem 0.7rem;
  }

  .status-indicator {
    font-size: 0.58rem;
    gap: 0.4rem;
  }

  .status-dot {
    width: 5px;
    height: 5px;
  }

  .version-tag {
    font-size: 0.52rem;
    padding: 1px 4px;
  }

  /* === Modal === */
  .modal-content {
    border-radius: 18px;
    padding: 1.1rem;
    max-width: 320px;
  }

  .modal-header h3 {
    font-size: 0.88rem;
  }

  .modal-sub-header h4 {
    font-size: 0.78rem;
  }

  .icon-btn {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }

  .icon-btn svg {
    width: 12px;
    height: 12px;
  }

  .small-back-btn {
    width: 24px;
    height: 24px;
  }

  .small-back-btn svg {
    width: 12px;
    height: 12px;
  }

  .modal-search-box input {
    padding: 0.65rem;
    font-size: 0.78rem;
    border-radius: 10px;
  }

  .list-select-item {
    padding: 0.55rem 0.65rem;
    font-size: 0.78rem;
    border-radius: 8px;
  }

  .custom-list-selector {
    gap: 0.4rem;
    max-height: 260px;
  }

  /* === Site Summary Card === */
  .site-summary-card {
    border-radius: 11px;
    padding: 0.8rem;
    margin-bottom: 1rem;
  }

  .summary-item label {
    font-size: 0.62rem;
  }

  .summary-item span {
    font-size: 0.8rem;
  }

  /* === Form Fields === */
  .form-group-light input {
    padding: 0.65rem;
    font-size: 0.82rem;
    border-radius: 10px;
  }

  .form-group-light label {
    font-size: 0.65rem;
  }

  .form-group-light {
    margin-bottom: 0.65rem;
  }

  /* === Submit Button === */
  .submit-btn {
    padding: 0.75rem;
    font-size: 0.82rem;
    border-radius: 12px;
    gap: 0.4rem;
  }

  .submit-btn.highlight svg {
    width: 15px;
    height: 15px;
  }

  /* === Action Page === */
  .action-card {
    border-radius: 18px;
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .site-info-bar {
    gap: 0.45rem;
    margin-bottom: 1.2rem;
  }

  .info-tag {
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    gap: 0.3rem;
  }

  .info-tag svg {
    width: 11px;
    height: 11px;
  }

  .info-tag span {
    font-size: 0.65rem;
  }

  .capture-section label {
    font-size: 0.65rem;
  }

  .media-add-btn {
    width: 54px;
    height: 54px;
    border-radius: 10px;
    gap: 0.2rem;
  }

  .media-add-btn svg {
    width: 15px;
    height: 15px;
  }

  .media-add-btn span {
    font-size: 0.52rem;
  }

  #actionNotes {
    height: 54px;
    font-size: 0.78rem;
    padding: 0.55rem;
    border-radius: 10px;
  }

  .form-field input, .form-field select {
    padding: 0.65rem;
    font-size: 0.82rem;
    border-radius: 12px;
  }

  .check-select {
    padding-right: 2.4rem;
    background-position:
      calc(100% - 1rem) 50%,
      calc(100% - 0.75rem) 50%,
      calc(100% - 2rem) 50%;
    background-size: 0.4rem 0.4rem, 0.4rem 0.4rem, 1px 55%;
  }

  .form-field label {
    font-size: 0.65rem;
  }

  /* === Toast === */
  .toast {
    padding: 0.55rem 1rem;
    font-size: 0.72rem;
    border-radius: 24px;
  }

  /* === Background Effects === */
  .bg-blur {
    width: 180px;
    height: 180px;
  }

  .bg-gradient {
    width: 220px;
    height: 220px;
  }
}

/* Slightly larger phones (481-640px) */
@media (min-width: 481px) and (max-width: 640px) {
  .main-header {
    padding: 0.65rem 0.9rem;
  }

  .header-logo {
    height: 28px;
  }

  .logo-text-brand {
    font-size: 0.9rem;
  }

  .content-wrapper {
    padding: 1rem 0.8rem;
  }

  .menu-card {
    padding: 0.9rem 1rem;
    border-radius: 18px;
    gap: 1rem;
  }

  .icon-wrapper {
    width: 38px;
    height: 38px;
  }

  .icon-wrapper svg {
    width: 20px;
    height: 20px;
  }

  .card-label {
    font-size: 1rem;
  }

  .page-header h2 {
    font-size: 1.35rem;
  }

  .list-item {
    padding: 0.85rem;
    border-radius: 14px;
  }

  .list-item span {
    font-size: 0.9rem;
  }

  .item-icon {
    width: 34px;
    height: 34px;
  }

  .modal-content {
    border-radius: 22px;
    padding: 1.35rem;
    max-height: 92vh;
    overflow: hidden;
  }
}

@media (max-width: 640px) {
  #siteModal .modal-content {
    width: min(100%, 520px);
    max-height: 94vh;
  }

  #siteModal #stepAdd.modal-step.active {
    min-height: 0;
  }

  #siteModal .add-site-form {
    display: grid;
    grid-template-columns: 1fr;
    max-height: calc(94vh - 160px);
    padding-right: 0.2rem;
  }

  #siteModal .form-group-light input,
  #siteModal .form-group-light select {
    padding: 0.8rem;
    font-size: 0.82rem;
    border-radius: 12px;
  }

  #siteModal .form-field-inline {
    gap: 0.45rem;
  }

  #siteModal .field-add-btn {
    width: 42px;
    min-width: 42px;
    flex-basis: 42px;
    border-radius: 12px;
    font-size: 1.2rem;
  }

  #siteModal .levels-entry-table th,
  #siteModal .levels-entry-table td {
    font-size: 0.68rem;
    padding: 0.35rem;
  }
}

/* === New Level Mark: DB Import Button === */
.db-import-btn {
  width: 100%;
  margin-top: 10px;
  height: 52px;
  border: 1px solid rgba(30, 64, 175, 0.12);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-soft), #ffffff);
  color: var(--primary);
  font-weight: 900;
  font-size: 0.92rem;
  letter-spacing: 0.2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 24px rgba(30, 64, 175, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.db-import-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(30, 64, 175, 0.22);
  box-shadow: 0 14px 28px rgba(30, 64, 175, 0.12);
}

.db-import-btn:active {
  transform: translateY(0);
}

.db-import-btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

@media (max-width: 480px) {
  .db-import-btn {
    height: 44px;
    font-size: 0.82rem;
    border-radius: 12px;
  }
}

.design-rl-source {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 700;
}
