/* ==========================================================================
   HR Marketer AI - Modern Premium Design System (Vanilla CSS)
   ========================================================================== */

:root {
  /* Farebná paleta - Svetlý režim vo farbách Index Nosluš (červená + navy) */
  --bg-main: #f4f6f8;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-input: #ffffff;
  --bg-elevated: #f0f2f5;
  
  --border-subtle: rgba(43, 62, 80, 0.12);
  --border-light: rgba(43, 62, 80, 0.22);
  --border-focus: #e30613;
  --border-glow: rgba(227, 6, 19, 0.25);

  --text-primary: #2b3e50;
  --text-secondary: #556b7e;
  --text-muted: #8394a5;
  --text-link: #c50510;

  --accent-primary: #e30613;
  --accent-secondary: #2b3e50;
  --accent-gradient: linear-gradient(135deg, #e30613 0%, #ff3d47 50%, #e30613 100%);
  --accent-glow: 0 0 25px rgba(227, 6, 19, 0.2);

  --success: #0d9668;
  --success-glow: rgba(13, 150, 104, 0.2);
  --warning: #d97706;
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.08);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;
}

/* Reset & Základné štýly */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: linear-gradient(135deg, #fce4e6 0%, #f0f2f5 40%, #d5d8dc 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Glow - jemné svetelné pozadie vo farbách Index Nosluš */
.ambient-glow {
  position: fixed;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  filter: blur(160px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
}

.glow-1 {
  top: -150px;
  left: 10%;
  background: radial-gradient(circle, #e30613 0%, transparent 70%);
}

.glow-2 {
  bottom: -200px;
  right: 5%;
  background: radial-gradient(circle, #2b3e50 0%, transparent 70%);
}

/* Hlavný kontajner */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem;
  position: relative;
  z-index: 1;
}

/* Navigačná lišta */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(227, 6, 19, 0.3);
  flex-shrink: 0;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-title span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  transition: var(--transition-fast);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-badge.ready .status-dot {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}
.status-badge.ready {
  border-color: rgba(13, 150, 104, 0.3);
  color: #065f46;
}

.status-badge.warning .status-dot {
  background: var(--warning);
  box-shadow: 0 0 8px var(--warning);
}
.status-badge.warning {
  border-color: rgba(217, 119, 6, 0.3);
  color: #92400e;
}

/* Layout - 2 stĺpce */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

/* Panely (Karty s Glassmorphismom) */
.panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: 0 4px 24px -4px rgba(43, 62, 80, 0.1);
  position: relative;
  transition: border-color var(--transition-normal);
}

.panel:hover {
  border-color: var(--border-light);
}

/* Hlavičky sekcií s číslom kroku */
.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-header.rules-header {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(227, 6, 19, 0.3);
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Taby - Prepínač vstupov */
.tab-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  background: var(--bg-input);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.65rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(43, 62, 80, 0.06);
}

.tab-btn.active {
  background: rgba(227, 6, 19, 0.1);
  color: #e30613;
  border: 1px solid rgba(227, 6, 19, 0.3);
  box-shadow: 0 2px 10px rgba(227, 6, 19, 0.1);
}

/* Obsah Tabov */
.tab-content {
  display: none;
  animation: fadeIn 200ms ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Vstupy a polia */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.input-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.label-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.url-input-wrapper {
  display: flex;
  gap: 0.5rem;
}

input[type="url"],
input[type="password"],
input[type="text"],
textarea,
select.styled-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  outline: none;
}

input:focus,
textarea:focus,
select.styled-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--border-glow);
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

.field-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.textarea-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* DOCX Dropzone */
.dropzone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: rgba(244, 246, 248, 0.8);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent-primary);
  background: rgba(227, 6, 19, 0.05);
  box-shadow: var(--accent-glow);
}

.file-input-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.drop-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.dropzone h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  font-family: var(--font-heading);
}

.dropzone p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.dropzone .highlight {
  color: var(--accent-primary);
  text-decoration: underline;
}

.file-limits {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.file-preview-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-elevated);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  text-align: left;
}

.file-icon {
  font-size: 2rem;
}

.file-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.file-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
  word-break: break-all;
}

.file-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Tone Card & Grid */
.tone-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.tone-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .tone-grid {
    grid-template-columns: 1fr;
  }
}

.tone-card-item {
  position: relative;
  cursor: pointer;
}

.tone-card-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tone-item-content {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all var(--transition-fast);
  height: 100%;
}

.tone-card-item:hover .tone-item-content {
  border-color: var(--border-light);
  background: rgba(43, 62, 80, 0.04);
}

.tone-card-item input[type="radio"]:checked + .tone-item-content {
  border-color: var(--accent-primary);
  background: rgba(227, 6, 19, 0.08);
  box-shadow: 0 0 15px rgba(227, 6, 19, 0.12);
}

.tone-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.tone-text-block {
  display: flex;
  flex-direction: column;
}

