/* RTL tweaks */
body {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

:root {
  --primary-dark: #0a2647;
  --primary-accent: #144272;
}

.bg-primary-dark {
  background-color: var(--primary-dark) !important;
}

.navbar {
  transition: all 0.3s ease;
  padding: 0.75rem 0;
}

.navbar-brand i {
  font-size: 1.5rem;
  color: #00d2ff;
}

.nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: all 0.2s ease;
  border-radius: 0.5rem;
  margin: 0 0.2rem;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff !important;
}

.nav-link.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff !important;
}

.dropdown-menu {
  border-radius: 0.75rem;
  padding: 0.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

.dropdown-item {
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: #f0f7ff;
  color: var(--primary-accent);
  transform: translateX(-5px);
}

.navbar-toggler:focus {
  box-shadow: none;
}

.card-header {
  font-weight: 600;
}

canvas {
  max-height: 320px;
}

/* --- Reports Explorer 2.0 --- */
.report-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-top: 10px;
}

.report-cal-weekday {
    text-align: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: #6c757d;
    padding-bottom: 5px;
}

.report-cal-cell {
    aspect-ratio: 1;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    background: #fff;
}

.report-cal-cell:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    z-index: 1;
}

.report-cal-cell.empty {
    border: none;
    cursor: default;
    background: transparent;
}

.report-cal-cell.empty:hover {
    transform: none;
    box-shadow: none;
}

.report-cal-cell .day-num {
    font-size: 0.9rem;
    font-weight: 500;
}

.report-cal-cell.today {
    background: #fff3cd;
    border-color: #ffeeba;
}

.report-cal-cell.selected {
    border: 2px solid #0d6efd !important;
    background: #e7f1ff;
    z-index: 2;
}

.report-cal-cell.has-report {
    background: #f0fdf4;
    border-color: #dcfce7;
}

.report-cal-cell.has-report:hover {
    background: #dcfce7;
}

.report-cal-cell .cell-icons {
    display: flex;
    gap: 2px;
    font-size: 0.65rem;
    margin-top: 2px;
}

.report-cal-cell.filtered-out {
    opacity: 0.2;
    filter: grayscale(1);
    pointer-events: none;
}

.x-small {
    font-size: 0.75rem;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* Enhanced Dashboard Styles */
.field-badge {
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  border: 1px solid transparent;
}

.field-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.field-badge.inactive {
  opacity: 0.5;
  filter: grayscale(0.8);
  background-color: #6c757d !important;
}

.quick-range-btn {
  font-size: 0.75rem;
  white-space: nowrap;
}

.compare-row {
  display: none;
  background-color: #f8f9fa;
  border-radius: 0.375rem;
  padding: 0.5rem;
}

.compare-row.active {
  display: flex;
}

.delta-badge {
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  border-radius: 1rem;
  margin-right: 0.5rem;
}

.delta-up {
  background-color: rgba(25, 135, 84, 0.1);
  color: #198754;
}

.delta-down {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

#kpi-row .card {
  transition: transform 0.2s ease;
}

#kpi-row .card:hover {
  transform: translateY(-3px);
}

/* --- Upload Center 2.0 --- */
.upload-center {
    max-width: 900px !important;
    margin: 0 auto;
}

.drop-zone {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: #0d6efd;
    background: #e7f1ff;
    transform: scale(1.02);
}

.drop-zone i {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
    display: block;
    transition: transform 0.3s ease;
}

.drop-zone:hover i {
    transform: translateY(-5px);
    color: #0d6efd;
}

.drop-zone.has-file {
    border-style: solid;
    border-color: #198754;
    background: #f0fdf4;
}

.drop-zone.has-file i {
    color: #198754;
}

.file-input-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0 !important;
    cursor: pointer;
    z-index: 10;
}

.requirement-card {
    border-right: 4px solid #0dcaf0 !important;
}

.drop-zone-text {
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
}

/* --- Auth Portal 2.0 --- */
.login-wrapper {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.login-card {
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

.form-floating label {
    right: 0;
    left: auto;
    padding-right: 1rem;
    padding-left: 1rem;
    transform-origin: top right;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    transform: scale(0.85) translateY(-0.5rem) translateX(-0.15rem);
}
