/* =============================================
   Public Explorer - Clean Professional UI
   ============================================= */

.pub-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 20px;
}

.pub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
}

.pub-header h2 {
  margin: 0;
  color: #990000;
  font-weight: 700;
  font-size: 22px;
}

/* Stats */
.pub-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.pub-stat-card {
  flex: 1;
  min-width: 140px;
  background: white;
  padding: 16px 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.pub-stat-card .stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #990000;
  display: block;
}

.pub-stat-card .stat-label {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

/* Status message */
.pub-status {
  padding: 12px 18px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: none;
  font-size: 1.1em;
}

/* File Cards Grid */
.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.pub-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition:
    box-shadow 0.2s,
    transform 0.2s;
  border: 1px solid #f0f0f0;
}

.pub-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.pub-card-header {
  background: #f8f9fa;
  padding: 14px 16px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pub-card-icon {
  font-size: 22px;
  color: #990000;
  flex-shrink: 0;
}

.pub-card-title {
  flex: 1;
  overflow: hidden;
}

.pub-card-name {
  font-weight: 500;
  color: #333;
  font-size: 14px;
  word-break: break-word;
}

.pub-card-uploader {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}

.pub-card-body {
  padding: 14px 16px;
}

.pub-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
  color: #888;
}

.pub-card-size {
  background: #f1f3f5;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 11px;
  color: #555;
}

.pub-card-date {
  color: #aaa;
}

.pub-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.pub-card-actions .btn {
  flex: 1;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-pub-download {
  background: #990000;
  color: white;
}
.btn-pub-download:hover {
  background: #7a0000;
  color: white;
  text-decoration: none;
}

.btn-pub-secondary {
  background: #6c757d;
  color: white;
}
.btn-pub-secondary:hover {
  background: #5a6268;
  color: white;
}

.btn-pub-outline {
  background: #f1f3f5;
  color: #555;
}
.btn-pub-outline:hover {
  background: #e9ecef;
}

.btn-pub-danger {
  background: transparent;
  color: #dc3545;
}
.btn-pub-danger:hover {
  background: #fff5f5;
}

/* Status badges */
.pub-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
}

.pub-badge-ok {
  background: #d4edda;
  color: #155724;
}

.pub-badge-missing {
  background: #f8d7da;
  color: #721c24;
}

/* Empty state */
.pub-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.pub-empty .icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.pub-empty h5 {
  color: #555;
  margin-bottom: 8px;
}

/* Modals */
.pub-modal-header {
  background: #990000;
  color: white;
  padding: 16px 24px;
  border-radius: 12px 12px 0 0;
}

.pub-modal-header .close {
  color: white;
  opacity: 0.8;
  text-shadow: none;
}

.pub-modal-header .close:hover {
  color: white;
  opacity: 1;
}

.pub-modal-header h5 {
  margin: 0;
  font-weight: 600;
  font-size: 16px;
}

.pub-modal-body {
  padding: 24px;
}

.pub-modal-body .form-group {
  margin-bottom: 16px;
}

.pub-modal-body label {
  font-weight: 500;
  font-size: 1.1em;
  color: #333;
  margin-bottom: 6px;
  display: block;
}

.pub-modal-body .form-control {
  border-radius: 8px;
  border: 1px solid #ddd;
  padding: 8px 14px;
  font-size: 1.1em;
  width: 100%;
}

.pub-modal-body .form-control:focus {
  border-color: #990000;
  box-shadow: 0 0 0 3px rgba(153, 0, 0, 0.1);
  outline: none;
}

.pub-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.pub-modal-footer .btn {
  padding: 8px 24px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 1.1em;
}

.pub-modal-footer .btn-secondary {
  background: #6c757d;
  border: none;
  color: white;
}

.pub-modal-footer .btn-secondary:hover {
  background: #5a6268;
}

.pub-modal-footer .btn-danger {
  background: #990000;
  border: none;
}

.pub-modal-footer .btn-danger:hover {
  background: #7a0000;
}

@media (max-width: 768px) {
  .pub-container {
    padding: 12px;
  }

  .pub-grid {
    grid-template-columns: 1fr;
  }

  .pub-stats {
    flex-direction: column;
  }

  .pub-card-actions {
    flex-direction: column;
  }
}
