/**
 * Document Pages Dark Theme
 * Auto-applies to document-related pages only
 * Uses URL-based detection
 */

/* ===== TARGET ONLY PAGES WITH /document IN URL ===== */
/* This CSS only activates on document pages */

/* Apply dark theme to entire page */
html {
  background: #050f0d !important;
}

body {
  background: #050f0d !important;
  color: #e2e8f0 !important;
}

/* ===== BACKGROUND GRADIENT BLOBS ===== */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 9999px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 300px;
  height: 200px;
  top: -50px;
  right: -50px;
  background: rgba(0, 217, 165, 0.3) !important;
}

body::after {
  width: 250px;
  height: 180px;
  bottom: 200px;
  left: -50px;
  background: rgba(99, 102, 241, 0.2) !important;
}

/* Keep content above blobs */
#wrapper,
#page-content-wrapper,
.container-fluid {
  position: relative;
  z-index: 1;
}

/* ===== FORCE TRANSPARENT ON ALL NESTED ELEMENTS ===== */
div:not(.form-check):not(.form-switch):not(input):not(button),
span,
table,
tbody,
thead,
tr,
td,
th,
section,
article {

}

/* ===== CARDS - GLASSMORPHIC ===== */
.card {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 16px !important;
  color: #e2e8f0 !important;
  backdrop-filter: blur(10px);
}

.card-header {
  background: rgba(255, 255, 255, 0.04) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.card-body {
  background: transparent !important;
  padding: 20px !important;
}

.card-header h6,
.card-header .font-weight-bold {
  color: #e2e8f0 !important;
  font-weight: 800 !important;
}

/* ===== STAT CARDS ===== */
.border-left-primary {
  border-left: 3px solid #00D9A5 !important;
}

.border-left-success {
  border-left: 3px solid #10b981 !important;
}

.border-left-info {
  border-left: 3px solid #6366f1 !important;
}

.border-left-warning {
  border-left: 3px solid #f59e0b !important;
}

/* ===== TABLES ===== */
.table-responsive {
  background: rgba(255, 255, 255, 0.04) !important;
  border-radius: 12px;
  padding: 12px;
}

.table,
table {
  background: transparent !important;
  color: #e2e8f0 !important;
}

.table thead th,
table thead th {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #94a3b8 !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  text-transform: uppercase;
}

.table tbody tr,
table tbody tr {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

.table tbody tr:hover,
table tbody tr:hover {
  background: rgba(0, 217, 165, 0.08) !important;
}

.table tbody td,
table tbody td {
  background: transparent !important;
  color: #e2e8f0 !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

/* ===== DATATABLES ===== */
.dataTables_wrapper,
.dataTables_wrapper * {
  background: transparent !important;
  color: #e2e8f0 !important;
}

.dataTables_wrapper select,
.dataTables_wrapper input {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  color: #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
}

.dataTables_wrapper label {
  color: #94a3b8 !important;
}

/* ===== BUTTONS ===== */
.btn {
  border-radius: 10px !important;
  font-weight: 700 !important;
  padding: 8px 16px !important;
}

.btn-primary {
  background: linear-gradient(135deg, #0d7a62 0%, #0a6652 100%) !important;
  color: #ffffff !important;
  border: none !important;
}

.btn-success {
  background: #10b981 !important;
  color: #ffffff !important;
}

.btn-info {
  background: #6366f1 !important;
  color: #ffffff !important;
}

.btn-warning {
  background: #f59e0b !important;
  color: #ffffff !important;
}

.btn-danger {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.btn-outline-secondary {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.07) !important;
  color: #e2e8f0 !important;
}

/* ===== BADGES ===== */
.badge {
  padding: 6px 12px !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  font-size: 11px !important;
}

.bg-primary { background-color: #00D9A5 !important; }
.bg-success { background-color: #10b981 !important; }
.bg-info { background-color: #6366f1 !important; }
.bg-warning { background-color: #f59e0b !important; }
.bg-danger { background-color: #ef4444 !important; }
.bg-secondary { background-color: #64748b !important; }

/* ===== FORMS ===== */
.form-control,
.form-select,
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  color: #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
}

.form-control:focus,
.form-select:focus {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(0, 217, 165, 0.5) !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 217, 165, 0.15) !important;
}

::placeholder {
  color: #64748b !important;
}

.form-label,
label {
  color: #e2e8f0 !important;
  font-weight: 700 !important;
}

/* ===== CHECKBOXES & SWITCHES ===== */
.form-check-input,
input[type="checkbox"],
input[type="radio"] {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  cursor: pointer !important;
}

.form-check-input:checked {
  background-color: #00D9A5 !important;
  border-color: #00D9A5 !important;
}

.form-switch .form-check-input {
  background-color: rgba(255, 255, 255, 0.15) !important;
  width: 2.5em !important;
  height: 1.3em !important;
}

.form-switch .form-check-input:checked {
  background-color: #00D9A5 !important;
}

/* ===== PAGINATION ===== */
.page-link,
.paginate_button {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  color: #e2e8f0 !important;
  border-radius: 8px !important;
}

.page-link:hover,
.paginate_button:hover {
  background: rgba(0, 217, 165, 0.15) !important;
  color: #00D9A5 !important;
}

.page-item.active .page-link,
.paginate_button.current {
  background: #00D9A5 !important;
  color: #ffffff !important;
}

/* ===== MODAL ===== */
.modal-content {
  background: #050f0d !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 16px !important;
}

.modal-header,
.modal-footer {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
}

.modal-body {
  background: #050f0d !important;
  color: #e2e8f0 !important;
}

.btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* ===== TEXT COLORS ===== */
.text-primary { color: #00D9A5 !important; }
.text-success { color: #10b981 !important; }
.text-info { color: #6366f1 !important; }
.text-warning { color: #f59e0b !important; }
.text-danger { color: #ef4444 !important; }
.text-muted { color: #94a3b8 !important; }
.text-secondary { color: #94a3b8 !important; }

/* ===== CATEGORY BOXES ===== */
.hover-shadow {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 12px !important;
  transition: all 0.3s ease;
}

.hover-shadow:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 217, 165, 0.2) !important;
}

/* ===== TIMELINE ===== */
.timeline::before {
  background: rgba(255, 255, 255, 0.1) !important;
}

.timeline-content {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* ===== ALERTS ===== */
.alert {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.alert-info {
  background: rgba(99, 102, 241, 0.15) !important;
  border-left: 3px solid #6366f1 !important;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.15) !important;
  border-left: 3px solid #f59e0b !important;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15) !important;
  border-left: 3px solid #10b981 !important;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15) !important;
  border-left: 3px solid #ef4444 !important;
}

/* ===== ICONS ===== */
.fa-file-pdf { color: #ef4444 !important; }
.fa-file-word { color: #00D9A5 !important; }
.fa-file-excel { color: #10b981 !important; }
.fa-file-image { color: #6366f1 !important; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 217, 165, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 217, 165, 0.5);
}