/**
 * E-Domicile Sindh — Citizen Web Portal Design System
 * Official Government of Sindh Emerald & Forest Green Palette
 * Mirroring Domicile_App/src/constants/Colors.ts
 */

:root {
  --color-primary: #065F46;
  --color-primary-dark: #064E3B;
  --color-primary-deep: #043527;
  --color-secondary: #047857;
  --color-accent: #10B981;
  --color-gold: #D97706;
  --color-gold-light: #FEF3C7;
  
  --color-bg: #F0FDF4;
  --color-surface: #FFFFFF;
  --color-surface-tint: #ECFDF5;
  --color-input-bg: #F8FAFC;
  
  --color-text: #0F172A;
  --color-text-light: #475569;
  --color-text-muted: #94A3B8;
  
  --color-border: #E2E8F0;
  --color-border-focus: #059669;
  
  --color-error: #DC2626;
  --color-error-bg: #FEF2F2;
  --color-success: #16A34A;
  --color-success-bg: #F0FDF4;
  --color-warning: #D97706;
  --color-warning-bg: #FFFBEB;
  --color-info: #2563EB;
  --color-info-bg: #EFF6FF;

  --gradient-header: linear-gradient(135deg, #043527 0%, #065F46 50%, #047857 100%);
  --gradient-button: linear-gradient(90deg, #065F46 0%, #047857 100%);
  --gradient-gold: linear-gradient(90deg, #B45309 0%, #F59E0B 100%);
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* App Shell Wrapper (Centered responsive mobile-first canvas on desktop) */
.citizen-app-shell {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  min-height: 100vh;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);
  position: relative;
}

@media (min-width: 768px) {
  .citizen-app-shell {
    margin: 20px auto;
    min-height: calc(100vh - 40px);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
  }
}

/* Header Styles */
.citizen-header {
  background: var(--gradient-header);
  color: #FFFFFF;
  padding: 24px 20px 20px;
  position: relative;
}

.citizen-header.compact {
  padding: 16px 20px;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.header-logo-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.header-title-wrap h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.header-title-wrap p {
  font-size: 12px;
  color: #A7F3D0;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-action-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.header-action-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Main Content Area */
.citizen-main {
  flex: 1;
  padding: 16px 20px 80px;
  background: #F8FAFC;
}

/* Bottom Navigation Bar */
.citizen-bottom-nav {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-around;
  padding: 8px 12px 12px;
  z-index: 50;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
}

.nav-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--color-text-light);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.nav-tab-item svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.nav-tab-item.active {
  color: var(--color-primary);
}

.nav-tab-item:hover {
  color: var(--color-secondary);
}

/* Cards & Surfaces */
.citizen-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.card-icon-pill {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary);
}

.card-title-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
}

/* Form Controls */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}

.form-hint {
  display: block;
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

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

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--color-primary);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.form-control {
  width: 100%;
  height: 48px;
  padding: 10px 14px 10px 42px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  background-color: var(--color-input-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all 0.2s;
  outline: none;
}

.form-control.no-icon {
  padding-left: 14px;
}

.form-control:focus {
  border-color: var(--color-border-focus);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.form-control[readonly], .form-control:disabled {
  background-color: #F1F5F9;
  color: #64748B;
  cursor: not-allowed;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

textarea.form-control {
  height: auto;
  min-height: 90px;
  padding: 12px 14px;
}

/* Primary Buttons */
.btn-primary-gradient {
  background: var(--gradient-button);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  height: 48px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  width: 100%;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(6, 95, 70, 0.25);
  transition: all 0.2s;
}

.btn-primary-gradient:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-secondary-outline {
  background: #FFFFFF;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-md);
  height: 46px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  width: 100%;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-secondary-outline:hover {
  background: var(--color-surface-tint);
}

/* Badges & Chips */
.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.badge-paid {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #86EFAC;
}

.badge-unpaid, .badge-warning {
  background: #FFFBEB;
  color: #B45309;
  border: 1px solid #FCD34D;
}

.badge-observation, .badge-error {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FCA5A5;
}

.badge-info {
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #93C5FD;
}

/* Alerts */
.alert-box {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.alert-box.alert-danger {
  background-color: var(--color-error-bg);
  border: 1px solid #FCA5A5;
  color: #991B1B;
}

.alert-box.alert-success {
  background-color: var(--color-success-bg);
  border: 1px solid #86EFAC;
  color: #065F46;
}

.alert-box.alert-warning {
  background-color: var(--color-warning-bg);
  border: 1px solid #FCD34D;
  color: #92400E;
}

.alert-box.alert-info {
  background-color: var(--color-info-bg);
  border: 1px solid #93C5FD;
  color: #1E40AF;
}

/* Stepper (Mirroring mobile apply wizard) */
.wizard-stepper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  position: relative;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  z-index: 2;
}

.step-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #E2E8F0;
  color: #64748B;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  border: 2px solid #FFFFFF;
  transition: all 0.2s;
}

.step-item.active .step-circle {
  background: var(--color-primary);
  color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(6, 95, 70, 0.2);
}

.step-item.completed .step-circle {
  background: var(--color-secondary);
  color: #FFFFFF;
}

.step-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-light);
  text-align: center;
}

.step-item.active .step-title {
  color: var(--color-primary);
  font-weight: 800;
}

/* Footer Credits */
.citizen-footer {
  text-align: center;
  padding: 16px;
  font-size: 11px;
  color: var(--color-text-muted);
}

/* Support Screen & Officer Cards */
.officer-card {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.officer-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.officer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #0284C7;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.officer-meta {
  flex: 1;
}

.officer-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-top: 4px;
}

.officer-role {
  font-size: 12px;
  color: var(--color-text-light);
  line-height: 1.3;
}

.contact-row-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--color-text);
  padding: 8px 12px;
  background: #F8FAFC;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.support-actions-grid {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.btn-contact {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
  text-align: center;
}

.btn-contact:hover {
  opacity: 0.9;
}

.btn-call {
  background: var(--color-primary);
  color: #FFFFFF;
}

.btn-whatsapp {
  background: #16A34A;
  color: #FFFFFF;
}

.btn-email {
  background: #F1F5F9;
  color: #0F172A;
  border: 1px solid var(--color-border);
}

/* Password Strength & Input Enhancements */
.input-with-eye {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-eye input {
  padding-right: 44px;
}

.toggle-pwd-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwd-strength-container {
  margin-top: 6px;
  margin-bottom: 12px;
}

.pwd-strength-bars {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.pwd-strength-bar {
  flex: 1;
  height: 4px;
  background: #E2E8F0;
  border-radius: 2px;
  transition: background-color 0.2s;
}

.pwd-strength-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
}

