/* Professional Responsive Design System */
:root {
  /* Colors */
  --primary: #00897B;
  --primary-dark: #00695C;
  --primary-light: #4DB6AC;
  --secondary: #FFC107;
  --secondary-dark: #FFA000;
  --secondary-light: #FFD54F;
  --success: #4CAF50;
  --danger: #F44336;
  --warning: #FF9800;
  --info: #2196F3;
  
  /* Neutrals */
  --dark: #1a1a1a;
  --text: #1a1a1a;
  --text-light: #666666;
  --text-lighter: #999999;
  --bg: #FFD700;
  --bg-light: #ffffff;
  --border: #B8860B;
  --border-light: #f0f0f0;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  
  /* Transitions */
  --transition: all 0.2s ease;
  --transition-fast: all 0.15s ease;
  --transition-slow: all 0.3s ease;
  
  /* Legacy support */
  --teal: #00897B;
  --yellow: #FFC107;
  --muted: #666666;
  --card: #FFD700;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Responsive Typography */
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

@media (min-width: 1024px) {
  html {
    font-size: 16px;
  }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

h4 {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
}

h5 {
  font-size: clamp(1rem, 2vw, 1.25rem);
}

h6 {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
}

p {
  margin-bottom: 1em;
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  text-decoration: underline;
  color: var(--primary-dark);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-md);
  width: 100%;
}

@media (min-width: 768px) {
  .container {
    padding: var(--space-lg);
  }
}

@media (min-width: 1024px) {
  .container {
    padding: var(--space-xl);
  }
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
/* Brand */
.brand {
  font-weight: 700;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
}

/* Cards - Fully Responsive */
.card {
  background: var(--card);
  padding: clamp(12px, 3vw, 20px);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-md);
  transition: var(--transition);
  width: 100%;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

@media (min-width: 768px) {
  .card {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
  }
}

/* Footer */
.footer {
  opacity: 0.7;
  margin-top: var(--space-2xl);
  border-top: 1px solid var(--border);
  padding-top: var(--space-md);
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
}

/* Centered Hero Card */
.center-wrap {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.hero-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
  padding: var(--space-md);
}

@media (min-width: 768px) {
  .hero-card {
    max-width: 520px;
    padding: var(--space-xl);
  }
}
/* Title */
.title {
  font-weight: 700;
  margin: 0 0 var(--space-md) 0;
  color: var(--primary);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
}

/* Buttons - Fully Responsive */
.btn {
  display: inline-block;
  padding: clamp(10px, 2.5vw, 14px) clamp(14px, 3vw, 20px);
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
  font-size: clamp(0.9rem, 2vw, 1rem);
  transition: var(--transition);
  text-align: center;
  text-decoration: none;
  min-height: 44px; /* iOS minimum touch target */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

@media (min-width: 768px) {
  .btn {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    min-height: 48px;
  }
}

/* Button Variants */
.btn-yellow {
  background: var(--secondary);
  color: var(--dark);
}

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

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

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

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

.btn-dark:hover {
  filter: brightness(1.1);
}

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

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

/* Forms - Fully Responsive */
.form {
  display: block;
  width: 100%;
}

.form .group, .form-group {
  margin-bottom: clamp(12px, 2.5vw, 16px);
}

.form label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 600;
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: var(--text);
}

.form input,
.form textarea,
.form select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="time"],
textarea,
select {
  width: 100%;
  padding: clamp(10px, 2.5vw, 12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: clamp(0.9rem, 2vw, 1rem);
  font-family: var(--font-sans);
  transition: var(--transition);
  background: white;
  min-height: 44px; /* iOS minimum */
}

.form input:focus,
.form textarea:focus,
.form select:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 137, 123, 0.1);
}

.form small {
  color: var(--text-light);
  font-size: clamp(0.75rem, 1.5vw, 0.85rem);
  display: block;
  margin-top: var(--space-xs);
}

@media (min-width: 768px) {
  .form .group, .form-group {
    margin-bottom: var(--space-lg);
  }
  
  .form label {
    margin-bottom: var(--space-sm);
    font-size: 1rem;
  }
  
  .form input,
  .form textarea,
  .form select {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    min-height: 48px;
  }
}

.form .declaration {
  font-size: clamp(0.75rem, 1.5vw, 0.85rem);
  color: var(--text-light);
  line-height: 1.5;
}

.form .inline {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.form .inline .col {
  flex: 1;
  min-width: 200px;
}

/* Mobile App Shell - Fully Responsive */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.app-header .bar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(52px, 10vw, 60px);
  font-weight: 700;
  font-size: clamp(0.95rem, 2.5vw, 1.2rem);
  padding: 0 var(--space-md);
  position: relative;
}

