/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

a {
  text-decoration: none !important;
}

body {
  height: 100%;
  background-color: #f8f9fa;
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f8f9fa;
}

.login-form {
  background-color: #ffffff;
  padding: 3rem 2.5rem;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 360px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.login-form h1 {
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  color: #1a1a1a;
}

.login-form input[type="text"],
.login-form input[type="password"] {
  padding: 12px 16px;
  font-size: 15px;
  border-radius: 12px;
  border: 1.5px solid #e5e7eb;
  background-color: #ffffff;
  color: #1a1a1a;
  outline: none;
  transition: border-color 0.2s ease;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
  border-color: #175FEB;
}

.login-form input[type="text"]::placeholder,
.login-form input[type="password"]::placeholder {
  color: #9ca3af;
}

.login-form button {
  padding: 12px 16px;
  font-size: 15px;
  border-radius: 12px;
  background-color: #175FEB;
  color: #fff;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.login-form button:hover {
  background-color: #0f4ac1;
}

.login-form button:disabled {
  background-color: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

.login-form .error {
  font-size: 16px;
  text-align: center;
  color: #dc2626;
  border-radius: 12px;
  padding: 8px 12px;
  background-color: #fee2e2;
}

/* Navbar styles matching login form colors */
/* Modern Navbar - Light Mode */

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  width: 100%;
  margin: 0 auto;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
}

.navbar-logo {
  font-weight: 700;
  font-size: 24px;
  color: #1a1a1a;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-logo::before {
  content: '';
  width: 8px;
  height: 32px;
  background: linear-gradient(180deg, #175FEB 0%, #0f4ac1 100%);
  border-radius: 4px;
}

.navbar-logout-button {
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 0.625rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-logout-button::after {
  content: '→';
  font-size: 16px;
  transition: transform 0.2s ease;
}

.navbar-logout-button:hover {
  background-color: #e2e8f0;
  color: #1e293b;
  border-color: #cbd5e1;
}

.navbar-logout-button:hover::after {
  transform: translateX(3px);
}

.navbar-logout-button:active {
  transform: translateY(0);
}

.navbar-logout-button:disabled {
  background-color: #f8f9fa;
  color: #cbd5e1;
  cursor: not-allowed;
  border-color: #e5e7eb;
}

.navbar-logout-button:disabled:hover {
  transform: none;
}

.navbar-logout-button:disabled::after {
  transform: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar-container {
    padding: 1rem 1.25rem;
  }

  .navbar-logo {
    font-size: 20px;
  }

  .navbar-logo::before {
    height: 28px;
    width: 6px;
  }

  .navbar-logout-button {
    padding: 0.5rem 1rem;
    font-size: 13px;
  }
}

/* Sidebar container */
/* Add this to your CSS - Layout Structure Fix */

/* Main app container - should wrap everything after navbar */
.app-layout {
  display: flex;
  min-height: calc(100vh - 73px); /* Full height minus navbar */
  background-color: #f8f9fa;
}

/* Modern Sidebar - Light Mode (UPDATED) */
.sidebar-container {
  width: 240px;
  background-color: #ffffff;
  border-right: 1px solid #e5e7eb;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: sticky;
  top: 73px; /* Height of navbar */
  height: calc(100vh - 73px); /* Full viewport height minus navbar */
  align-self: flex-start; /* Important: makes sticky work */
  flex-shrink: 0; /* Prevents sidebar from shrinking */
}

/* Main content area - should wrap your pages */
.main-content {
  flex: 1;
  overflow-y: auto;
  min-height: calc(100vh - 73px);
}

/* Sidebar Links - keep existing styles */
.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.875rem 1rem;
  border-radius: 10px;
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.sidebar-link:hover {
  background-color: #f8fafc;
  color: #1e293b;
}

.sidebar-link.active {
  background-color: #175FEB;
  color: #ffffff;
  font-weight: 600;
}

.sidebar-link:hover::after {
  opacity: 0.5;
  transform: translateX(0);
}

.sidebar-link.active::after {
  opacity: 0;
}

.sidebar-link:focus {
  outline: 2px solid #175FEB;
  outline-offset: 2px;
}

.sidebar-link:focus:not(:focus-visible) {
  outline: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .sidebar-container {
    width: 200px;
    padding: 1.25rem 0.75rem;
  }

  .sidebar-link {
    font-size: 14px;
    padding: 0.75rem 0.875rem;
  }
}

@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
  }

  .sidebar-container {
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
    flex-direction: row;
    padding: 1rem;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
  }

  .sidebar-link {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .sidebar-link:hover {
    transform: translateX(0);
    transform: translateY(-2px);
  }

  .main-content {
    min-height: auto;
  }
}

/* Tickets Page - Modern White Mode */

.tickets-page {
  padding: 2.5rem 2rem;
  background-color: #f8f9fa;
  min-height: 100vh;
}

.tickets-title {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 2rem;
  letter-spacing: -0.5px;
}

.tickets-loading,
.tickets-empty {
  text-align: center;
  font-size: 16px;
  color: #6b7280;
  padding: 3rem;
  background-color: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
}

/* Ticket Card */
.ticket-card {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e5e7eb;
  transition: border-color 0.2s ease;
}

.ticket-card:hover {
  border-color: #cbd5e1;
}

/* Ticket Rows */
.ticket-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.ticket-row:last-child {
  margin-bottom: 0;
}

/* Řádek 1 - Základní informace (5 polí stejné šířky) */
.ticket-row-1 {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 1rem;
}

.ticket-row-1 .ticket-field {
  flex: 1;
  min-width: 150px;
}

/* Řádek 2 - Technické informace */
.ticket-row-2 {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 1rem;
}

.ticket-row-2 .ticket-field {
  flex: 1;
  min-width: 140px;
}

.ticket-row-2 .ticket-field-wide {
  flex: 2;
  min-width: 250px;
}

/* Řádek 3 - Poznámka */
.ticket-row-3 {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 1rem;
}

.ticket-row-3 .ticket-field-full {
  flex: 1;
  width: 100%;
}

/* Řádek 4 - Akce a semafor */
.ticket-row-4 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding-top: 0.5rem;
}

/* Ticket Field */
.ticket-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.field-value {
  font-size: 15px;
  color: #1e293b;
  font-weight: 500;
  line-height: 1.4;
}

/* Action Buttons */
.ticket-actions {
  display: flex;
  gap: 0.75rem;
}

.action-button {
  padding: 0.625rem 1.25rem;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.action-save {
  background-color: #175FEB;
  color: #ffffff;
}

.action-save:hover {
  background-color: #0f4ac1;
  transform: translateY(-1px);
}

.action-print {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.action-print:hover {
  background-color: #e2e8f0;
  color: #1e293b;
  transform: translateY(-1px);
}

/* Status Semafor - Colored Circles */
.status-semafor {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.status-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.status-circle:hover {
  transform: scale(1.1);
}

.status-circle.active {
  width: auto;
  min-width: 120px;
  padding: 0 1rem;
  border-radius: 20px;
  transform: scale(1.05);
}

.status-text {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: #ffffff;
}

/* Status Colors */
.status-red {
  background-color: #ef4444;
}

.status-red:hover {
  background-color: #dc2626;
}

.status-orange {
  background-color: #f97316;
}

.status-orange:hover {
  background-color: #ea580c;
}

.status-blue {
  background-color: #3b82f6;
}

.status-blue:hover {
  background-color: #2563eb;
}

.status-green {
  background-color: #10b981;
}

.status-green:hover {
  background-color: #059669;
}

.status-gray {
  background-color: #94a3b8;
}

.status-gray:hover {
  background-color: #64748b;
}

/* Inactive status circles - lighter version */
.status-circle:not(.active) {
  opacity: 0.4;
}

.status-circle:not(.active):hover {
  opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .ticket-row-1,
  .ticket-row-2 {
    flex-wrap: wrap;
  }

  .ticket-row-1 .ticket-field,
  .ticket-row-2 .ticket-field {
    min-width: calc(33.333% - 0.75rem);
  }
}

@media (max-width: 768px) {
  .tickets-page {
    padding: 1.5rem 1rem;
  }

  .tickets-title {
    font-size: 24px;
    margin-bottom: 1.5rem;
  }

  .ticket-card {
    padding: 1.25rem;
  }

  .ticket-row {
    gap: 0.75rem;
  }

  .ticket-row-1 .ticket-field,
  .ticket-row-2 .ticket-field {
    min-width: 100%;
  }

  .ticket-row-4 {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .ticket-actions {
    flex-direction: column;
  }

  .action-button {
    width: 100%;
  }

  .status-semafor {
    justify-content: center;
    flex-wrap: wrap;
  }

  .status-circle.active {
    min-width: 100px;
    font-size: 12px;
  }
}

/* New Ticket Form - Modern White Mode */

.new-ticket-page {
  padding: 2.5rem 2rem;
  background-color: #f8f9fa;
  min-height: 100vh;
  max-width: 900px;
  margin: 0 auto;
}

/* Form Header */
.form-header {
  margin-bottom: 2rem;
}

.form-title {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.form-subtitle {
  font-size: 16px;
  color: #64748b;
  font-weight: 400;
}

/* Form Message */
.form-message {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 15px;
  font-weight: 500;
  animation: slideDown 0.3s ease;
}

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

.form-message.success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}

.form-message.error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

/* Ticket Form */
.ticket-form {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid #e5e7eb;
}

/* Form Section */
.form-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #f1f5f9;
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background-color: #175FEB;
  border-radius: 2px;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

/* Form Field */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field-wide {
  grid-column: span 2;
}

.form-field-full {
  margin-bottom: 1.25rem;
}

.form-field-full:last-child {
  margin-bottom: 0;
}

/* Form Label */
.form-label {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Form Input */
.form-input {
  padding: 0.75rem 1rem;
  font-size: 15px;
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  background-color: #ffffff;
  color: #1e293b;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
  outline: none;
}

.form-input::placeholder {
  color: #94a3b8;
}

.form-input:focus {
  border-color: #175FEB;
  background-color: #f8fafc;
}

.form-input:hover:not(:focus) {
  border-color: #cbd5e1;
}

/* Select Dropdown */
.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%2364748b' d='M4.427 6.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 6H4.604a.25.25 0 00-.177.427z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

/* Textarea */
.form-textarea {
  padding: 0.75rem 1rem;
  font-size: 15px;
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  background-color: #ffffff;
  color: #1e293b;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
  outline: none;
  resize: vertical;
  line-height: 1.6;
}

.form-textarea::placeholder {
  color: #94a3b8;
}

.form-textarea:focus {
  border-color: #175FEB;
  background-color: #f8fafc;
}

.form-textarea:hover:not(:focus) {
  border-color: #cbd5e1;
}

/* Form Actions */
.form-actions {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Submit Button */
.form-submit-button {
  padding: 0.875rem 2rem;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  background-color: #175FEB;
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-submit-button::after {
  content: '→';
  font-size: 18px;
  transition: transform 0.2s ease;
}

.form-submit-button:hover {
  background-color: #0f4ac1;
  transform: translateY(-2px);
}

.form-submit-button:hover::after {
  transform: translateX(3px);
}

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

.form-submit-button:disabled {
  background-color: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

.form-submit-button:disabled:hover {
  transform: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .new-ticket-page {
    padding: 1.5rem 1rem;
  }

  .form-title {
    font-size: 24px;
  }

  .form-subtitle {
    font-size: 14px;
  }

  .ticket-form {
    padding: 1.5rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field-wide {
    grid-column: span 1;
  }

  .section-title {
    font-size: 16px;
  }

  .form-actions {
    flex-direction: column;
  }

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