/* ==================== FLOWCAPTAIN CARD SYSTEM ==================== */
/* Centralized card component definitions for consistent layouts */

/* ==================== BASE CARD STYLES ==================== */
.card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: calc(var(--spacing) * 1.5);
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  backdrop-filter: blur(20px);
}

.card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

/* ==================== CARD SIZES ==================== */
.card-sm {
  padding: var(--spacing);
}

.card-lg {
  padding: calc(var(--spacing) * 2);
}

.card-xl {
  padding: calc(var(--spacing) * 3);
}

/* ==================== CARD HEADER ==================== */
.card-header {
  margin-bottom: var(--spacing);
  padding-bottom: calc(var(--spacing) * 0.75);
  border-bottom: 1px solid rgba(60, 60, 67, 0.12);
}

.card-header h2,
.card-header h3,
.card-header h4 {
  margin: 0;
}

/* ==================== CARD BODY ==================== */
.card-body {
  margin-bottom: calc(var(--spacing) * 1.5);
}

.card-body:last-child {
  margin-bottom: 0;
}

/* ==================== CARD FOOTER ==================== */
.card-footer {
  margin-top: calc(var(--spacing) * 1.5);
  padding-top: var(--spacing);
  border-top: 1px solid rgba(60, 60, 67, 0.12);
}

/* ==================== FEATURE CARD SPECIFIC ==================== */
.feature-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 48px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

/* Feature card icon */
.feature-card .feature-icon {
  margin-bottom: 24px;
  display: block;
}

/* Feature card heading */
.feature-card h3 {
  margin-bottom: 16px;
}

/* Feature card paragraph */
.feature-card p {
  margin-bottom: 0;
}

/* Feature card with button - proper spacing */
.feature-card .btn {
  margin-top: 32px;  /* More breathing room */
}

/* Feature card button group */
.feature-card .button-group {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==================== STAT CARD ==================== */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: calc(var(--spacing) * 1.5);
  text-align: center;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.stat-card .stat-label {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Stat Card with Icon - Horizontal Layout */
.stat-card-icon {
  display: flex;
  align-items: center;
  gap: var(--spacing);
  text-align: left;
}

.stat-card-icon .stat-icon {
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-green);
  flex-shrink: 0;
}

.stat-card-icon .stat-info {
  flex: 1;
}

.stat-card-icon .stat-info h3 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

.stat-card-icon .stat-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.stat-card-icon .stat-info small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #a0aec0;
  font-weight: 400;
}

/* ==================== INFO CARD ==================== */
.info-card {
  background: rgba(41, 74, 66, 0.1);
  border-left: 4px solid var(--primary-green);
  border-radius: 8px;
  padding: var(--spacing);
}

.info-card.info-warning {
  border-left-color: var(--warning);
  background-color: rgba(255, 159, 10, 0.1);
}

.info-card.info-success {
  border-left-color: var(--success);
  background-color: rgba(48, 209, 88, 0.1);
}

.info-card.info-danger {
  border-left-color: var(--danger);
  background-color: rgba(255, 69, 58, 0.1);
}

/* ==================== CARD GRID LAYOUTS ==================== */
.card-grid {
  display: grid;
  gap: calc(var(--spacing) * 1.5);
}

.card-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ==================== PROFILE ACTIONS GRID ==================== */
/* Profile action buttons grid - 2x3 layout (6 buttons, no logout) */
.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
  padding: 0 16px;
  align-items: start; /* Ensure all buttons align to top of grid cells */
}

/* Profile action buttons - consistent sizing */
.profile-actions .btn-action {
  width: 100%;
  height: 48px; /* Fixed height instead of min-height */
  padding: 12px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  justify-content: center; /* Center the content */
  text-align: center; /* Center the text */
  display: flex;
  align-items: center;
  vertical-align: top; /* Force top alignment */
  box-sizing: border-box; /* Ensure consistent box model */
  margin: 0; /* Remove any margin that could cause offset */
}

/* Icon spacing within buttons */
.profile-actions .btn-action .icon {
  margin-right: 8px;
  flex-shrink: 0;
}

/* Mobile: Single column layout */
@media (max-width: 768px) {
  .profile-actions {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0;
  }
  
  .profile-actions .btn-action {
    min-height: 52px;
    font-size: 1rem;
  }
}

