/* Month End Operations CSS */

/* Tab Panel Visibility Fix */
#month-endTab {
  /* min-height: 400px; */
  overflow-y: auto;
}

#monthEndWorkflow {
  min-height: 400px;
  width: 100%;
  visibility: visible !important;
  opacity: 1 !important;
}

.month-end-workflow {
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
}

/* Month End Cards */
.month-end-cards {
  margin-top: 20px;
}

.month-end-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 15px;
  padding: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 280px;
  display: flex;
  flex-direction: column;
  color: white;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.month-end-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.card-header {
  text-align: center;
  margin-bottom: 20px;
}

.card-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 15px;
  opacity: 0.9;
}

.card-header h4 {
  color: white;
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.card-content {
  flex-grow: 1;
  margin-bottom: 25px;
}

.card-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

.card-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card-features li {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  padding: 5px 0;
  position: relative;
  padding-left: 20px;
}

.card-features li:before {
  content: '✓';
  color: rgba(255, 255, 255, 0.9);
  font-weight: bold;
  position: absolute;
  left: 0;
}

.card-footer {
  margin-top: auto;
}

.card-footer .uk-button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  font-size: 1rem;
  font-weight: 600;
  padding: 12px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.card-footer .uk-button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* Dynamic Workflow Area */
.workflow-display-area {
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin: 20px;
}

.workflow-header h2 {
  color: #333;
  margin-bottom: 10px;
}

.workflow-steps {
  margin-top: 30px;
}

.workflow-step {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.step-header h3 {
  color: #495057;
  margin: 0;
}

.step-result {
  padding: 15px;
  background: white;
  border-radius: 6px;
  border: 1px solid #dee2e6;
}

.back-to-calendar-btn {
  position: sticky;
  top: 10px;
  z-index: 100;
}

.workflow-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e5e5e5;
}

.workflow-header h3 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.workflow-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.workflow-step {
  display: flex;
  align-items: flex-start;
  padding: 20px;
  border: 2px solid #e5e5e5;
  border-radius: 10px;
  background: #fff;
  transition: all 0.3s ease;
  position: relative;
}

.workflow-step:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.workflow-step.pending {
  border-color: #ddd;
  background: #fafafa;
}

.workflow-step.in-progress {
  border-color: #ffc107;
  background: #fff8e1;
  animation: pulse 2s infinite;
}

.workflow-step.completed {
  border-color: #28a745;
  background: #f8fff9;
}

.workflow-step.error {
  border-color: #dc3545;
  background: #fff5f5;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #f8f9fa;
  border: 2px solid #e5e5e5;
  margin-right: 20px;
  position: relative;
  flex-shrink: 0;
}

.workflow-step.in-progress .step-indicator {
  background: #fff8e1;
  border-color: #ffc107;
}

.workflow-step.completed .step-indicator {
  background: #f8fff9;
  border-color: #28a745;
}

.workflow-step.error .step-indicator {
  background: #fff5f5;
  border-color: #dc3545;
}

.step-icon {
  font-size: 1.5rem;
}

.step-check,
.step-error {
  position: absolute;
  top: -5px;
  right: -5px;
  font-size: 1rem;
  background: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-loading {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ffc107;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.step-description {
  color: #666;
  margin-bottom: 15px;
  line-height: 1.5;
}

.step-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.step-run-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.step-run-btn:hover:not(:disabled) {
  background: #0056b3;
}

.step-run-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.step-view-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.step-view-btn:hover {
  background: #1e7e34;
}

.workflow-summary {
  border-radius: 10px;
  text-align: center;
}

.workflow-summary h4 {
  margin-bottom: 15px;
  color: #333;
}

.summary-stats {
  display: flex;
  justify-content: space-around;
  gap: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.stat-item strong {
  font-size: 1.5rem;
  color: #007bff;
}

/* Responsive */
@media (max-width: 768px) {
  .workflow-step {
    flex-direction: column;
    text-align: center;
  }

  .step-indicator {
    margin-right: 0;
    margin-bottom: 15px;
  }

  .summary-stats {
    flex-direction: column;
    gap: 10px;
  }
}

/* Modal özelleştirme */
.uk-modal-dialog {
  border-radius: 10px;
}

.uk-modal-header {
  border-bottom: 2px solid #e5e5e5;
  padding-bottom: 15px;
}

.uk-modal-body {
  padding: 20px 0;
}

.uk-alert-success {
  border-left: 4px solid #28a745;
  background: #f8fff9;
  border-radius: 5px;
}