/* ============================================================
   Niyukti — App shell styles (login, dashboards, admin panel)
   Loaded alongside style.css
   ============================================================ */

.app-shell {
  padding: 48px 0 90px;
  min-height: 60vh;
}

/* ---------------- Auth pages ---------------- */
.auth-wrap { max-width: 420px; margin: 0 auto; }
.auth-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
}
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-card .sub { color: var(--slate); font-size: 14.5px; margin-bottom: 26px; }
.auth-step { display: none; }
.auth-step.active { display: block; }
.otp-boxes {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
}
.otp-boxes input {
  width: 100%;
  text-align: center;
  font-size: 22px;
  letter-spacing: 2px;
  padding: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.auth-alert {
  display: none;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 18px;
}
.auth-alert.show { display: block; }
.auth-alert.error { background: #FBE9E7; color: #A6392C; border: 1px solid #F0C4BC; }
.auth-alert.success { background: #E7F3EC; color: #205A3D; border: 1px solid #B9DCC7; }
.auth-resend { font-size: 13px; color: var(--slate); margin-top: 14px; text-align: center; }
.auth-resend a { color: var(--amber); font-weight: 600; }
.auth-switch { text-align: center; font-size: 13.5px; color: var(--slate); margin-top: 20px; }
.role-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 760px;
  margin: 0 auto;
}
.role-picker-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  text-align: left;
}
.role-picker-card h3 { font-size: 20px; margin-bottom: 8px; }
.role-picker-card p { font-size: 14px; margin-bottom: 18px; }

/* ---------------- Dashboard shell ---------------- */
.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 30px;
}
.dash-head h1 { font-size: 28px; margin-bottom: 4px; }
.dash-head .sub { color: var(--slate); font-size: 14.5px; margin: 0; }

.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 34px;
}
.dash-stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
}
.dash-stat .label { font-size: 13px; color: var(--slate-light); margin-bottom: 6px; }
.dash-stat .value { font-family: var(--font-display); font-size: 28px; color: var(--navy); font-weight: 700; }
.dash-stat.wallet .value { color: var(--amber); }

.dash-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.dash-tabs a {
  padding: 12px 18px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--slate);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.dash-tabs a.active, .dash-tabs a:hover { color: var(--navy); border-bottom-color: var(--amber); }

.panel-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}
.panel-card h2, .panel-card h3 { font-size: 19px; margin-bottom: 16px; }

/* forms */
.form-grid { display: grid; gap: 18px; }
.form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.filter-grid { grid-template-columns: 1.3fr 0.9fr 0.9fr 0.9fr 0.9fr; gap: 14px; }
.form-row label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 7px;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--navy);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--amber); background: var(--white);
}
.form-row textarea { min-height: 120px; resize: vertical; }
.form-row .hint { font-size: 12.5px; color: var(--slate-light); margin-top: 6px; }

/* tables */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data-table th {
  text-align: left;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--slate-light);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  vertical-align: top;
}
table.data-table tr:last-child td { border-bottom: none; }
.empty-row td { text-align: center; color: var(--slate-light); padding: 30px 14px; }

/* badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-pending { background: #FCF2DE; color: #96690A; }
.badge-approved, .badge-verified, .badge-active, .badge-charged { background: #E7F3EC; color: #205A3D; }
.badge-rejected, .badge-suspended { background: #FBE9E7; color: #A6392C; }
.badge-locked { background: #EEF0F4; color: #47607A; }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-danger { background: #C0392B; color: #fff; }
.btn-danger:hover { background: #A6392C; }

.inline-form { display: inline; }

.blurred {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
}

.notice-banner {
  background: #FCF2DE;
  border: 1px solid #EFD9A0;
  color: #6B4E05;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 24px;
}

/* ---------------- Image lightbox popup ---------------- */
.poster-thumb { cursor: zoom-in; }
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 47, 73, 0.92);
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img {
  max-width: min(90vw, 720px);
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,0.28); }

/* ---------------- Admin job cards (Jobs tab) ---------------- */
.admin-job-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 14px;
  background: var(--white);
  flex-wrap: wrap;
  align-items: flex-start;
}
.admin-job-card > .poster-thumb,
.admin-job-card > .poster-placeholder {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  max-width: 84px;
  max-height: 84px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.admin-job-card .job-body { flex: 1 1 220px; min-width: 0; }
.admin-job-card .job-body p { max-width: none; }
.admin-job-card .job-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 110px;
}
.poster-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-2);
  color: var(--slate-light);
  font-size: 11px;
  text-align: center;
  cursor: default;
}

@media (max-width: 640px) {
  .admin-job-card { padding: 16px; gap: 12px; }
  .admin-job-card > .poster-thumb,
  .admin-job-card > .poster-placeholder { width: 64px; height: 64px; max-width: 64px; max-height: 64px; }
  .admin-job-card .job-actions {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
  }
  .admin-job-card .job-actions form { flex: 1 1 calc(50% - 4px); }
  .admin-job-card .job-actions .btn { width: 100%; }
}

@media (max-width: 700px) {
  .form-grid.cols-2 { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .role-picker { grid-template-columns: 1fr; }
  .otp-boxes input { font-size: 18px; }
}
@media (max-width: 480px) {
  .filter-grid { grid-template-columns: 1fr; }
}
