/* Reset and Base Styles */

:root {
  color-scheme: only light;
  background: #ffffff;
}



* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f3f6f8;
  color: #222222;
  line-height: 1.5;
  font-size: 18px;
  min-height: 100vh;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: white;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Header Styles */
.app-header {
  background: linear-gradient(135deg, #0077b5, #005885);
  color: white;
  padding: 2rem 1.5rem;
  text-align: center;
}

.app-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.app-header p {
  font-size: 16px;
  opacity: 0.9;
}

.page-header {
  background: #0077b5;
  color: white;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 600;
}

.back-button {
  color: white;
  text-decoration: none;
  font-size: 18px;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.back-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Main Menu */
.main-menu {
  padding: 2rem 1.5rem;
}

.menu-grid {
  display: grid;
  gap: 1.5rem;
}

.menu-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  color: white;
  font-weight: 600;
  font-size: 20px;
  min-height: 120px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.menu-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.menu-button .icon {
  font-size: 48px;
  margin-bottom: 0.5rem;
}

.menu-button.primary {
  background: linear-gradient(135deg, #0077b5, #005885);
}

.menu-button.secondary {
  /* background: linear-gradient(135deg, #6c757d, #495057); */
  background: linear-gradient(135deg, #0077b5, #005885);
}

.menu-button.success {
  /* background: linear-gradient(135deg, #28a745, #1e7e34); */
  background: linear-gradient(135deg, #0077b5, #005885);
}

.menu-button.admin {
  /* background: linear-gradient(135deg, #6f42c1, #5a32a3); */
  background: linear-gradient(135deg, #0077b5, #005885);
}


/* Form Styles */
.form-container {
  padding: 2rem 1.5rem;
}

.clock-form,
.confirm-form {
  max-width: 100%;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #222222;
  font-size: 18px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 18px;
  background-color: #ffffff;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0077b5;
  box-shadow: 0 0 0 3px rgba(0, 119, 181, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Location Status */
.location-status {
  background: #e3f2fd;
  border: 1px solid #bbdefb;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.location-status.success {
  background: #e8f5e8;
  border-color: #c3e6c3;
  color: #2e7d32;
}

.location-status.error {
  background: #ffebee;
  border-color: #ffcdd2;
  color: #c62828;
}

/* Buttons */
.submit-button {
  width: 100%;
  padding: 1.2rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 60px;
}

.submit-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.submit-button.primary {
  background: linear-gradient(135deg, #0077b5, #005885);
}

.submit-button.secondary {
  background: linear-gradient(135deg, #6c757d, #495057);
}

.submit-button.success {
  background: linear-gradient(135deg, #28a745, #1e7e34);
}

.loading-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Signature Section */
.signature-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 2px dashed #dee2e6;
}

.signature-section h3 {
  color: #0077b5;
  margin-bottom: 0.5rem;
  font-size: 20px;
}

.signature-section p {
  margin-bottom: 1rem;
  color: #6c757d;
}

.signature-container {
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

#signatureCanvas {
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: crosshair;
  max-width: 100%;
  height: auto;
  touch-action: none;
}

.signature-controls {
  margin-top: 1rem;
}

.clear-button {
  background: #dc3545;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.clear-button:hover {
  background: #c82333;
}

/* Messages */
.success-message {
  text-align: center;
  padding: 2rem;
  background: #e8f5e8;
  border-radius: 12px;
  border: 2px solid #28a745;
}

.success-message h2 {
  color: #28a745;
  font-size: 24px;
  margin-bottom: 1rem;
}

.success-message p {
  color: #2e7d32;
  margin-bottom: 1.5rem;
}

.error-message-box {
  text-align: center;
  padding: 2rem;
  background: #ffebee;
  border-radius: 12px;
  border: 2px solid #dc3545;
}

.error-message-box h3 {
  color: #dc3545;
  font-size: 20px;
  margin-bottom: 1rem;
}

.error-message-box p {
  color: #c62828;
  margin-bottom: 1.5rem;
}

.error-message {
  color: #dc3545;
  font-size: 14px;
  margin-top: 0.5rem;
  display: none;
}

.error-message.show {
  display: block;
}

/* Action Buttons */
.return-button,
.retry-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: #0077b5;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background-color 0.2s;
  border: none;
  font-size: 16px;
  cursor: pointer;
}

.return-button:hover,
.retry-button:hover {
  background: #005885;
}

/* Footer */
.app-footer {
  padding: 2rem 1.5rem;
  text-align: center;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
}

.app-footer p {
  color: #6c757d;
  font-size: 16px;
  margin-bottom: 1rem;
}

.install-button {
  background: #28a745;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.install-button:hover {
  background: #1e7e34;
}

/* Responsive Design */
@media (max-width: 480px) {
  .container {
    box-shadow: none;
  }

  .form-container {
    padding: 1.5rem 1rem;
  }

  .main-menu {
    padding: 1.5rem 1rem;
  }

  #signatureCanvas {
    width: 100%;
    max-width: 300px;
  }
}

/* PWA Specific Styles */
@media (display-mode: standalone) {
  .app-header {
    padding-top: 3rem; /* Account for status bar */
  }
}

/* Dark mode support */
/*
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1a1a1a;
    color: #ffffff;
  }

  .container {
    background: #2d2d2d;
  }

  .form-group input,
  .form-group textarea {
    background-color: #3d3d3d;
    border-color: #555;
    color: white;
  }

  .signature-section {
    background: #3d3d3d;
    border-color: #555;
  }

  .signature-container {
    background: #4d4d4d;
    border-color: #666;
  }
}
*/