/* Login layout */
body.login-page {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f3f4f6;
  color: #111827;
}

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  background-color: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
  max-width: 420px;
  width: 100%;
  padding: 2rem;
}

.login-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.app-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.app-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: #6b7280;
}

/* Form elements */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.875rem;
  color: #374151;
}

.form-group input {
  padding: 0.65rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
}

/* Password toggle */
.password-wrapper {
  display: flex;
  align-items: stretch;
}

.password-wrapper input {
  flex: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.password-toggle {
  border: 1px solid #d1d5db;
  border-left: none;
  background-color: #f9fafb;
  padding: 0 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  border-top-right-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
  color: #4b5563;
}

.password-toggle:hover {
  background-color: #e5e7eb;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: 0.5rem;
  border: none;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.btn-primary {
  background-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.btn:disabled {
  opacity: 0.7;
  cursor: default;
  box-shadow: none;
}

/* Error message */
.login-error {
  min-height: 1.2rem;
  font-size: 0.85rem;
  color: #b91c1c;
}

/* Manager page layout */
body.manager-page {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f3f4f6;
  color: #111827;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.topbar-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.page-content {
  max-width: 1100px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

/* Metrics */
.metrics-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.metric-card {
  background-color: #ffffff;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.metric-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

.metric-value {
  margin-top: 0.25rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.metric-pending .metric-value {
  color: #ea580c;
}

.metric-completed .metric-value {
  color: #16a34a;
}

/* Actions */
.actions-section {
  margin: 1.25rem 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  border: none;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-outline {
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  color: #374151;
}

.btn-outline:hover {
  background-color: #f3f4f6;
}

.btn:disabled {
  opacity: 0.7;
  cursor: default;
}

/* Table */
.table-section {
  margin-top: 1rem;
  background-color: #ffffff;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.table-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.table-status {
  font-size: 0.8rem;
  color: #6b7280;
}

.table-wrapper {
  overflow-x: auto;
}

.jobs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.jobs-table th,
.jobs-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  white-space: nowrap;
}

.jobs-table th {
  
  font-size: 0.8rem;
  color: black;
}

.jobs-table tbody tr:hover {
  background-color: #f9fafb;
}

.jobs-table td:nth-child(5) {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Empty and error messages */
.table-empty {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: black;
}

.table-error {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #b91c1c;
}

.form-section {
  background-color: #ffffff;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  max-width: 600px;
}

.job-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-error {
  min-height: 1rem;
  font-size: 0.85rem;
  color: #b91c1c;
}

.form-success {
  min-height: 1rem;
  font-size: 0.85rem;
  color: #16a34a;
}

/* Add to main.css */

/* Action buttons in table */
.actions {
  white-space: nowrap;
  text-align: right;
}

.btn-view, .btn-delete {
  padding: 4px 8px;
  margin-left: 4px;
  font-size: 0.875rem;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
}

.btn-view:hover { background: #e3f2fd; }
.btn-delete:hover { background: #ffebee; color: #d32f2f; }

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
}

.modal.active {
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.modal-body {
  padding: 20px;
}

.detail-row {
  display: flex;
  margin-bottom: 16px;
  gap: 12px;
  align-items: flex-start;
}

.detail-row label {
  font-weight: 600;
  min-width: 80px;
  color: #333;
}

.detail-row span, .detail-row div {
  flex: 1;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #e9ecef;
}

.detail-row input, .detail-row select, .detail-row textarea {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
}

.full-width label {
  align-self: stretch;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.hidden { display: none !important; }

/* Add to main.css */
.error-panel {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fee;
  border: 1px solid #fcc;
  border-radius: 6px;
  margin: 10px 0;
  font-size: 0.9rem;
}

.error-header {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.error-status {
  background: #dc3545;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
}

.error-message {
  flex: 1;
  color: #721c24;
  font-weight: 500;
}

.error-details {
  display: none;
  padding: 0 12px 12px;
  background: #f8d7da;
}

.error-details.active {
  display: block;
}

#dismiss-error {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #6c757d;
}

.filters-row {
  display: flex;
  gap: 12px;
  align-items: end;
  margin: 20px 0;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #495057;
}

.filter-group select {
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  background: white;
  min-width: 140px;
}

.filter-count {
  margin-left: auto;
  font-weight: 500;
  color: #6c757d;
}


/* Base pill style for status */
.status-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Status variants (background highlight + color) */
.status-pending {
  background-color: #fff7ed; /* light orange */
  color: #c05621;
}

.status-acknowledged {
  background-color: #eff6ff; /* light blue */
  color: #1d4ed8;
}

.status-assigned,
.status-in-progress {
  background-color: #ecfeff; /* light cyan */
  color: #0e7490;
}

.status-completed {
  background-color: #ecfdf5; /* light green */
  color: #15803d;
}

.status-cancelled {
  background-color: #f3f4f6; /* light gray */
  color: #4b5563;
}

/* Urgency font colors only */
.urgency-low {
  color: #4b5563; /* gray */
}

.urgency-medium {
  color: #ca8a04; /* amber */
}

.urgency-high {
  color: #dc2626; /* red */
}

.urgency-critical {
  color: #b91c1c; /* darker red */
  font-weight: 600;
}


@media (max-width: 768px) {
  .filters-row {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-group {
    flex-direction: row;
    align-items: center;
  }
  .filter-group label {
    min-width: 60px;
  }
}


@media (max-width: 768px) {
  .modal-content { width: 95%; }
  .detail-row { flex-direction: column; }
}



/* Responsive */
@media (max-width: 768px) {
  .metrics-section {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: row;
  }
}


/* Small screens */
@media (max-width: 480px) {
  .login-card {
    padding: 1.5rem;
    box-shadow: none;
    border-radius: 0.5rem;
  }

  .app-title {
    font-size: 1.3rem;
  }
}

