/* Light Theme Stylesheet - Arial Font, Blue/Red Accents, Square Corners */

:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --glass-bg: #ffffff;
  --glass-border: #cbd5e1;
  --glass-focus: #94a3b8;
  --text-primary: #0f172a;
  --text-muted: #64748b;

  --accent-cyan: #0d6efd;
  /* Primary Blue */
  --accent-cyan-glow: rgba(13, 110, 253, 0.15);
  --accent-blue: #0d6efd;
  /* Primary Blue */
  --accent-blue-glow: rgba(13, 110, 253, 0.15);
  --accent-gold: #b25e00;
  --accent-gold-glow: rgba(178, 94, 0, 0.15);
  --accent-emerald: #15803d;
  --accent-rose: #dc3545;
  /* Secondary Red */

  --font-display: Arial, Helvetica, sans-serif;
  --font-sans: Arial, Helvetica, sans-serif;
}

/* Force Arial Globally & Force Zero Border Radius (Square corners) */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0px !important;
  font-family: Arial, Helvetica, sans-serif !important;
}

/* Restore FontAwesome icons family */
.fa,
.fas,
.far,
.fal,
.fad,
.fab,
.fa-solid,
.fa-regular,
.fa-brands {
  font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'Font Awesome 5 Free', 'Font Awesome 5 Brands', 'FontAwesome', sans-serif !important;
  font-weight: 900 !important;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Solid Container Design for Light Theme */
.glass {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
}

.glass-card:hover {
  border-color: #94a3b8;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Inputs & Form Fields */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-size: 0.95rem;
  transition: all 0.2s ease-in-out;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px var(--accent-blue-glow);
  background: #ffffff;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.2rem;
  padding-right: 2.5rem;
}

/* Custom Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: bold;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--accent-blue);
  color: white;
  box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
}

.btn-primary:hover {
  background: #0b5ed7;
  box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.btn-secondary {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.btn-secondary:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.btn-danger {
  background: var(--accent-rose);
  color: white;
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.btn-danger:hover {
  background: #bb2d3b;
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-success {
  background: var(--accent-emerald);
  color: white;
  box-shadow: 0 2px 4px rgba(21, 128, 61, 0.2);
}

.btn-success:hover {
  background: #166534;
  box-shadow: 0 4px 8px rgba(21, 128, 61, 0.3);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: bold;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
}

.badge-approved {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #22c55e;
}

.badge-rejected {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

.badge-online {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #3b82f6;
}

.badge-offline {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #a855f7;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 90%;
  max-width: 500px;
  background: #ffffff;
  border: 1px solid #94a3b8;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Table Design for Admin */
.table-container {
  overflow-x: auto;
  border: 1px solid #cbd5e1;
  min-height: 300px;
  /*tránh có 1-2 dòng dropdownlist bị overlap*/
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background: #f1f5f9;
  color: #334155;
  font-weight: bold;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem;
  border-bottom: 2px solid #cbd5e1;
}

td {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.95rem;
  color: #334155;
  vertical-align: middle;
  background: #ffffff;
}

tr:hover td {
  background: #f8fafc;
}

/* Alert system */
.alert {
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #f87171;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #4ade80;
}

/* Loading animations */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--accent-blue);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Override STT view elements for Light Theme compatibility */
#tickets-container .glass-card strong,
#tickets-container .glass-card div {
  text-shadow: none !important;
}

#tickets-container .glass-card div[style*="font-size: 4.5rem"] {
  color: var(--accent-blue) !important;
  /* Make number blue */
}

#tickets-container .glass-card div[style*="background: rgba(16, 185, 129, 0.02)"] {
  background: #f0fdf4 !important;
  /* solid color */
}

#tickets-container .glass-card div[style*="background: rgba(244, 63, 94, 0.01)"] {
  background: #fef2f2 !important;
  /* solid color */
}

#tickets-container .glass-card div[style*="color: white"] {
  color: #0f172a !important;
  /* Text color inside card details */
}

#tickets-container .glass-card strong[style*="color: white"] {
  color: #0f172a !important;
}

#tickets-container .glass-card span[style*="color: white"] {
  color: #334155 !important;
}

/* Tab Selector active underline */
.auth-tab-active {
  border-bottom: 3px solid var(--accent-blue) !important;
  color: var(--accent-blue) !important;
}

/* Printing styles */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12pt !important;
  }

  .no-print {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  .print-page-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: #000000 !important;
    font-weight: bold !important;
  }

  table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 15px !important;
  }

  th {
    background: #f3f4f6 !important;
    color: #000000 !important;
    border: 1px solid #9ca3af !important;
    font-weight: bold !important;
    padding: 8px !important;
    text-transform: none !important;
    font-size: 10pt !important;
  }

  td {
    color: #000000 !important;
    border: 1px solid #d1d5db !important;
    padding: 8px !important;
    font-size: 9pt !important;
    background: transparent !important;
  }

  tr {
    page-break-inside: avoid !important;
  }
}

.main-title-header {
  font-size: 1.25rem;
}

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

.main-title-header .short-title {
  display: none;
}

@media (max-width: 1000px) {
  .main-title-header .full-title {
    display: none;
  }

  .main-title-header .short-title {
    display: inline;
  }
}

/* Mobile responsive overrides */
@media (max-width: 768px) {
  #header-user-phone-container {
    display: none !important;
  }

  .btn-logout .logout-text {
    display: none !important;
  }

  .btn-logout {
    padding: 0.4rem 0.6rem !important;
  }
}

@media (max-width: 500px) {
  .main-title-header {
    font-size: 1rem !important;
  }

  .subtitle-header {
    font-size: 0.9rem !important;
  }

  #header-user-info {
    display: none !important;
  }
}

/* Custom Dropdown Actions Menu styling */
.dropdown-actions {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: bold;
}

.dropdown-trigger:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: none;
  min-width: 130px;
  flex-direction: column;
  margin-top: 2px;
}

.dropdown-actions.active .dropdown-menu {
  display: flex;
}

.dropdown-item {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  text-align: left;
  background: transparent;
  border: none;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.15s ease;
  font-weight: normal;
}

.dropdown-item:hover {
  background: #f1f5f9;
  color: var(--accent-blue) !important;
}

.dropdown-item i {
  width: 14px;
  text-align: center;
}