/* Apple Design CSS - Apple-spezifische Komponenten */

/* Apple Dashboard */
.apple-dashboard {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.apple-header {
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: var(--space-sm) var(--space-md);
}

.apple-nav {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.apple-nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.apple-nav-icon {
  width: 24px;
  height: 24px;
  background: var(--navy);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.apple-nav-icon svg {
  width: 14px;
  height: 14px;
}

.apple-nav-title {
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--navy);
}

.apple-nav-search {
  flex: 1;
  max-width: 300px;
  position: relative;
}

.apple-search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.apple-search-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 6px 6px 28px;
  color: var(--text);
  font-size: 12px;
  outline: none;
  transition: all 0.2s ease;
}

.apple-search-input:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 2px rgba(85, 160, 198, 0.2);
}

.apple-search-icon {
  position: absolute;
  left: 6px;
  width: 14px;
  height: 14px;
  color: var(--muted);
  z-index: 1;
}

.apple-nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.apple-nav-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-xs);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.apple-nav-btn:hover {
  background: var(--surface2);
  border-color: var(--accent);
}

.apple-nav-btn svg {
  width: 14px;
  height: 14px;
}

/* Apple Sections */
.apple-section {
  padding: var(--space-md) var(--space-md);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.apple-section-header {
  margin-bottom: var(--space-md);
}

.apple-section-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 var(--space-xs) 0;
  color: var(--text);
}

.apple-section-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* Apple Quick Actions - ULTRA COMPACT VERSION */
.apple-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.apple-action-card {
  background: linear-gradient(135deg, var(--surface), var(--surface2));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.apple-action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(108, 167, 130, 0.05), rgba(90, 143, 110, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.apple-action-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.apple-action-card:hover::before {
  opacity: 1;
}

.apple-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xs);
  position: relative;
  z-index: 2;
}

.apple-action-icon {
  width: 28px;
  height: 28px;
  background: var(--navy);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.apple-action-card[id="newAssemblyBtn"] .apple-action-icon,
.apple-action-card[id="newUmlaufBtn"] .apple-action-icon {
  background: var(--peach);
  color: var(--navy);
}

.apple-action-card[id="newMeinungBtn"] .apple-action-icon {
  background: var(--peach);
  color: var(--navy);
}

.apple-action-icon svg {
  width: 14px;
  height: 14px;
}

.apple-action-badge {
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1px 4px;
  font-size: 9px;
  font-weight: 600;
  color: var(--muted);
}

.apple-badge-etv {
    background: var(--peach);
    border-color: var(--line);
    color: var(--navy);
}

.apple-badge-uml {
    background: rgba(85, 160, 198, 0.15);
    border-color: var(--sky);
    color: var(--navy);
}

.apple-badge-mb {
    background: rgba(107, 142, 111, 0.15);
    border-color: var(--sage);
    color: var(--navy);
}

.apple-action-content {
  flex: 1;
  position: relative;
  z-index: 2;
}

.apple-action-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.apple-action-footer {
  position: relative;
  z-index: 2;
  margin-top: var(--space-xs);
}

.apple-action-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: var(--space-xs) 0;
  transition: all 0.2s ease;
}

.apple-action-card:hover .apple-action-btn {
  color: var(--text);
}

.apple-action-btn svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.apple-action-card:hover .apple-action-btn svg {
  transform: translateX(2px);
}

/* Compact Dashboard Filters */
.dashboard-filters {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--line);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.filter-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.filter-group select {
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 3px 6px;
  color: var(--text);
  font-size: 11px;
  outline: none;
  transition: all 0.2s ease;
}

.filter-group select:focus {
  border-color: var(--accent);
}

/* Session Interface */
.session-container {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.session-header {
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: var(--space-md) var(--space-lg);
}

.session-nav {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.session-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.session-icon {
  width: 32px;
  height: 32px;
  background: var(--navy);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.session-icon.umlauf {
  background: var(--warn);
}

.session-icon.meinung {
  background: var(--no);
}

.session-icon svg {
  width: 20px;
  height: 20px;
}

.session-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.session-actions {
  display: flex;
  gap: var(--space-sm);
}

.btn-session {
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 13px;
}

.btn-session:hover {
  background: var(--line);
  transform: translateY(-1px);
}

.btn-session.primary {
  background: var(--navy);
  color: #FFFFFF;
  border-color: var(--accent);
}

.btn-session.primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.session-main {
  flex: 1;
  padding: var(--space-lg);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.session-setup {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.setup-section h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 var(--space-md) 0;
  color: var(--text);
}

.setup-description {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 var(--space-lg) 0;
  line-height: 1.5;
}

.setup-form {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.setup-actions {
  display: flex;
  gap: var(--space-md);
}

.btn-large {
  flex: 1;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-large.primary {
  background: var(--navy);
  color: #FFFFFF;
}

.btn-large.primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-large.secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-large.secondary:hover {
  background: var(--line);
  transform: translateY(-1px);
}

.setup-preview {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: sticky;
  top: var(--space-lg);
}

.setup-preview h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 var(--space-md) 0;
  color: var(--text);
}

.preview-card {
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all 0.2s ease;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.preview-type {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.preview-type.assembly {
  background: rgba(108, 167, 130, 0.2);
  border-color: var(--accent);
  color: var(--accent);
}

.preview-type.umlauf {
  background: rgba(201, 177, 90, 0.2);
  border-color: var(--warn);
  color: var(--warn);
}

.preview-type.meinung {
  background: rgba(208, 96, 96, 0.2);
  border-color: var(--no);
  color: var(--no);
}

.preview-status {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
}

.preview-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 var(--space-xs) 0;
  color: var(--text);
  line-height: 1.3;
}

.preview-object,
.preview-deadline {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 var(--space-xs) 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .apple-nav {
    gap: var(--space-md);
  }
  
  .apple-section {
    padding: var(--space-md);
  }
  
  .session-setup {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .setup-preview {
    position: static;
  }
}

@media (max-width: 768px) {
  .apple-nav {
    flex-direction: column;
    gap: var(--space-sm);
    align-items: stretch;
  }
  
  .apple-nav-search {
    order: -1;
    max-width: none;
  }
  
  .apple-section {
    padding: var(--space-sm);
  }
  
  .apple-quick-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-filters {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .session-nav {
    flex-direction: column;
    gap: var(--space-sm);
    align-items: stretch;
  }
  
  .session-main {
    padding: var(--space-sm);
  }
  
  .setup-actions {
    flex-direction: column;
  }
}

/* Search Results Styles */
.search-results-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 32, 70, 0.12);
    margin-top: 8px;
    display: none;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.search-results-header {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    background: var(--surface2);
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--line);
}

.search-result-item:hover {
    background: var(--surface2);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-type {
    font-size: 10px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 4px;
}

.search-result-item[data-type="umlauf"] .search-result-type {
    color: var(--navy);
}

.search-result-item[data-type="meinung"] .search-result-type {
    color: var(--navy);
}

.search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.search-result-object {
    font-size: 11px;
    color: var(--muted);
}

.search-result-empty {
    padding: 16px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--surface2);
    border: 1px solid var(--line);
    border-radius: 4px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--muted);
    font-size: 12px;
    transition: all 0.2s ease;
}

.search-clear:hover {
    background: var(--line);
    color: var(--text);
}
