:root {
  /* Colors - Government Professional / Trustworthy */
  --primary: #0056b3;
  --primary-dark: #003d7a;
  --primary-light: #e6f0ff;
  --secondary: #00a896;
  --accent: #ff9f1c;
  --bg-app: #f4f7fa;
  --bg-card: #ffffff;
  --text-main: #1a1c1e;
  --text-muted: #667085;
  --border: #d0d5dd;
  --error: #d92d20;
  --success: #039855;
  --warning: #f79009;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(16, 24, 40, 0.1), 0 2px 4px -1px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(16, 24, 40, 0.1), 0 4px 6px -2px rgba(16, 24, 40, 0.05);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout Containers */
.app-container {
  width: 100%;
  max-width: 480px; /* Mobile focused max width for preview */
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,0.05);
}

/* Header */
.app-header {
  padding: var(--space-lg) var(--space-md) var(--space-md);
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.app-header h1 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 600;
  flex: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
  gap: var(--space-sm);
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: white;
  border-color: var(--border);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-app);
}

.btn-text {
  background: transparent;
  color: var(--primary);
  padding: var(--space-xs);
  width: auto;
}

/* Forms */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-xs);
  color: var(--text-muted);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: var(--text-md);
  outline: none;
  transition: border-color 0.2s;
  background: white;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.input-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
}

.input-with-icon .form-input {
  padding-left: 40px;
}

.input-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: var(--space-md);
}

/* Badge States */
.badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-active { background: #ecfdf3; color: var(--success); }
.badge-pending { background: #fff7ed; color: var(--warning); }
.badge-completed { background: #f0f9ff; color: var(--primary); }

/* Stepper */
.stepper {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  position: relative;
}

.stepper::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  z-index: 1;
}

.step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  position: relative;
  z-index: 2;
  color: var(--text-muted);
}

.step.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.step.completed {
  border-color: var(--primary);
  background: white;
  color: var(--primary);
}

/* List Items */
.unit-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-md);
}

.unit-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.unit-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.unit-name {
  font-weight: 700;
  font-size: var(--text-md);
}

.unit-id {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.unit-loc {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Placeholders */
.placeholder-image {
  background: #eaecf0;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
}

/* Navigation Bottom Sticky */
.sticky-footer {
  position: sticky;
  bottom: 0;
  background: white;
  padding: var(--space-md);
  border-top: 1px solid var(--border);
  display: flex;
  gap: var(--space-md);
}

/* Radio / Checkbox Custom */
.custom-control {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: var(--space-sm);
}

.custom-control:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.custom-control input {
  width: 20px;
  height: 20px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
  animation: fadeIn 0.4s ease-out forwards;
}

/* Scroll Hide */
::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}