/* Small mobile: Smaller buttons */
@media (max-width: 480px) {
  .profile-actions .btn-action {
    min-height: 48px;
    font-size: 0.9rem;
    padding: 10px 14px;
  }
}

/* ==================== TAB BUTTONS ==================== */
/* Tab buttons using btn system */
.correction-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.correction-tabs .btn {
  flex: 1;
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid transparent;
}

.correction-tabs .btn.active {
  background: var(--primary, #294A42);
  color: white;
  border-bottom-color: var(--primary, #294A42);
}

/* TIME TRACKING CONTAINER */
.time-btns {
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: center;
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 0 16px;
  flex-wrap: wrap; /* Allow wrapping for responsive */
}

/* Responsive behavior for time tracking icons */
@media (max-width: 280px) {
  .time-btns {
    flex-direction: column;
    gap: 20px;
    align-items: center; /* Keep centered when stacked */
  }
}

/* TIME STATUS DISPLAY - Enhanced existing status */
.time-tracking-card .status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  position: relative;
}

.time-tracking-card .status::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #6b7280; /* Gray when idle */
  transition: background-color 0.3s ease;
  flex-shrink: 0;
  order: -1; /* Place at the beginning */
}

.time-tracking-card .status.active::before {
  background: #22c55e; /* Green when active */
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

.time-tracking-card .status::after {
  content: '';
  width: 32px;
  height: 32px;
  border: 3px solid #294A42;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  background-image: 
    linear-gradient(0deg, transparent 46%, #294A42 46%, #294A42 54%, transparent 54%),
    linear-gradient(45deg, transparent 46%, #294A42 46%, #294A42 54%, transparent 54%),
    linear-gradient(90deg, transparent 46%, #294A42 46%, #294A42 54%, transparent 54%),
    linear-gradient(135deg, transparent 46%, #294A42 46%, #294A42 54%, transparent 54%);
  animation: spin 2s linear infinite;
  animation-play-state: paused;
}

.time-tracking-card .status.running::after {
  animation-play-state: running;
  border-color: #22c55e;
  background-image: 
    linear-gradient(0deg, transparent 46%, #22c55e 46%, #22c55e 54%, transparent 54%),
    linear-gradient(45deg, transparent 46%, #22c55e 46%, #22c55e 54%, transparent 54%),
    linear-gradient(90deg, transparent 46%, #22c55e 46%, #22c55e 54%, transparent 54%),
    linear-gradient(135deg, transparent 46%, #22c55e 46%, #22c55e 54%, transparent 54%);
}

.time-tracking-card .status {
  font-size: 1rem;
  font-weight: 500;
  color: #374151;
  text-align: center;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==================== AUTH FORMS SPACING ==================== */
/* Login and register form button spacing */
.login-container form .btn,
.register-container form .btn {
  margin-top: 24px;
  margin-bottom: 8px; /* Reduced - status element adds its own margin */
}

/* Status messages between buttons should have minimal spacing */
.login-container .status,
.register-container .status {
  margin: 8px 0; /* Reduced from 16px */
}

/* Secondary buttons (like 'Noch kein Konto?') should have less top spacing */
.login-container .btn.btn-secondary,
.register-container .btn.btn-secondary {
  margin-top: 0; /* No extra top margin, status provides spacing */
  margin-bottom: 16px;
}

/* ==================== RESPONSIVE ADJUSTMENTS ==================== */
@media (max-width: 768px) {
  .feature-card {
    padding: 32px 24px;
  }
  
  .feature-card .btn {
    margin-top: 24px;
  }
  
  .feature-card .button-group {
    margin-top: 24px;
  }
  
  .card-lg {
    padding: calc(var(--spacing) * 1.5);
  }
  
  .card-xl {
    padding: calc(var(--spacing) * 2);
  }
}

@media (max-width: 480px) {
  .feature-card {
    padding: 28px 20px;
  }
  
  .feature-card .btn {
    margin-top: 20px;
    width: 100%;
    min-width: unset;
  }
  
  .feature-card .button-group {
    margin-top: 20px;
    flex-direction: column;
  }
  
  .card-grid-2,
  .card-grid-3,
  .card-grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 320px) {
  .feature-card {
    padding: 24px 16px;
  }
  
  .feature-card .btn {
    margin-top: 16px;
  }
  
  .card {
    padding: var(--spacing);
  }
}