/* Admin Panel Styles */

body {
  min-height: 100vh;
}

/* Login View */
.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: #e9ecef;
}

.login-shell {
  width: min(400px, 100%);
}

.login-shell .card {
  border-radius: 1rem;
}

/* Admin View */
.admin-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-view .container-fluid {
  flex: 1;
}

/* Navbar */
.navbar-brand {
  font-weight: 600;
}

.navbar-brand .material-icons-outlined {
  font-size: 1.5rem;
}

/* Cards */
.card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
  background-color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding: 1rem;
}

.card-header .material-icons-outlined {
  font-size: 1.25rem;
  color: #6c757d;
}

/* Collapsible card headers */
.card-header-collapse {
  cursor: pointer;
  user-select: none;
}

.card-header-collapse:hover {
  background-color: #f8f9fa;
}

.card-header .collapse-indicator {
  transition: transform 0.2s ease;
}

.card-header[aria-expanded="true"] .collapse-indicator {
  transform: rotate(180deg);
}

.card-body {
  padding: 1rem;
}

/* PDF List */
.pdf-list {
  max-height: 400px;
  overflow-y: auto;
}

.pdf-list .table {
  margin-bottom: 0;
}

.pdf-list .table th {
  border-top: none;
  font-weight: 500;
  font-size: 0.875rem;
  color: #6c757d;
}

.pdf-list .table td {
  vertical-align: middle;
}

.pdf-list .pdf-filename {
  cursor: pointer;
  color: #0d6efd;
  text-decoration: underline;
}

.pdf-list .pdf-filename:hover {
  color: #0a58ca;
}

/* PDF Drop Zone */
.pdf-drop-zone {
  border: 2px dashed #dee2e6;
  border-radius: 0.5rem;
  background-color: #f8f9fa;
  transition: all 0.2s ease;
}

.pdf-drop-zone:hover {
  border-color: #adb5bd;
}

.pdf-drop-zone.drag-over {
  border-color: #0d6efd;
  background-color: rgba(13, 110, 253, 0.05);
}

.pdf-drop-zone.uploading {
  opacity: 0.6;
  pointer-events: none;
}

.pdf-drop-zone .drop-zone-content p {
  margin-bottom: 0;
}

/* PDF Thumbnail Side Panel */
.pdf-thumbnail-panel {
  position: fixed;
  right: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  background: #fff;
  border-left: 1px solid #dee2e6;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  z-index: 1050;
  overflow-y: auto;
}

.pdf-thumbnail-panel .panel-header {
  background: #f8f9fa;
}

.pdf-thumbnail-panel .panel-body img {
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
}

/* User Textarea */
#usersTextarea {
  font-size: 0.875rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 200px;
}

/* Config Editor */
.config-editor {
  max-height: 600px;
  overflow-y: auto;
}

.config-section {
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
}

.config-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.config-section h6 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Form Controls */
.form-control-sm,
.form-select-sm {
  font-size: 0.875rem;
}

.form-control-color {
  width: 60px;
  padding: 0.25rem;
}

.form-check-input:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

/* Dropdown */
.dropdown-menu {
  max-height: 300px;
  overflow-y: auto;
}

.dropdown-menu li {
  display: flex;
  align-items: center;
}

.dropdown-menu .dropdown-item {
  padding: 0.5rem 1rem;
}

.dropdown-menu .btn-sm {
  padding: 0.25rem;
  line-height: 1;
  background: none;
  border: none;
}

.dropdown-menu .btn-sm:hover {
  background-color: rgba(220, 53, 69, 0.1);
}

/* Toast */
.toast-container {
  z-index: 1100;
}

/* Buttons with icons */
.btn .material-icons-outlined {
  vertical-align: middle;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .card-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start !important;
  }

  .card-header .d-flex.gap-2 {
    width: 100%;
    flex-wrap: wrap;
  }

  .card-header .btn {
    flex: 1;
    min-width: 100px;
  }
}

/* Loading states */
.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Monospace font for technical content */
.font-monospace {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.875em;
}

/* Utility classes */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Animation for loading spinners */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Examination Tab - Clients Table */
.clients-table {
  max-height: 400px;
  overflow-y: auto;
}

.clients-table .table th {
  border-top: none;
  font-weight: 500;
  font-size: 0.875rem;
  color: #6c757d;
  position: sticky;
  top: 0;
  background-color: #fff;
  z-index: 1;
}

.clients-table .table td {
  vertical-align: middle;
}

.clients-table .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35em 0.5em;
}

/* Examination Tab - Uploads Table */
.uploads-table {
  max-height: 350px;
  overflow-y: auto;
}

.uploads-table .table th {
  border-top: none;
  font-weight: 500;
  font-size: 0.875rem;
  color: #6c757d;
  position: sticky;
  top: 0;
  background-color: #fff;
  z-index: 1;
}

.uploads-table .table td {
  vertical-align: middle;
}

.uploads-table .badge {
  font-size: 0.7rem;
  font-weight: 500;
}

/* Messaging Card */
#messageText {
  font-size: 0.875rem;
  resize: vertical;
  min-height: 80px;
}

/* Card footer for Logout All button */
.card-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 1rem;
}

/* Auto-refresh toggle */
.form-check-label {
  cursor: pointer;
}

/* Action button groups */
.btn-group-sm > .btn {
  padding: 0.25rem 0.4rem;
}

.btn-group-sm .material-icons-outlined {
  font-size: 1rem;
}