.app-body {
  flex: 1;
  padding: clamp(12px, 3vw, 20px);
  padding-bottom: 100px !important;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.safe-bottom {
  height: clamp(20px, 5vw, 40px);
}

@media (min-width: 768px) {
  .app-header .bar {
    height: 60px;
    font-size: 1.2rem;
  }
  
  .app-body {
    padding: var(--space-lg);
    padding-bottom: 120px !important;
  }
}

@media (min-width: 1024px) {
  .app-body {
    padding: var(--space-xl);
  }
}

/* Bottom Navigation - Fully Responsive */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 99;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-sm) 0;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-light);
  transition: var(--transition);
  padding: var(--space-sm);
  min-width: 60px;
  flex: 1;
}

.bottom-nav-item:hover {
  text-decoration: none;
  color: var(--primary);
}

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

.bottom-nav-icon {
  font-size: clamp(18px, 4vw, 22px);
  margin-bottom: var(--space-xs);
}

.bottom-nav-label {
  font-size: clamp(10px, 2vw, 12px);
  font-weight: 500;
  text-align: center;
}

@media (min-width: 768px) {
  .bottom-nav-inner {
    max-width: 800px;
    padding: var(--space-md) 0;
  }
  
  .bottom-nav-item {
    min-width: 80px;
  }
  
  .bottom-nav-icon {
    font-size: 24px;
  }
  
  .bottom-nav-label {
    font-size: 13px;
  }
}

/* Mobile device specific fixes */
@media (max-width:520px){
  .container{padding:12px}
  .app-body{padding-bottom:140px !important}
  .app-body-with-nav{padding-bottom:140px !important}
  body{padding-bottom:env(safe-area-inset-bottom)}
}

@media (max-width:375px){
  .app-body{padding-bottom:150px !important}
  .app-body-with-nav{padding-bottom:150px !important}
  .app-body{padding:12px}
  .hero-card{max-width:100%}
}

/* Page-specific backgrounds */
body.login-page{background:var(--yellow)}
body.login-page .app{background:transparent}
body.register-page{background:var(--yellow)}

/* Dashboard option cards */
.dashboard-options{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}
.option-card{display:block;background:var(--card);padding:20px;border-radius:12px;border:1px solid var(--border);box-shadow:var(--shadow);text-align:center;text-decoration:none;color:inherit;transition:transform .2s}
.option-card:hover{transform:translateY(-4px);box-shadow:0 12px 30px rgba(0,0,0,.12)}
.option-icon{color:var(--teal);margin-bottom:12px}
.option-card h3{margin:0 0 6px 0;color:var(--teal);font-size:18px}
.option-card p{margin:0;font-size:14px;color:var(--muted)}

/* Provider list */
.provider-item{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid var(--border)}
.provider-item:last-child{border-bottom:none}

@media (max-width:520px){
  .dashboard-options{grid-template-columns:1fr}
}

/* Service categories */
.service-categories{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:16px}
.category-card{display:block;background:var(--card);padding:20px;border-radius:12px;border:1px solid var(--border);box-shadow:var(--shadow);text-align:center;text-decoration:none;color:inherit;transition:transform .2s}
.category-card:hover{transform:translateY(-4px);box-shadow:0 12px 30px rgba(0,0,0,.12)}
.category-icon{font-size:48px;margin-bottom:8px}
.category-card h3{margin:0;color:var(--teal);font-size:16px}

/* Status badges */
.status-badge{display:inline-block;padding:6px 12px;border-radius:20px;font-size:12px;font-weight:700}
.status-pending{background:#fef3c7;color:#92400e}
.status-accepted{background:#dbeafe;color:#1e40af}
.status-in_progress{background:#fef3c7;color:#92400e}
.status-completed{background:#d1fae5;color:#065f46}
.status-rejected{background:#fee2e2;color:#991b1b}

/* Bottom Navigation */
.bottom-nav{position:fixed;bottom:0;left:0;right:0;background:var(--card);border-top:1px solid var(--border);box-shadow:0 -2px 10px rgba(0,0,0,.1);z-index:1000;max-width:480px;margin:0 auto;padding-bottom:env(safe-area-inset-bottom)}
.bottom-nav-inner{display:flex;justify-content:space-around;padding:8px 0}
.bottom-nav-item{display:flex;flex-direction:column;align-items:center;padding:8px 12px;text-decoration:none;color:var(--muted);transition:color .2s;min-height:60px;justify-content:center}
.bottom-nav-item.active{color:var(--teal)}
.bottom-nav-item:hover{color:var(--teal)}
.bottom-nav-icon{font-size:20px;margin-bottom:2px}
.bottom-nav-label{font-size:10px;font-weight:600}
.app-body-with-nav{padding-bottom:120px !important;min-height:100vh}
@media (min-width: 768px) {
  .bottom-nav-inner{padding:8px 0}
  .bottom-nav-item{padding:8px 16px}
  .bottom-nav-icon{font-size:24px;margin-bottom:4px}
  .bottom-nav-label{font-size:11px}
  .app-body-with-nav{padding-bottom:120px !important}
}
