/* AGI Forms — Custom styles (extends Tailwind) */

:root {
  --agi-red: #DC2626;
  --agi-red-dark: #B91C1C;
  --agi-yellow: #F59E0B;
  --agi-green: #10B981;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #F9FAFB;
  min-height: 100vh;
}

/* Header */
.agi-header {
  background: linear-gradient(135deg, var(--agi-red) 0%, var(--agi-red-dark) 100%);
  color: white;
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.agi-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Dashboard cards */
.form-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.form-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.form-card .card-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.form-card .card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1F2937;
}

.form-card .card-desc {
  font-size: 0.8rem;
  color: #6B7280;
  margin-top: 0.25rem;
}

/* Form pages */
.form-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.375rem;
}

.form-group label .required {
  color: var(--agi-red);
  margin-left: 2px;
}

.form-group .help-text {
  font-size: 0.75rem;
  color: #9CA3AF;
  margin-top: 0.25rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #D1D5DB;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  background: white;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--agi-red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.form-group input.error,
.form-group select.error {
  border-color: var(--agi-red);
}

.form-group .error-text {
  font-size: 0.75rem;
  color: var(--agi-red);
  margin-top: 0.25rem;
}

/* File upload */
.file-upload {
  border: 2px dashed #D1D5DB;
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s;
}

.file-upload:hover {
  border-color: var(--agi-red);
}

.file-upload.has-file {
  border-color: var(--agi-green);
  border-style: solid;
}

.file-preview {
  margin-top: 0.5rem;
}

.file-preview img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 0.375rem;
}

/* Buttons */
.btn-primary {
  background: var(--agi-red);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.15s;
}

.btn-primary:hover {
  background: var(--agi-red-dark);
}

.btn-primary:disabled {
  background: #9CA3AF;
  cursor: not-allowed;
}

.btn-primary.loading {
  position: relative;
  color: transparent;
}

.btn-primary.loading::after {
  content: "";
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  top: 50%;
  left: 50%;
  margin-top: -0.625rem;
  margin-left: -0.625rem;
  border: 3px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  color: white;
  font-weight: 500;
  font-size: 0.875rem;
  z-index: 1000;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background: var(--agi-green);
}

.toast.error {
  background: var(--agi-red);
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: #6B7280;
  text-decoration: none;
  padding: 0.5rem 0;
}

.back-link:hover {
  color: var(--agi-red);
}

/* Employee view card */
.detail-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.detail-card h3 {
  font-size: 0.8rem;
  font-weight: 600;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.375rem 0;
  border-bottom: 1px solid #F3F4F6;
  font-size: 0.875rem;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row .label {
  color: #6B7280;
}

.detail-row .value {
  color: #1F2937;
  font-weight: 500;
  text-align: right;
}
