/* Custom styles for Daily Report System */
:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 22%),
    linear-gradient(180deg, #edf5ff 0%, #f7fbff 48%, #eef6ff 100%);
  position: relative;
  margin: 0;
  padding: 0;
}

main {
  flex: 1;
  position: relative;
}

.app-main {
  position: relative;
  z-index: 1;
}

/* Navbar enhancements */
.navbar-brand {
  font-weight: 600;
  font-size: 1.3rem;
}

.navbar-modern {
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.32), transparent 26%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.22), transparent 24%),
    linear-gradient(135deg, rgba(30, 64, 175, 0.88) 0%, rgba(37, 99, 235, 0.82) 42%, rgba(14, 165, 233, 0.72) 100%);
  box-shadow: 0 18px 44px rgba(30, 64, 175, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  padding: 10px 0;
}

.navbar-modern-shell {
  display: flex;
  align-items: center;
  min-height: 72px;
  border-radius: 24px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.navbar-modern .navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 4px;
  color: #ffffff;
  letter-spacing: 0.2px;
  text-decoration: none;
}

.navbar-brand-mark {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.14));
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  flex-shrink: 0;
}

.navbar-modern .navbar-brand i {
  font-size: 1.2rem;
}

.navbar-brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.navbar-brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.navbar-brand-subtitle {
  font-size: 0.72rem;
  color: rgba(219, 234, 254, 0.82);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}

.navbar-primary-links {
  gap: 6px;
}

.navbar-modern .navbar-nav .nav-link {
  color: #eff6ff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  transition: all 0.22s ease;
  font-weight: 600;
  border: 1px solid transparent;
  min-height: 44px;
}

.navbar-modern .navbar-nav .nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.navbar-modern .navbar-nav .nav-link.active,
.navbar-modern .navbar-nav .nav-link:focus {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.navbar-modern .dropdown-menu {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.16);
  padding: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.86));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.navbar-modern .dropdown-item {
  border-radius: 12px;
  padding: 10px 12px;
  color: #1e3a8a;
  font-weight: 500;
}

.navbar-modern .dropdown-item:hover {
  background: rgba(59, 130, 246, 0.12);
}

.navbar-modern .navbar-toggler {
  border: none;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 14px;
}

.navbar-modern .navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.navbar-modern .navbar-toggler-icon {
  filter: brightness(10);
}

.navbar-modern .navbar-collapse {
  margin-top: 0;
}

.navbar-modern .dropdown-toggle::after {
  margin-left: 0.55rem;
}

.navbar-modern .badge.rounded-pill.bg-danger {
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.3);
}

.navbar.sticky-top {
  top: 0;
  z-index: 1030;
}

@media (max-width: 991.98px) {
  .navbar-modern {
    padding: 8px 0;
  }

  .navbar-modern-shell {
    border-radius: 20px;
    padding: 12px;
  }

  .navbar-modern .navbar-collapse {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
  }

  .navbar-primary-links {
    gap: 4px;
  }

  .navbar-modern .navbar-nav .nav-link {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 575.98px) {
  .navbar-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .navbar-brand-title {
    font-size: 0.96rem;
  }

  .navbar-brand-subtitle {
    font-size: 0.64rem;
  }
}

.assign-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.4rem 0.55rem;
}

.assign-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
  display: inline-block;
}

/* Card enhancements */
.card {
  border: none;
  border-radius: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.card:hover {
  transform: translateY(-2px);
}

.card.shadow {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

/* Stats cards */
.card.bg-primary,
.card.bg-success,
.card.bg-warning,
.card.bg-info {
  border-radius: 10px;
  transition: transform 0.2s;
}

.card.bg-primary:hover,
.card.bg-success:hover,
.card.bg-warning:hover,
.card.bg-info:hover {
  transform: scale(1.05);
}

/* Table improvements */
.table-hover tbody tr:hover {
  background-color: rgba(13, 110, 253, 0.05);
  cursor: pointer;
}

/* Form enhancements */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.input-group-text {
  background-color: #e9ecef;
  border-color: #ced4da;
}

/* Button improvements */
.btn {
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
}

/* Badge styling */
.badge {
  padding: 0.5em 0.8em;
  font-weight: 500;
}

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid #dee2e6;
}

/* Alert improvements */
.alert {
  border-radius: 8px;
  border: none;
}

/* Card header improvements */
.card-header {
  border-bottom: 2px solid rgba(0,0,0,0.05);
  font-weight: 600;
}

/* Animation for page load */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.container {
  animation: fadeIn 0.3s ease-in;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .table-responsive {
    font-size: 0.875rem;
  }
  
  .card-body {
    padding: 1.5rem !important;
  }
  
  h1.display-6 {
    font-size: 1.75rem;
  }
}

/* Icon sizing */
.bi {
  vertical-align: middle;
}

/* Time range input polish */
.time-range-group .input-group-text {
  background: #f4f6fb;
  min-width: 44px;
  justify-content: center;
}

.time-range-group .divider {
  font-weight: 600;
  color: #6c757d;
}

.time-range-group input[type="time"] {
  text-align: center;
}

/* Clock Picker Styles */
.clock-picker-container {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 16px;
  padding: 16px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.06);
}

