/* Pelika Support Ticket System - Optimized Styles */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Montserrat:wght@400;600;700&display=swap");

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Roboto", Arial, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: white;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Dynamic Background */
.dynamic-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #3498db, #8e44ad);
  z-index: -1;
}

.dynamic-background::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle, transparent 20%, #000 80%);
  opacity: 0.7;
}

/* Redesigned compact sticky header for better mobile experience */
.main-header {
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(15px);
  border-bottom: 2px solid rgba(76, 175, 80, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-logo {
  height: 40px;
  width: auto;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 0 10px rgba(76, 175, 80, 0.3));
}

.header-logo:hover {
  transform: scale(1.05);
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-title {
  font-family: "Montserrat", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #4caf50, #81c784);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.header-subtitle {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  font-weight: 400;
}

.header-right {
  display: flex;
  align-items: center;
}

.support-badge {
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(76, 175, 80, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Legacy header styles for backward compatibility */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(30, 30, 30, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

header img {
  height: 40px;
  transition: transform 0.3s ease;
}

header img:hover {
  transform: scale(1.05);
}

header h1 {
  flex-grow: 1;
  text-align: center;
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
  letter-spacing: 0.5px;
  font-size: 1.4rem;
}

/* Main Container */
main {
  width: 90%;
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
}

/* Glass Container Effect */
.container,
.admin-panel,
.config-section {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 30px;
  margin: 20px 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.container:hover,
.admin-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Added form header styling for better visual hierarchy */
.form-header,
.tickets-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.form-header h2,
.tickets-header h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #4caf50;
}

.form-header p,
.tickets-header p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  margin: 0;
}

/* Enhanced form styles with better spacing and visual feedback */
.ticket-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 25px;
}

.form-label {
  margin-bottom: 8px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.required-asterisk {
  color: #ff5722;
  font-weight: bold;
}

/* Added required field legend styling */
.required-legend {
  margin-top: 15px;
  padding: 10px 15px;
  background: rgba(255, 87, 34, 0.1);
  border: 1px solid rgba(255, 87, 34, 0.3);
  border-radius: 8px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.required-legend .required-asterisk {
  font-size: 1.1rem;
}

/* Custom dropdown styling for better UX */
.custom-select-wrapper {
  position: relative;
  display: block;
}

.custom-select {
  width: 100%;
  padding: 15px 45px 15px 15px;
  margin: 8px 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 16px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  appearance: none;
  cursor: pointer;
}

.custom-select:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

.custom-select option {
  background: #2a2a2a;
  color: white;
  padding: 10px;
}

.select-arrow {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
}

.custom-select:focus + .select-arrow {
  color: #4caf50;
  transform: translateY(-50%) rotate(180deg);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 15px;
  margin: 8px 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 16px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

/* Legacy form styles for backward compatibility */
label {
  margin-bottom: 8px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
}

input,
textarea {
  width: 100%;
  padding: 15px;
  margin: 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 16px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 15px rgba(76, 175, 80, 0.3);
  background: rgba(255, 255, 255, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

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

/* Fixed status dropdown styling for better readability */
select {
  width: 100%;
  padding: 15px;
  margin: 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(30, 30, 30, 0.9);
  color: white;
  font-size: 16px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

select:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 15px rgba(76, 175, 80, 0.3);
  background: rgba(40, 40, 40, 0.95);
}

select option {
  background: #2a2a2a;
  color: white;
  padding: 10px;
  border: none;
}

/* Enhanced button styling with icons and better hover effects */
button,
.submit-button,
.nav-button {
  padding: 15px 25px;
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
  position: relative;
  overflow: hidden;
}

button:hover,
.submit-button:hover,
.nav-button:hover {
  background: linear-gradient(135deg, #45a049, #4caf50);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

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

.logout-btn {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

.logout-btn:hover {
  background: linear-gradient(135deg, #b71c1c, #d32f2f);
  box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4);
}

/* Enhanced admin link with icon */
.admin-link {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #6200ea, #3700b3);
  color: white;
  padding: 15px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(98, 0, 234, 0.4);
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-link:hover {
  background: linear-gradient(135deg, #3700b3, #6200ea);
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(98, 0, 234, 0.5);
}

/* Ticket Styles */
.ticket {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 20px;
  margin: 15px 0;
  border-radius: 12px;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.ticket:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.15);
}

/* Enhanced ticket card styles with better status display and layout */
.ticket-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 25px;
  margin: 15px 0;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.ticket-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(76, 175, 80, 0.4);
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ticket-date {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.ticket-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.status-warten {
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: white;
}

.status-erfasst {
  background: linear-gradient(135deg, #2196f3, #1976d2);
  color: white;
}

.status-bearbeitung {
  background: linear-gradient(135deg, #9c27b0, #7b1fa2);
  color: white;
}

.status-erledigt {
  background: linear-gradient(135deg, #4caf50, #388e3c);
  color: white;
}

.ticket-content {
  margin-bottom: 20px;
}

.ticket-field {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ticket-field strong {
  color: #4caf50;
  min-width: 120px;
  font-weight: 600;
}

.ticket-field span {
  color: rgba(255, 255, 255, 0.9);
  flex: 1;
  word-break: break-word;
}

.ticket-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.change-button {
  background: linear-gradient(135deg, #6200ea, #3700b3);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 12px rgba(98, 0, 234, 0.3);
}

.change-button:hover {
  background: linear-gradient(135deg, #3700b3, #6200ea);
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(98, 0, 234, 0.4);
}

.change-button svg {
  transition: transform 0.3s ease;
}

.change-button:hover svg {
  transform: translateX(2px);
}

.no-tickets {
  text-align: center;
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
}

.no-tickets p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  margin: 0;
}

/* Ticket Grid for Desktop */
.tickets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Navigation */
.navigation,
.nav-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.nav-links a {
  color: white;
  text-decoration: none;
  padding: 12px 20px;
  border: 2px solid rgba(98, 0, 234, 0.6);
  border-radius: 10px;
  background: rgba(98, 0, 234, 0.2);
  transition: all 0.3s ease;
  font-weight: 500;
}

.nav-links a:hover {
  background: rgba(98, 0, 234, 0.8);
  border-color: #6200ea;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(98, 0, 234, 0.3);
}

/* Messages */
.message {
  padding: 15px;
  margin: 15px 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
  text-align: center;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.error {
  padding: 15px;
  margin: 15px 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #f44336, #d32f2f);
  color: white;
  text-align: center;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

/* Config Sections */
.config-section {
  margin: 25px 0;
  background: rgba(42, 42, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.config-section h3 {
  margin-top: 0;
  color: #6200ea;
  text-shadow: 0 0 10px rgba(98, 0, 234, 0.3);
}

/* Added field configuration styles for admin panel */
.field-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.field-config-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px;
  transition: all 0.3s ease;
}

.field-config-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(76, 175, 80, 0.3);
}

.field-config-item h4 {
  margin: 0 0 15px 0;
  color: #4caf50;
  font-size: 1.1rem;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
}

.checkbox-label:hover {
  color: white;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
  transform: scale(1.2);
  accent-color: #4caf50;
}

.checkmark {
  font-weight: 500;
}

/* Responsive Design optimized for mobile */
@media (max-width: 768px) {
  /* Compact mobile header */
  .main-header .header-content {
    padding: 10px 15px;
    gap: 10px;
  }

  .header-left {
    gap: 10px;
  }

  .header-logo {
    height: 35px;
  }

  .header-title {
    font-size: 1.2rem;
  }

  .header-subtitle {
    font-size: 0.7rem;
  }

  .support-badge {
    font-size: 0.7rem;
    padding: 5px 10px;
  }

  header {
    padding: 10px 15px;
  }

  header h1 {
    font-size: 1.2rem;
  }

  header img {
    height: 35px;
  }

  main {
    width: 95%;
    padding: 10px;
    margin: 10px auto;
  }

  .container,
  .admin-panel {
    padding: 20px;
    margin: 15px 0;
  }

  .form-header h2,
  .tickets-header h2 {
    font-size: 1.5rem;
  }

  .form-header p,
  .tickets-header p {
    font-size: 0.9rem;
  }

  .tickets-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .navigation,
  .nav-links {
    flex-direction: column;
    align-items: center;
  }

  .admin-link {
    bottom: 20px;
    right: 20px;
    padding: 12px 16px;
    font-size: 12px;
  }

  .custom-select,
  .form-input,
  .form-textarea,
  input,
  textarea {
    padding: 12px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .custom-select {
    padding-right: 40px;
  }

  button,
  .submit-button,
  .nav-button {
    padding: 12px 20px;
    width: 100%;
    margin: 5px 0;
  }

  .ticket-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .ticket-field {
    flex-direction: column;
    gap: 4px;
  }

  .ticket-field strong {
    min-width: auto;
  }

  .ticket-actions {
    justify-content: center;
  }

  .change-button {
    width: 100%;
    justify-content: center;
  }

  .field-config-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .main-header .header-content {
    padding: 8px 12px;
  }

  .header-logo {
    height: 30px;
  }

  .header-title {
    font-size: 1.1rem;
  }

  .header-subtitle {
    display: none; /* Hide subtitle on very small screens */
  }

  .container,
  .admin-panel {
    padding: 15px;
    margin: 10px 0;
  }

  .form-header h2,
  .tickets-header h2 {
    font-size: 1.3rem;
  }

  header img {
    height: 30px;
  }

  .admin-link {
    position: relative;
    bottom: auto;
    right: auto;
    margin: 20px auto;
    display: block;
    text-align: center;
    border-radius: 10px;
  }
}

/* Loading Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ticket,
.container,
.admin-panel {
  animation: fadeIn 0.6s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(98, 0, 234, 0.6);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(98, 0, 234, 0.8);
}
