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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #72bf45 0%, #5a9936 100%);
  min-height: 100vh;
  padding: 20px;
}

.screen {
  display: block;
}

.screen.hidden {
  display: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

h1 {
  color: #333;
  margin-bottom: 10px;
  font-size: 32px;
}

h2 {
  color: #555;
  margin-bottom: 20px;
  font-size: 24px;
}

p {
  color: #666;
  margin-bottom: 20px;
}

/* Login Form */
#login-screen .container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
}

.center-card {
  max-width: 400px;
  text-align: center;
  margin: 0 auto;
}

#login-screen .card {
  max-width: 400px;
  text-align: center;
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input, textarea, select {
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #72bf45;
}

button {
  padding: 12px 24px;
  background: #72bf45;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #5a9936;
}

.btn-secondary {
  background: #818285;
  padding: 8px 16px;
  font-size: 14px;
}

.btn-secondary:hover {
  background: #6a6c6f;
}

.btn-link {
  color: #72bf45;
  text-decoration: none;
  font-size: 14px;
}

.btn-link:hover {
  text-decoration: underline;
}

.logo {
  height: 40px;
  width: auto;
  margin-right: 12px;
}

.logo-large {
  height: 80px;
  margin-bottom: 20px;
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.

.btn-secondary:hover {
  background: #5a6268;
}

.hint {
  font-size: 12px;
  color: #999;
  margin-top: 10px;
}

.success {
  color: #27ae60;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 15px;
}

.success.hidden {
  display: none;
}

.error {
  color: #e74c3c;
  font-size: 14px;
  margin-top: 10px;
  min-height: 20px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.header h1 {
  color: white;
  margin: 0;
}

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

#username-display {
  color: white;
  font-weight: 600;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

/* Tickets */
.ticket {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  transition: box-shadow 0.3s;
}

.ticket:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.ticket-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.ticket-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge.status-open {
  background: #e3f2fd;
  color: #1976d2;
}

.badge.status-in-progress {
  background: #fff3e0;
  color: #f57c00;
}

.badge.status-closed {
  background: #e8f5e9;
  color: #388e3c;
}

.badge.priority-low {
  background: #f5f5f5;
  color: #666;
}

.badge.priority-medium {
  background: #fff9c4;
  color: #f57f17;
}

.badge.priority-high {
  background: #ffebee;
  color: #c62828;
}

.ticket-description {
  color: #666;
  margin: 10px 0;
  line-height: 1.5;
}

.ticket-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  font-size: 12px;
  color: #999;
  flex-wrap: wrap;
  gap: 10px;
}

.ticket-actions {
  display: flex;
  gap: 5px;
}

.ticket-actions button {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-info {
  background: #3498db !important;
}

.btn-info:hover {
  background: #2980b9 !important;
}

.btn-danger {
  background: #e74c3c !important;
}

.btn-danger:hover {
  background: #c0392b !important;
}

/* Modal */
.modal {
  display: block;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.2s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 30px;
  border-radius: 12px;
  max-width: 600px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: slideDown 0.3s;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-large {
  max-width: 800px;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close {
  color: #aaa;
  float: right;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  line-height: 20px;
}

.close:hover,
.close:focus {
  color: #000;
}

/* Activity Timeline */
.activity-list {
  margin: 20px 0;
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 15px;
  margin-bottom: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid #e0e0e0;
}

.activity-item.status-change {
  border-left-color: #72bf45;
}

.activity-item.comment {
  border-left-color: #3498db;
}

.activity-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-meta {
  color: #333;
  margin-bottom: 5px;
  line-height: 1.5;
}

.activity-comment {
  color: #666;
  margin: 8px 0;
  line-height: 1.6;
  white-space: pre-wrap;
}

.activity-time {
  font-size: 12px;
  color: #999;
  margin-top: 5px;
}

/* Attachments */
.attachments-list {
  margin: 15px 0;
}

.attachment-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  align-items: center;
  transition: background 0.2s;
}

.attachment-item:hover {
  background: #e9ecef;
}

.attachment-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.attachment-info {
  flex: 1;
}

.attachment-name {
  color: #72bf45;
  font-weight: 600;
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
}

.attachment-name:hover {
  text-decoration: underline;
}

.attachment-meta {
  font-size: 12px;
  color: #999;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: #999;
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .ticket-header {
    flex-direction: column;
  }
}
