/* ==========================================================================
   Design Tokens & Variables
   ========================================================================== */
:root {
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Farebná paleta - IKEA modernú žlto-modrú s grafitovým dark mode */
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.75);
  --bg-card-hover: rgba(51, 65, 85, 0.8);
  --bg-input: rgba(15, 23, 42, 0.6);
  
  --primary-blue: #0051ba;
  --primary-blue-hover: #003d8f;
  --accent-yellow: #ffda1a;
  --accent-yellow-dark: #e5c300;
  
  --success-green: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --warning-amber: #f59e0b;
  --danger-red: #ef4444;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --border-color: rgba(255, 255, 255, 0.1);
  --border-color-highlight: rgba(255, 218, 26, 0.3);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 25px rgba(255, 218, 26, 0.25);
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  overflow-x: hidden;
  position: relative;
}

/* Animated Background Glow Orbs */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}
.bg-glow-1 {
  width: 400px;
  height: 400px;
  background: var(--primary-blue);
  top: -100px;
  left: -100px;
}
.bg-glow-2 {
  width: 350px;
  height: 350px;
  background: var(--accent-yellow);
  bottom: -80px;
  right: -80px;
}

.app-container {
  width: 100%;
  max-width: 720px;
  z-index: 1;
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Prihlasovacia Karta (Login Section)
   ========================================================================== */
.auth-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.4s ease-out;
}

.brand-header {
  text-align: center;
  margin-bottom: 2rem;
}

.brand-logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-yellow));
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 1rem;
  box-shadow: 0 8px 16px rgba(0, 81, 186, 0.4);
}

.brand-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.brand-header .subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.input-group input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  color: var(--text-main);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition-fast);
}

.input-group input:focus {
  outline: none;
  border-color: var(--accent-yellow);
  box-shadow: 0 0 0 3px rgba(255, 218, 26, 0.2);
}

/* Demo box */
.demo-credentials-box {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.demo-credentials-box code {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: var(--accent-yellow);
  font-family: monospace;
}

/* ==========================================================================
   Tlačidlá
   ========================================================================== */
.btn {
  font-family: inherit;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.9rem 1.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: var(--transition-fast);
  text-decoration: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent-yellow);
  color: #0f172a;
}
.btn-primary:hover {
  background: var(--accent-yellow-dark);
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: var(--radius-full);
}

.btn-outline-danger {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger-red);
}
.btn-outline-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--danger-red);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

/* 1-KLIK VELKÉ TLAČIDLO POTVRDENIA PRÍCHODU (Mobil-first Dominant Action) */
.btn-action-confirm {
  width: 100%;
  padding: 1.4rem 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--accent-yellow), #facc15);
  color: #0f172a;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 20px rgba(255, 218, 26, 0.3);
  cursor: pointer;
}
.btn-action-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(255, 218, 26, 0.4);
}
.btn-action-confirm:active {
  transform: translateY(1px);
}
.btn-action-confirm.confirmed {
  background: var(--success-green);
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
  cursor: default;
}

.pulse-glow {
  animation: pulseAnimation 2.5s infinite;
}
@keyframes pulseAnimation {
  0% { box-shadow: 0 0 0 0 rgba(255, 218, 26, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(255, 218, 26, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 218, 26, 0); }
}

/* ==========================================================================
   Dashboard Section
   ========================================================================== */
.dashboard-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.4s ease-out;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.avatar-circle {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--primary-blue), #3b82f6);
  color: #fff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.user-details h3 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.2;
}

.user-role-badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.status-demo {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.status-real {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   Dnešná Zmena (Today Shift Card)
   ========================================================================== */
.today-shift-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--border-color-highlight);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.shift-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.shift-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-yellow);
  text-transform: uppercase;
  background: rgba(255, 218, 26, 0.1);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 218, 26, 0.2);
}

.shift-date {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Časy zmeny (Veľké cifry) */
.shift-time-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(15, 23, 42, 0.6);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-color);
}

.time-block {
  text-align: center;
}

.time-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.25rem;
}

.time-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.time-divider {
  font-size: 1.4rem;
  color: var(--accent-yellow);
  opacity: 0.7;
}

.shift-status-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 0 0.5rem;
}

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

.status-indicator {
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.status-indicator.pending {
  color: var(--warning-amber);
}
.status-indicator.confirmed {
  color: var(--success-green);
}

/* Potvrdenie príchodu Banner */
.confirmation-success-banner {
  margin-top: 1rem;
  padding: 1.1rem;
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #ffffff;
  animation: fadeIn 0.3s ease;
}
.confirmation-success-banner i {
  font-size: 1.8rem;
  color: var(--success-green);
}

/* ==========================================================================
   Rozpis Zmien (Zoznam & História)
   ========================================================================== */
.history-section {
  margin-top: 1.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-header h4 {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shifts-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.shift-row-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-fast);
}
.shift-row-card:hover {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(255, 255, 255, 0.2);
}

.shift-row-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.shift-row-date {
  font-weight: 600;
  font-size: 0.95rem;
}

.shift-row-hours {
  color: var(--accent-yellow);
  font-size: 0.9rem;
  font-weight: 500;
}

.shift-row-status {
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-full);
}

.loading-spinner {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Toast Notifikácie
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  animation: slideInRight 0.3s ease;
}
.toast-success {
  border-left: 4px solid var(--success-green);
}
.toast-error {
  border-left: 4px solid var(--danger-red);
}

/* Animácie */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive adjustments pre vybrané šírky */
@media (max-width: 480px) {
  body {
    padding: 0.5rem;
  }
  .dashboard-card, .auth-card {
    padding: 1.25rem 1rem;
  }
  .time-value {
    font-size: 1.75rem;
  }
  .btn-action-confirm {
    padding: 1.2rem 1rem;
    font-size: 1.1rem;
  }
}
