/* Equipment Reporting Forms - Shared Styles */
/* Modern, clean design with Platerraform branding */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #059669;
  --error: #dc2626;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-700: #374151;
  --gray-900: #111827;
  --border-radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  line-height: 1.6;
  color: var(--gray-900);
}

.container {
  max-width: 600px;
  width: 100%;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.form-header {
  background: var(--primary);
  color: white;
  padding: 32px 24px;
  text-align: center;
}

.form-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.form-header p {
  font-size: 16px;
  opacity: 0.95;
}

.form-body {
  padding: 32px 24px;
}

.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--gray-700);
  font-size: 14px;
}

label .required {
  color: var(--error);
  margin-left: 4px;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  font-size: 16px;
  transition: all 0.2s;
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 20px;
  padding-right: 40px;
}

.submit-btn {
  width: 100%;
  padding: 14px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.submit-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

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

.submit-btn:disabled {
  background: var(--gray-300);
  cursor: not-allowed;
  transform: none;
}

.message {
  padding: 16px;
  border-radius: var(--border-radius);
  margin-bottom: 24px;
  font-size: 14px;
  display: none;
}

.message.success {
  background: #d1fae5;
  border: 1px solid var(--success);
  color: #065f46;
}

.message.error {
  background: #fee2e2;
  border: 1px solid var(--error);
  color: #991b1b;
}

.message.show {
  display: block;
}

.loading {
  display: none;
  text-align: center;
  padding: 20px;
}

.loading.show {
  display: block;
}

.spinner {
  border: 3px solid var(--gray-200);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.form-footer {
  background: var(--gray-50);
  padding: 20px 24px;
  text-align: center;
  font-size: 14px;
  color: var(--gray-700);
  border-top: 1px solid var(--gray-200);
}

.helper-text {
  font-size: 13px;
  color: var(--gray-700);
  margin-top: 6px;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

.lang-btn {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
  min-width: 40px;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.lang-btn.active {
  background: white;
  color: var(--primary);
  border-color: white;
}

.lang-btn:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* RTL Support */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .form-group {
  direction: rtl;
}

[dir="rtl"] select {
  background-position: left 12px center;
  padding-left: 40px;
  padding-right: 16px;
}

[dir="rtl"] label .required {
  margin-right: 4px;
  margin-left: 0;
}

[dir="rtl"] .helper-text {
  text-align: right;
}

[dir="rtl"] .message {
  text-align: right;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .container {
    border-radius: 0;
  }
  
  .form-header h1 {
    font-size: 24px;
  }
  
  .form-body {
    padding: 24px 16px;
  }
  
  .lang-switcher {
    gap: 4px;
  }
  
  .lang-btn {
    padding: 4px 8px;
    font-size: 11px;
    min-width: 35px;
  }
}