.time-display-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.time-display-item {
  flex: 1;
  background: white;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.time-display-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.time-display-item.active {
  border-color: #0d6efd;
  background: linear-gradient(135deg, #e7f1ff 0%, #cfe2ff 100%);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

.time-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.time-display-item.active .time-label {
  color: #0d6efd;
}

.time-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #212529;
  font-family: 'Courier New', monospace;
}

.time-separator {
  font-weight: 600;
  color: #6c757d;
  font-size: 0.9rem;
}

.clock-face {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 20px auto;
  background: white;
  border-radius: 50%;
  box-shadow: 
    0 0 0 8px #f8f9fa,
    0 0 0 10px #dee2e6,
    0 8px 24px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.clock-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  background: #0d6efd;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  box-shadow: 0 2px 6px rgba(13, 110, 253, 0.4);
}

.clock-hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform-origin: bottom center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 4px 4px 0 0;
}

.hour-hand {
  width: 6px;
  height: 50px;
  background: linear-gradient(180deg, #0d6efd 0%, #0a58ca 100%);
  margin-left: -3px;
  z-index: 8;
}

.minute-hand {
  width: 4px;
  height: 75px;
  background: linear-gradient(180deg, #198754 0%, #146c43 100%);
  margin-left: -2px;
  z-index: 9;
}

.clock-numbers {
  position: absolute;
  width: 100%;
  height: 100%;
}

.clock-number {
  position: absolute;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: #495057;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) 
    rotate(calc(var(--i) * 30deg)) 
    translateY(-85px) 
    rotate(calc(var(--i) * -30deg));
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.clock-number:hover {
  background: #e7f1ff;
  color: #0d6efd;
  transform: translate(-50%, -50%) 
    rotate(calc(var(--i) * 30deg)) 
    translateY(-85px) 
    rotate(calc(var(--i) * -30deg))
    scale(1.2);
}

.clock-mode-indicator {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 600;
  color: #0d6efd;
  background: rgba(255, 255, 255, 0.95);
  padding: 4px 12px;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.time-input-toggle {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.time-input-toggle .btn {
  min-width: 60px;
}

#toggle-am-pm {
  font-weight: 700;
}

#toggle-am-pm.active {
  background: #0d6efd;
  color: white;
  border-color: #0d6efd;
}

/* Manual time input modal */
.manual-time-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.manual-time-modal.show {
  display: flex;
}

.manual-time-content {
  background: white;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-width: 320px;
  width: 90%;
}


/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Sticky form on dashboard */
.sticky-top {
  z-index: 1020;
}

/* Smooth new row highlight */
.table-success {
  animation: highlightRow 2s ease-in-out;
}

@keyframes highlightRow {
  0% { background-color: #d1e7dd; }
  100% { background-color: transparent; }
}

/* Responsive adjustments for dashboard */
@media (max-width: 991px) {
  .sticky-top {
    position: relative !important;
    top: 0 !important;
  }
}

/* Task board helpers */
.task-list {
  min-height: 120px;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 1200px) {
  .task-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .task-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .task-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .task-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

.task-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #0b132b;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.task-pill-mine {
  background: linear-gradient(135deg, #e0f0ff, #c2e0ff);
  color: #0d6efd;
}

.task-pill-created {
  background: linear-gradient(135deg, #e4ffe7, #c6f3cd);
  color: #2c8a3a;
}

.task-card.dragging {
  opacity: 0.75;
  border: 2px dashed #0d6efd;
}

.task-card {
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.task-card.compact {
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(4px);
  min-height: 120px;
  min-width: 100px;
  display: flex;
  flex-direction: column;
}

.task-title {
  font-size: 0.9rem;
  line-height: 1.25;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.task-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.task-btn {
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  color: #495057 !important;
  padding: 4px 6px;
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  font-size: 0.8rem;
  line-height: 1;
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.task-btn:hover {
  background: #ffffff !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  color: #0d6efd !important;
}

#linked-task-alert {
  transition: opacity 0.2s ease;
}

/* Header alignment for primary cards */
#assign-task-card .card-header,
#report-form-card .card-header {
  min-height: 56px;
}

.task-popover .popover-body {
  padding: 10px 12px;
}

.popover-task {
  max-width: 260px;
}

.popover-task-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.popover-task-body div {
  font-size: 0.85rem;
  margin-bottom: 4px;
}

/* Lean category cards */
.category-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 56px;
}

.category-name-wrap {
  min-width: 0;
  gap: 8px;
  flex: 1 1 auto;
}

.category-name {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-count {
  flex-shrink: 0;
  line-height: 1;
}

/* Task status selector */
.status-select {
  min-width: 110px;
  padding: 2px 6px;
}

/* Floating notification bell */
.floating-bell {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 60px;
  height: 60px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: all 0.3s ease;
}

.floating-bell:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(13, 110, 253, 0.5) !important;
}

.floating-bell:active {
  transform: scale(0.96);
}
