:root {
  --primary: #1D4ED8;
  --primary-hover: #1E40AF;
  --primary-light: #EFF6FF;
  --primary-border: #BFDBFE;
  --dark: #0F172A;
  --slate-700: #334155;
  --slate-500: #64748B;
  --slate-300: #CBD5E1;
  --slate-100: #F1F5F9;
  --slate-50: #F8FAFC;
  --white: #FFFFFF;
  --green: #10B981;
  --green-bg: #ECFDF5;
  --green-border: #A7F3D0;
  --amber: #F59E0B;
  --amber-bg: #FFFBEB;
  --amber-border: #FDE68A;
  --red: #EF4444;
  --red-bg: #FEF2F2;
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --radius-lg: 16px;
  --radius-md: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--slate-50);
  color: var(--dark);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 16px 12px 32px;
}

.app-container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-100);
}

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

.logo-circle {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--primary-border);
}

.logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text h1 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--dark);
  line-height: 1.2;
}

.brand-text p {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--primary);
}

.passport-badge span {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--primary-border);
  letter-spacing: 0.5px;
}

/* Search Bar */
.search-section {
  width: 100%;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 6px 8px 6px 14px;
  border: 1px solid var(--slate-300);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.search-icon {
  color: var(--slate-500);
  margin-right: 8px;
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--dark);
  text-transform: uppercase;
}

.search-box input::placeholder {
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 400;
  color: var(--slate-500);
  text-transform: none;
}

.search-box button {
  background: var(--primary);
  color: var(--white);
  border: none;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.search-box button:hover {
  background: var(--primary-hover);
}

/* Main Cards */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Passport Card */
.passport-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 4px solid var(--primary);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--slate-100);
}

.project-code-tag .label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--slate-500);
  letter-spacing: 0.5px;
}

.project-code-tag .code {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* Title & Client */
.title-section h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.35;
  margin-bottom: 8px;
}

.client-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
  background: var(--slate-100);
  padding: 5px 10px;
  border-radius: 6px;
}

.client-badge svg {
  color: var(--slate-500);
}

/* Location */
.info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--slate-50);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-100);
}

.icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.location-icon {
  background: #EEF2FF;
  color: var(--primary);
}

.info-text {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--slate-500);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.meta-value {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--dark);
}

/* Dates Grid */
.dates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.date-item {
  background: var(--slate-50);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-100);
  display: flex;
  flex-direction: column;
}

.date-item .meta-value {
  font-family: var(--font-mono);
  font-size: 13px;
  margin-top: 2px;
}

/* Financial Section */
.finance-section {
  background: var(--slate-50);
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid var(--slate-100);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.finance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.payment-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.finance-numbers {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fin-block {
  display: flex;
  flex-direction: column;
}

.fin-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--slate-500);
}

.fin-value {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--dark);
}

.paid-val {
  color: var(--green);
}

.fin-divider {
  width: 1px;
  height: 28px;
  background: var(--slate-300);
}

.progress-wrap {
  width: 100%;
  height: 7px;
  background: var(--slate-300);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.fin-subtext {
  font-size: 11.5px;
  color: var(--slate-500);
  font-weight: 500;
}

/* Remarks */
.remarks-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.remarks-text {
  font-size: 13px;
  color: var(--slate-700);
  background: #F8FAFC;
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
  line-height: 1.45;
}

/* Filed Documents Timeline */
.documents-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.docs-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc-item-row {
  background: #F8FAFC;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doc-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.doc-name {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.doc-tag {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.doc-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--slate-500);
}

.doc-amount {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #10B981;
}

/* Hard Drive Archive Notice */
.archive-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.notice-icon {
  color: #16A34A;
  flex-shrink: 0;
  margin-top: 2px;
}

.notice-text strong {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: #15803D;
  letter-spacing: 0.5px;
}

.notice-text p {
  font-size: 12px;
  color: #166534;
  line-height: 1.4;
  margin-top: 2px;
}

.notice-code {
  font-family: var(--font-mono);
  font-weight: 700;
  background: #DCFCE7;
  padding: 1px 4px;
  border-radius: 4px;
}

/* Spinner */
.loader-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 12px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--slate-100);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loader-box p {
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-500);
}

/* Not Found */
.not-found-card {
  text-align: center;
  padding: 30px 20px;
}

.not-found-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.not-found-card h3 {
  font-size: 16px;
  color: var(--dark);
  margin-bottom: 6px;
}

.not-found-card p {
  font-size: 13px;
  color: var(--slate-500);
}

.not-found-card .sub-hint {
  font-size: 12px;
  margin-top: 6px;
  color: var(--slate-500);
}

/* Recent Projects Directory */
.recent-list-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--slate-500);
  padding-left: 4px;
}

.project-mini-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-card {
  background: var(--white);
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.mini-card:hover, .mini-card:active {
  border-color: var(--primary-border);
  background: var(--primary-light);
  transform: translateY(-1px);
}

.mini-info {
  display: flex;
  flex-direction: column;
}

.mini-code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

.mini-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-meta {
  font-size: 11px;
  color: var(--slate-500);
}

.mini-status {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 16px 0;
  font-size: 11px;
  color: var(--slate-500);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.foot-sub {
  font-size: 10px;
  color: var(--slate-500);
}
