/* ===================================
   DAY MODAL - WEEK VIEW (ENTERPRISE)
   =================================== */

.day-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.drawer-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
}

.drawer-panel {
  position: relative;
  width: 500px;
  max-height: 85vh;
  background: linear-gradient(135deg, rgba(31,41,55,0.98), rgba(17,24,39,1));
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.drawer-panel.open {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Header */
.drawer-header {
  padding: 24px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  flex-shrink: 0;
}

.drawer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  transition: color 0.15s ease;
}

.drawer-close:hover {
  color: var(--text-primary);
}

.drawer-header h3 {
  margin: 0 0 8px 0;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 600;
}

.drawer-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
}

.drawer-status.complete {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.drawer-status.incomplete {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.drawer-status.empty {
  background: rgba(107, 114, 128, 0.15);
  color: var(--text-secondary);
}

/* Content */
.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.drawer-content::-webkit-scrollbar {
  width: 8px;
}

.drawer-content::-webkit-scrollbar-track {
  background: rgba(31, 41, 55, 0.5);
}

.drawer-content::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.3);
  border-radius: 4px;
}

.drawer-content::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.5);
}

/* Form Groups */
.drawer-form-group {
  margin-bottom: 20px;
}

.drawer-form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.drawer-form-group input {
  width: 100%;
  padding: 12px;
  background: rgba(31, 41, 55, 0.5);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 16px;
  transition: all 0.15s ease;
}

.drawer-form-group input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(31, 41, 55, 0.8);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.drawer-form-group input::placeholder {
  color: var(--text-tertiary);
}

.drawer-form-group .input-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Two-column input */
.drawer-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Summary */
.drawer-summary {
  margin-top: 24px;
  padding: 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
}

.drawer-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.drawer-summary-row:last-child {
  margin-bottom: 0;
}

.drawer-summary-total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.drawer-last-editor {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: right;
}

/* Footer */
.drawer-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.drawer-footer .btn-secondary {
  flex: 1;
  padding: 12px;
  background: rgba(75, 85, 99, 0.3);
  border: 1px solid rgba(156, 163, 175, 0.3);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.drawer-footer .btn-secondary:hover {
  background: rgba(75, 85, 99, 0.5);
  border-color: rgba(156, 163, 175, 0.5);
}

.drawer-footer .btn-primary {
  flex: 1;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.drawer-footer .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.drawer-footer .btn-primary:active {
  transform: translateY(0);
}

.drawer-autosave-indicator {
  position: absolute;
  bottom: 24px;
  left: 24px;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.drawer-autosave-indicator.saving {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
}

.drawer-autosave-indicator.saved {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.drawer-autosave-indicator.error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
