/* ==========================================================================
   Police Verification & Records Portal - Minimal Realistic Dark Stylesheet
   Pure Solid Dark Theme (#161616) - No Grids, No Meshes, No Navy Blue Patterns
   Font: SolaimanLipi (Bangla & English Typography)
   ========================================================================== */

@font-face {
  font-family: 'SolaimanLipi';
  src: url('fonts/SolaimanLipi.woff2') format('woff2'),
       url('fonts/SolaimanLipi.woff') format('woff'),
       url('fonts/SolaimanLipi.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-color: #161616;
  --bg-input: #242424;
  --bg-card: #1c1c1c;
  --border-subtle: #383838;
  --border-card: #2e2e2e;
  --border-focus: #555555;
  
  --text-main: #ffffff;
  --text-muted: #a3a3a3;
  --text-dim: #737373;
  
  --accent-yellow: #facc15;
  --accent-teal: #38bdf8;
  --accent-teal-hover: #0ea5e9;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #ef4444;
  
  --font-family: 'SolaimanLipi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.15s ease;
}

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

html, body {
  min-height: 100vh;
  font-family: var(--font-family);
  background-color: var(--bg-color, #161616) !important;
  background-image: none !important;
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Optional Dynamic Background Image Layer */
.bg-image-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
  z-index: 0;
  display: none;
}

/* Page Wrapper */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 20px;
}

.main-container {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 8px 0;
}

/* Top Navigation / Status Header */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 500px;
  margin: 0 auto 32px auto;
  width: 100%;
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.22);
  color: #34d399;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.id-badge-text {
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 0;
}

/* Branding Header */
.branding-header {
  text-align: center;
  margin-bottom: 24px;
}

.logo-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

/* Subtle floating glow on Logo */
.portal-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.45));
}

/* Soft text glow on Portal Title */
.site-title {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-shadow: 0 0 14px rgba(250, 204, 21, 0.35);
}

/* ==========================================================================
   Search Form (Exact Match with Reference Image 2 - No Bulky Outer Card)
   ========================================================================== */
.search-card {
  width: 100%;
  margin-bottom: 8px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.search-title-label {
  color: var(--accent-yellow);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
  letter-spacing: -0.01em;
}

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

/* Flat Dark Matte Input */
.search-input-field {
  width: 100%;
  padding: 10px 14px;
  background: #242424 !important;
  border: 1px solid #383838 !important;
  border-radius: 4px;
  color: #ffffff !important;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.search-input-field::placeholder {
  color: #737373 !important;
  opacity: 1;
}

.search-input-field:focus {
  border-color: #555555 !important;
  background: #282828 !important;
}

.search-input-field:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Right-Aligned Compact Teal Submit Button */
.search-btn-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.btn-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  background: #38bdf8;
  border: none;
  border-radius: 4px;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  user-select: none;
  font-family: inherit;
  line-height: 1.2;
}

.btn-search:hover:not(:disabled) {
  background: #0ea5e9;
}

.btn-search:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Loader Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Compact Search Results Display (Tight, Directly Underneath, No Tall Gaps)
   ========================================================================== */
.results-area {
  margin-top: 10px;
  width: 100%;
}

/* Case A: Compact Record Card */
.record-card {
  background: #1c1c1c;
  border: 1px solid #2e2e2e;
  border-radius: 4px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.record-top-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.record-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 3px;
}

.record-timeline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
}

.record-name-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #282828;
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.record-owner-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.record-id-tag {
  font-size: 0.75rem;
  color: #737373;
}

.record-compact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

.compact-field-box {
  background: #161616;
  border: 1px solid #262626;
  padding: 6px 10px;
  border-radius: 3px;
}

.field-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 1px;
}

.field-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: #e5e5e5;
  word-break: break-all;
}

.report-compact-box {
  background: #161616;
  border-left: 3px solid #38bdf8;
  border-radius: 0 3px 3px 0;
  padding: 8px 10px;
  margin-bottom: 8px;
}

.report-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.report-content {
  color: #d1d5db;
  font-size: 0.86rem;
  line-height: 1.45;
}

.record-compact-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  padding-top: 6px;
  border-top: 1px solid #282828;
}

.added-by-name {
  color: #38bdf8;
  font-weight: 600;
}

/* Case B: Compact Resting Alert Box */
.resting-alert-box {
  background: #1c1c1c;
  border: 1px solid #3d3114;
  border-radius: 4px;
  padding: 16px 14px;
  text-align: center;
}

.alert-icon-ring {
  width: 38px;
  height: 38px;
  margin: 0 auto 8px auto;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-amber);
}

.resting-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 3px;
}

.resting-message {
  font-size: 0.86rem;
  color: #fde68a;
  margin-bottom: 10px;
}

.countdown-container {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: #141414;
  border: 1px solid #3d3319;
  border-radius: 4px;
  padding: 8px 16px;
  margin-bottom: 10px;
}

.timer-digits {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.85rem;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.06em;
  line-height: 1;
}

.timer-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-top: 3px;
}

.progress-bar-container {
  width: 100%;
  max-width: 200px;
  height: 3px;
  background: #262626;
  border-radius: 9999px;
  margin: 0 auto 8px auto;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: #f59e0b;
  width: 100%;
  transition: width 1s linear;
}

.resting-note {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Footer */
.portal-footer {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 24px;
  padding: 12px 0;
  border-top: 1px solid #222222;
}

@media (max-width: 640px) {
  .site-title {
    font-size: 1.45rem;
  }
  .portal-logo {
    width: 64px;
    height: 64px;
  }
  .record-compact-grid {
    grid-template-columns: 1fr;
  }
}