.tone-text-block strong {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.tone-text-block span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* Akčné tlačidlá */
.action-buttons-row {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(227, 6, 19, 0.3);
  flex-grow: 1;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(227, 6, 19, 0.45);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.btn-secondary {
  background: rgba(43, 62, 80, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(43, 62, 80, 0.1);
  border-color: var(--accent-secondary);
}

.btn-subtle {
  background: rgba(43, 62, 80, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.btn-subtle:hover {
  background: rgba(43, 62, 80, 0.12);
}

.link-btn {
  background: none;
  border: none;
  color: var(--text-link);
  font-size: 0.8rem;
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

.link-btn.danger {
  color: var(--danger);
}

.btn-icon {
  background: rgba(43, 62, 80, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  color: var(--accent-primary);
  background: rgba(227, 6, 19, 0.08);
}

.btn-icon.danger {
  color: var(--danger);
}

/* Alert správa */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
  font-size: 0.85rem;
}

.alert-error {
  background: var(--danger-bg);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #991b1b;
}

/* Pravý panel - Výsledky */
.output-section {
  display: flex;
  flex-direction: column;
  min-height: 600px;
}

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

.results-tabs {
  display: flex;
  background: var(--bg-input);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.res-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.res-tab-btn.active {
  background: var(--bg-elevated);
  color: var(--accent-primary);
  border: 1px solid rgba(227, 6, 19, 0.25);
}

.results-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(43, 62, 80, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-action:hover {
  color: var(--accent-primary);
  background: rgba(227, 6, 19, 0.06);
  border-color: rgba(227, 6, 19, 0.25);
}

/* Meta Bar */
.meta-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.meta-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  background: rgba(43, 62, 80, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  color: var(--text-secondary);
}

/* Prázdny stav / Placeholder */
.state-placeholder {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.state-placeholder h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.state-placeholder p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 440px;
  margin-bottom: 2rem;
}

.feature-bullets {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
  max-width: 420px;
  width: 100%;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(43, 62, 80, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
}

.f-icon {
  font-size: 1.25rem;
}

.feature-item strong {
  font-size: 0.85rem;
  color: var(--text-primary);
  display: block;
}

.feature-item p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Loading Overlay */
.state-overlay {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}

.loading-spinner {
  width: 54px;
  height: 54px;
  border: 3px solid rgba(227, 6, 19, 0.15);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(227, 6, 19, 0.2);
}

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

.state-overlay h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.state-overlay p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 2rem;
}

.loading-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.step-badge {
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  background: rgba(43, 62, 80, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.step-badge.active {
  background: rgba(227, 6, 19, 0.1);
  border-color: var(--accent-primary);
  color: #e30613;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(227, 6, 19, 0.15);
}

.step-badge.completed {
  background: rgba(13, 150, 104, 0.1);
  border-color: var(--success);
  color: #065f46;
}

/* Výsledkové kontajnery */
.result-container {
  flex-grow: 1;
}

/* Markdown styling pre upravený inzerát */
.markdown-body {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-primary);
  max-height: 650px;
  overflow-y: auto;
}

.markdown-body h1 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--accent-primary);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.markdown-body h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.5rem 0 0.75rem;
  color: var(--text-primary);
}

.markdown-body h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
  color: var(--text-secondary);
}

.markdown-body p {
  margin-bottom: 1rem;
}

.markdown-body ul, .markdown-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}

.markdown-body li {
  margin-bottom: 0.4rem;
}

.markdown-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.markdown-body blockquote {
  border-left: 3px solid var(--accent-primary);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--text-secondary);
  font-style: italic;
  background: rgba(227, 6, 19, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.75rem 1rem;
}

/* Pôvodný text */
.raw-text-view {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 650px;
  overflow-y: auto;
}

/* Split View (Porovnanie vedľa seba) */
.split-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  flex-grow: 1;
}

.split-header {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.split-scroll {
  max-height: 600px;
  overflow-y: auto;
}

/* Modálne okno (Settings) */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(43, 62, 80, 0.5);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(43, 62, 80, 0.25);
  animation: modalPop 200ms ease;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-primary);
}

.modal-footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

/* Toast Notifikácie */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1000;
}

.toast {
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 10px 25px rgba(43, 62, 80, 0.15);
  animation: slideIn 200ms ease;
}

.toast.success {
  border-color: rgba(13, 150, 104, 0.5);
}

.toast.error {
  border-color: rgba(220, 38, 38, 0.5);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Pomocné triedy */
.hidden {
  display: none !important;
}

/* Vlastný scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(43, 62, 80, 0.08);
}

::-webkit-scrollbar-thumb {
  background: rgba(43, 62, 80, 0.2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(43, 62, 80, 0.35);
}

/* ==========================================================================
   Prihlasovacia obrazovka (Login Overlay)
   ========================================================================== */

.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fce4e6 0%, #f0f2f5 40%, #d5d8dc 100%);
  background-attachment: fixed;
  overflow: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: loginSlideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes loginSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow:
    0 20px 60px rgba(43, 62, 80, 0.12),
    0 4px 24px rgba(227, 6, 19, 0.06);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.login-brand .brand-icon {
  width: 48px;
  height: 48px;
}

.login-divider {
  height: 1px;
  background: var(--border-subtle);
  margin-bottom: 1.5rem;
}

.login-heading {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.login-subtext {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

.login-card .input-group {
  margin-bottom: 1.25rem;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.password-toggle:hover {
  color: var(--accent-primary);
}

.login-error {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  background: var(--danger-bg);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: var(--radius-md);
  color: #991b1b;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  animation: shakeError 0.4s ease;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-6px); }
  30% { transform: translateX(5px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
}

.login-submit-btn {
  width: 100%;
  margin-top: 0.5rem;
  position: relative;
}

.login-submit-btn .btn-text {
  transition: opacity var(--transition-fast);
}

.login-submit-btn.loading .btn-text {
  opacity: 0;
}

.login-submit-btn.loading .login-spinner {
  display: block !important;
}

.login-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.login-footer {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 1.5rem;
  text-align: center;
}

/* User Badge v navbare */
.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-primary);
}

.user-avatar {
  font-size: 1rem;
}

.user-name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Logout button */
.logout-btn {
  color: var(--text-secondary);
  gap: 0.4rem;
}

.logout-btn:hover {
  color: var(--danger);
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.25);
}

/* Skrytie hlavnej aplikácie pred prihlásením */
.app-hidden {
  display: none !important;
}

@media (max-width: 480px) {
  .login-card {
    margin: 0 1rem;
    padding: 1.75rem;
  }
}
