/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== Navbar ===== */
.navbar {
  background: #1a1a2e;
  color: #fff;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-brand a {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-links a {
  color: #cbd5e1;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #fff;
  text-decoration: none;
}

.nav-user {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-left: 8px;
}

.admin-link {
  color: #fbbf24 !important;
  font-weight: 600;
}

.btn-logout {
  background: #ef4444;
  color: #fff !important;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.85rem;
}

.btn-logout:hover {
  background: #dc2626;
  text-decoration: none;
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  flex: 1;
  width: 100%;
}

/* ===== Auth Container ===== */
.auth-container {
  max-width: 450px;
  margin: 40px auto;
  background: #fff;
  padding: 32px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.auth-container h1 {
  margin-bottom: 24px;
  color: #1a1a2e;
  font-size: 1.5rem;
}

/* ===== Forms ===== */
.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input:disabled {
  background: #f3f4f6;
  color: #6b7280;
}

.char-count {
  font-size: 0.8rem;
  color: #6b7280;
}

.form-footer {
  text-align: center;
  margin-top: 16px;
  color: #6b7280;
  font-size: 0.9rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: #2563eb;
  color: #fff;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: #6b7280;
  color: #fff;
}

.btn-secondary:hover {
  background: #4b5563;
}

.btn-admin {
  background: #f59e0b;
  color: #1a1a2e;
}

.btn-admin:hover {
  background: #d97706;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-small {
  padding: 5px 12px;
  font-size: 0.8rem;
}

/* ===== Alerts ===== */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* ===== Tables ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.table th,
.table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.9rem;
}

.table th {
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
}

.table tbody tr:hover {
  background: #f9fafb;
}

.detail-table th {
  width: 200px;
  background: #f3f4f6;
}

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-progress {
  background: #dbeafe;
  color: #1e40af;
}

.badge-closed {
  background: #dcfce7;
  color: #166534;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
}

/* ===== Dashboard ===== */
.dashboard {
  text-align: center;
  padding: 40px 0;
}

.dashboard h1 {
  font-size: 2rem;
  margin-bottom: 12px;
  color: #1a1a2e;
}

.dashboard p {
  font-size: 1.1rem;
  color: #4b5563;
  margin-bottom: 32px;
}

.dashboard-logo {
  max-width: 180px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
}


.dashboard-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Ticket Detail ===== */
.ticket-detail {
  max-width: 800px;
  margin: 0 auto;
}

.ticket-detail h1 {
  margin-bottom: 20px;
}

.ticket-info {
  margin-bottom: 24px;
}

.admin-section,
.updates-section,
.user-comment-section {
  margin-top: 32px;
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.admin-section h2,
.updates-section h2,
.user-comment-section h2 {
  margin-bottom: 16px;
  font-size: 1.2rem;
  color: #1a1a2e;
}

.user-comment-section .char-hint {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 0.8rem;
}

.updates-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.update-item {
  padding: 12px 16px;
  background: #f9fafb;
  border-left: 3px solid #2563eb;
  border-radius: 0 6px 6px 0;
}

.update-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.update-date {
  color: #6b7280;
  font-size: 0.85rem;
}

/* ===== Admin Dashboard ===== */
.admin-dashboard section {
  margin-bottom: 32px;
}

.admin-dashboard h2 {
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e5e7eb;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.inline-form input,
.inline-form select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
}

.inline-form label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.edit-row td {
  background: #f9fafb;
  padding: 16px;
}

.action-buttons {
  display: flex;
  gap: 6px;
}

/* ===== Error Page ===== */
.error-container {
  text-align: center;
  padding: 60px 0;
}

.error-container h1 {
  color: #ef4444;
  margin-bottom: 16px;
}

.error-container p {
  margin-bottom: 24px;
  color: #4b5563;
}

/* ===== Form Container ===== */
.form-container {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  padding: 32px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.form-container h1 {
  margin-bottom: 24px;
}

/* ===== Tickets Container ===== */
.tickets-container {
  width: 100%;
}

.tickets-container h1 {
  margin-bottom: 16px;
}

/* ===== Reports ===== */
.reports-container {
  max-width: 800px;
  margin: 0 auto;
}

.reports-container h1 {
  margin-bottom: 8px;
}

.reports-container > p {
  color: #6b7280;
  margin-bottom: 24px;
}

.report-section {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.report-section h2 {
  font-size: 1.2rem;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.report-section > p {
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.report-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.btn-excel {
  background: #16a34a;
  color: #fff;
}

.btn-excel:hover {
  background: #15803d;
}

.btn-icon {
  margin-right: 4px;
}

.ticket-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
}

.text-muted {
  color: #9ca3af;
  font-style: italic;
}

/* ===== Footer ===== */
.footer {
  background: #1a1a2e;
  color: #94a3b8;
  text-align: center;
  padding: 16px;
  font-size: 0.85rem;
  margin-top: auto;
}

/* ===== Offerte ===== */
.offerte-container {
  width: 100%;
}

.offerte-container h1 {
  margin-bottom: 16px;
}

.badge-rejected {
  background: #fef2f2;
  color: #991b1b;
}

.badge-concept {
  background: #fef3c7;
  color: #92400e;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    height: auto;
    padding: 12px;
    gap: 10px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .dashboard-actions {
    flex-direction: column;
    align-items: center;
  }

  .table {
    font-size: 0.8rem;
  }

  .table th,
  .table td {
    padding: 8px;
  }

  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }
}
