* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  width: 80px;
  height: 80px;
}

.header-text h1 {
  font-size: 1.8rem;
  font-weight: bold;
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 10px 15px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.nav a:hover {
  background-color: rgba(255,255,255,0.2);
}

.hero {
  background: url('Background.png') center/cover;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.form-container {
  background: rgba(255, 255, 255, 0.9);
  padding: 30px;
  border-radius: 12px;
  width: 450px;
  max-width: 90vw;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.form-header {
  display: flex;
  margin-bottom: 20px;
}

.form-title {
  width: 100%;
  text-align: center;
  color: #b91c1c;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.tab {
  /* Gawing full width ang tab dahil isa na lang siya */
  flex: 1;
  padding: 10px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  /* Ipakita bilang colored text (hindi filled button) */
  background: transparent;
  color: #b91c1c;
  transition: color 0.15s ease, background 0.15s ease;
  border-radius: 8px 8px 0 0;
  text-align: left;
}

/* Hindi na kailangan ang .tab.active dahil laging active ang natitirang tab */
.tab:hover {
  /* Magdagdag ng hover state kung kinakailangan */
  color: #991b1b;
}

/* Make sure the active tab has a subtle underline to indicate current section */
.tab.active {
  background: transparent;
  color: #b91c1c;
  box-shadow: none;
  text-decoration: underline 3px rgba(185,28,28,0.15);
}

/* Keyboard focus for accessibility */
.tab:focus {
  outline: 3px solid rgba(185,28,28,0.15);
  outline-offset: 2px;
}

.form-body input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1px solid #ccc;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

/* Password wrapper for eye icon */
.password-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 15px;
}
.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
  padding-right: 40px;
  margin-bottom: 0;
}
.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 5px;
  font-size: 1.2em;
  color: #b91c1c;
  outline: none;
  z-index: 2;
}
.toggle-password:active {
  color: #991b1b;
}
.eye-icon {
  pointer-events: none;
}

.form-body input:focus {
  outline: none;
  border-color: #b91c1c;
}

/* Inalis ang .form-body input.error at .signup-text rules */

.forgot {
  display: block;
  margin-bottom: 15px;
  font-size: 0.9rem;
  text-align: right;
  color: #b91c1c;
  text-decoration: none;
}

.btn-submit {
  width: 100%;
  padding: 12px;
  background: #b91c1c;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-submit:hover {
  background: #991b1b;
}

/* Focus style for the submit button */
.btn-submit:focus {
  outline: 3px solid rgba(185,28,28,0.15);
  outline-offset: 2px;
}

/* Notification Styles - kailangan pa rin ito para sa sign-in error alert*/
.notification {
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: bold;
  text-align: center;
  animation: slideIn 0.3s ease-out;
}

.notification.error {
  background-color: #fee2e2;
  color: #dc2626;
  border: 1px solid #dc2626;
}

.notification.success {
  background-color: #dcfce7;
  color: #16a34a;
  border: 1px solid #16a34a;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 0;
    transform: translateY(0);
  }
}

/* Guide Content Styles */
.guide-content {
  text-align: center;
}

.guide-section {
  margin-bottom: 25px;
}

.guide-section h3 {
  color: #b91c1c;
  font-size: 1.1rem;
  margin-bottom: 15px;
  font-weight: 600;
  text-align: center;
}

.guide-section ol,
.guide-section ul {
  text-align: left;
  display: inline-block;
  margin: 0;
  padding: 0;
  line-height: 1.8;
}

.guide-section ol li {
  margin-bottom: 8px;
  padding-left: 5px;
  list-style-position: inside;
}

.guide-section ul li {
  margin-bottom: 5px;
  padding-left: 5px;
  list-style-position: inside;
}

.guide-section ol li strong {
  color: #b91c1c;
}

.guide-section p {
  margin-bottom: 5px;
  line-height: 1.6;
}

.request-button-container {
  text-align: center;
  margin-top: 30px;
}

.btn-request {
  display: inline-block;
  background: #b91c1c;
  color: white;
  padding: 15px 30px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1rem;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-request:hover {
  background: #991b1b;
  transform: translateY(-2px);
}

.services {
  padding: 80px 0;
  background-color: #f8fafc;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #1f2937;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.service-card {
  background: white;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.emergency-section {
  padding: 80px 0;
  background-color: #1f2937;
  color: white;
}

.emergency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
}

.emergency-card {
  background-color: #374151;
  padding: 30px;
  border-radius: 15px;
  border-left: 5px solid #dc2626;
}

.contact {
  padding: 80px 0;
  background-color: #f8fafc;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  text-align: center;
}

.contact-item {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    gap: 20px;
  }
  
  .services-grid,
  .emergency-grid,
  .contact-info {
    grid-template-columns: 1fr;
  }
}

/* Requests Section Styles */
.requests-section {
  padding: 80px 0;
  background: #f8f9fa;
}

.requests-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  gap: 20px;
}

.refresh-btn {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s;
}

.refresh-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.search-box input {
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  width: 300px;
  transition: border-color 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: #dc2626;
}

.requests-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.request-card {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.2s;
}

.request-card:hover {
  background-color: #f9fafb;
}

.request-card:last-child {
  border-bottom: none;
}

.request-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.request-app-no {
  font-weight: bold;
  color: #dc2626;
  font-size: 18px;
}

.request-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

.status-pending {
  background: #dbeafe;
  color: #1e40af;
}

.status-scheduled {
  background: #dcfce7;
  color: #166534;
}

.status-completed {
  background: #f3e8ff;
  color: #7c3aed;
}

.request-details {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
}

.detail-item {
  color: #6b7280;
}

.detail-label {
  font-weight: bold;
  color: #374151;
}

.request-actions {
  display: flex;
  gap: 12px;
}

.show-details-btn {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.show-details-btn:hover {
  background: #2563eb;
}

.loading-state, .no-requests {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-left: 4px solid #dc2626;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 12px;
  max-width: 800px;
  max-height: 90vh;
  width: 90%;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 12px 12px 0 0;
}

.modal-header h3 {
  color: #dc2626;
  font-size: 20px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  color: #dc2626;
}

.modal-body {
  padding: 20px;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.details-section {
  background: #f9fafb;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.details-section h4 {
  color: #dc2626;
  margin-bottom: 12px;
  font-size: 16px;
  border-bottom: 2px solid #dc2626;
  padding-bottom: 4px;
}

.detail-row {
  display: flex;
  margin-bottom: 8px;
}

.detail-row strong {
  min-width: 140px;
  color: #374151;
}

.detail-row span {
  color: #6b7280;
}

@media (max-width: 768px) {
  .requests-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-box input {
    width: 100%;
  }
  
  .request-details {
    grid-template-columns: 1fr;
  }
  
  .details-grid {
    grid-template-columns: 1fr;
  }
}