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

/* Base Setup and Global Styles */
.body {
  font-family: "Inter", sans-serif;
  background-color: #f8fafc; /* Light gray background */
  padding: 1rem;
}
@media (min-width: 1024px) {
  /* Desktop padding */
  body {
    padding: 2rem;
  }
}

.main-container {
  max-width: 56rem; /* Equivalent to max-w-4xl */
  margin-left: auto;
  margin-right: auto;
}

/* --- Header Styles --- */
.header-section {
  text-align: center;
  margin-bottom: 2rem;
}

.header-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: #4338ca;
  letter-spacing: -0.025em;
}

.header-subtitle {
  color: #6b7280;
  margin-top: 0.25rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1.5rem;
}

.border-bottom {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.75rem;
}

/* --- Form Styles --- */
.form-section {
  margin-bottom: 3rem;
  background-color: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid #f3f4f6;
}
@media (min-width: 1024px) {
  .form-section {
    padding: 2rem;
  }
}

.form-group-container {
  display: flex;
  flex-direction: column;
  row-gap: 1rem;
}

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

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  transition: all 0.15s ease-in-out;
}
.form-select {
  background-color: white;
}
.form-textarea {
  resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.5);
}

.form-grid-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 1024px) {
  .form-grid-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.form-file-input {
  width: 100%;
  font-size: 0.875rem;
  color: #6b7280;
}
.form-file-input::-webkit-file-upload-button,
.form-file-input::file-selector-button {
  margin-right: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 0;
  font-size: 0.875rem;
  font-weight: 600;
  background-color: #eef2ff;
  color: #4338ca;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}
.form-file-input::-webkit-file-upload-button:hover,
.form-file-input::file-selector-button:hover {
  background-color: #e0e7ff;
}

.form-submit-btn {
  width: 100%;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  background-color: #4f46e5;
  color: white;
  font-weight: 700;
  border-radius: 0.5rem;
  transition: background-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.06);
  border: none;
  cursor: pointer;
}
.form-submit-btn:hover {
  background-color: #4338ca;
}
.form-submit-btn:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.5);
}

/* --- Ticket List Styles --- */

.ticket-list {
  display: flex;
  flex-direction: column;
  row-gap: 1rem;
  padding: 0;
  list-style: none;
}

.ticket-header {
  display: none;
  font-size: 0.875rem;
  font-weight: 700;
  color: #4b5563;
  text-transform: uppercase;
  background-color: #f9fafb;
  padding: 0.75rem;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
@media (min-width: 1024px) {
  .ticket-header {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
  }
}

.ticket-card {
  background-color: white;
  padding: 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  transition: box-shadow 0.3s ease-in-out;
}
.ticket-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.closed-ticket {
  opacity: 0.7;
}

/* Mobile (Flex Stack) vs Desktop (Grid Row) */
.ticket-row {
  display: flex;
  flex-direction: column;
  row-gap: 0.5rem;
  align-items: flex-start;
}
@media (min-width: 1024px) {
  .ticket-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
    flex-direction: row;
    row-gap: 0;
    align-items: center;
  }
}

.ticket-col-main {
  display: flex;
  flex-direction: column;
  grid-column: span 1 / span 1;
}

.ticket-col {
  grid-column: span 1 / span 1;
}

.ticket-label-mobile {
  font-size: 0.75rem;
  font-weight: 600;
  color: #9ca3af;
  display: block;
}
@media (min-width: 1024px) {
  .ticket-label-mobile {
    display: none;
  }
}

.ticket-id {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
}

.ticket-subject {
  font-size: 0.875rem;
  color: #4b5563;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.priority-text {
  font-size: 0.875rem;
}

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

.action-btn {
  color: #4f46e5;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s ease-in-out;
  background: none;
  border: none;
  cursor: pointer;
}
.action-btn:hover {
  color: #3730a3;
}

/* --- Custom Status Classes --- */

.status-open {
  background-color: #fee2e2;
  color: #b91c1c;
}

.status-pending {
  background-color: #fef3c7;
  color: #b45309;
}

.status-closed {
  background-color: #d1fae5;
  color: #047857;
}

/* --- Priority Text Styles --- */

.priority-high {
  color: #dc2626;
  font-weight: 700;
}

.priority-medium {
  color: #d97706;
}

.priority-low {
  color: #6b7280;
}
