* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
}

.login-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0f172a;
  color: white;
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-box {
  background: #1e293b;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.login-box h1 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.4;
  text-align: center;
}

.login-box h2 {
  margin: 0 0 20px;
  font-size: 20px;
  text-align: center;
  color: #cbd5e1;
}

.login-box input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
}

.login-box button {
  width: 100%;
  padding: 12px;
  background: #22c55e;
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

.login-box button:hover {
  background: #16a34a;
}

.hint-text {
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  margin-top: 10px;
}

.error {
  color: #f87171;
  margin-top: 12px;
  text-align: center;
}

.page-body {
  background: #0f172a;
  color: white;
  min-height: 100vh;
}

.page-shell {
  max-width: 1250px;
  margin: 0 auto;
  padding: 20px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.page-title {
  margin: 0 0 8px;
  font-size: 30px;
}

.page-subtitle {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.8;
}

.content-card {
  background: #1e293b;
  border-radius: 18px;
  padding: 24px;
}

.form-section + .form-section {
  margin-top: 28px;
}

.section-title {
  margin: 0 0 16px;
  font-size: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: #e2e8f0;
}

.field select,
.field input,
.field textarea {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
}

.single-field {
  margin-top: 16px;
}

.upload-box {
  border: 2px dashed #475569;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  background: #0f172a;
}

.upload-box input[type="file"] {
  width: 100%;
  margin-bottom: 10px;
  color: white;
}

.upload-help {
  margin: 0;
  color: #94a3b8;
}

.actions-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  cursor: pointer;
  font-size: 15px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.primary-btn {
  background: #22c55e;
  color: white;
}

.primary-btn:hover {
  background: #16a34a;
}

.secondary-btn {
  background: #334155;
  color: white;
}

.secondary-btn:hover {
  background: #475569;
}

.primary-btn:disabled,
.secondary-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.ghost-btn {
  background: transparent;
  border: 1px solid #475569;
  color: white;
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.info-text {
  margin-top: 14px;
  color: #cbd5e1;
  line-height: 1.8;
}

.preview-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}

.preview-grid img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0f172a;
}

.selected-files-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.selected-file-item {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.selected-file-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.selected-file-name {
  color: #f8fafc;
  word-break: break-word;
}

.selected-file-size {
  color: #94a3b8;
  font-size: 13px;
}

.remove-file-btn {
  background: #dc2626;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
}

.remove-file-btn:hover {
  background: #b91c1c;
}

.progress-wrapper {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: #0f172a;
  overflow: hidden;
  border: 1px solid #334155;
  margin-top: 16px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  transition: width 0.25s ease;
}

.hidden {
  display: none !important;
}

.stats-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-label {
  color: #94a3b8;
  font-size: 14px;
}

.stat-card strong {
  font-size: 24px;
  color: #f8fafc;
}

.results-list {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.result-card {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 16px;
}

.result-card h3 {
  margin: 0 0 12px;
  font-size: 19px;
}

.result-card p {
  margin: 6px 0;
  color: #cbd5e1;
  line-height: 1.8;
}

.path-text {
  color: #93c5fd !important;
  word-break: break-word;
}

.names-box {
  margin-top: 10px;
  padding: 12px;
  background: #1e293b;
  border-radius: 10px;
  color: #e2e8f0;
  font-size: 14px;
}

.result-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .content-card {
    padding: 16px;
  }

  .page-title {
    font-size: 24px;
  }

  .selected-file-item {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}


.home-portal {
  text-align: center;
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #14532d;
  color: #dcfce7;
  font-size: 13px;
  margin-bottom: 14px;
}

.portal-grid {
  margin-top: 22px;
  display: grid;
  gap: 14px;
}

.portal-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: 14px;
  text-decoration: none;
  background: #0f172a;
  border: 1px solid #334155;
  color: white;
  text-align: right;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.portal-card:hover {
  transform: translateY(-2px);
  border-color: #22c55e;
}

.portal-card-title {
  font-size: 18px;
  font-weight: 700;
}

.portal-card-desc {
  color: #cbd5e1;
  line-height: 1.8;
}

.portal-actions {
  justify-content: center;
}

.file-preview-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.file-preview-card {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-preview-icon {
  width: 54px;
  height: 54px;
  min-width: 54px;
  border-radius: 12px;
  background: #7f1d1d;
  color: #fee2e2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 1px;
}

.file-preview-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.file-preview-info strong,
.file-preview-info span {
  word-break: break-word;
}

.file-preview-info span {
  color: #94a3b8;
  font-size: 13px;
}

.result-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
