/* ============================================
   COMPONENTS - Wiederverwendbare UI Elemente
   ============================================ */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary {
    background: var(--gradient-gold);
    color: var(--carbon-900);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold-strong);
}

.btn-secondary {
    background: var(--carbon-600);
    color: var(--text-primary);
    border: 1px solid var(--titanium-700);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--carbon-500);
    border-color: var(--gold-600);
}

.btn-outline {
    background: transparent;
    color: var(--gold-500);
    border: 2px solid var(--gold-500);
}

.btn-outline:hover:not(:disabled) {
    background: rgba(212, 175, 55, 0.1);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
    background: var(--accent-error);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #ff5722;
}

.btn-success {
    background: var(--accent-success);
    color: white;
}

.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-lg);
}

.btn-xl {
    padding: var(--space-lg) var(--space-2xl);
    font-size: var(--font-size-xl);
    border-radius: var(--radius-lg);
}

.btn-full {
    width: 100%;
}

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

.btn-fab {
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: var(--radius-full);
    background: var(--gradient-gold);
    color: var(--carbon-900);
    box-shadow: var(--shadow-gold-strong);
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: var(--z-sticky);
}

.btn-fab:hover {
    transform: scale(1.1);
}

/* Input Fields */
.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.input-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
}

.input-field {
    width: 100%;
    padding: var(--space-md);
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    color: var(--text-primary);
    background: var(--carbon-700);
    border: 1px solid var(--titanium-800);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.input-field:focus {
    outline: none;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.input-field::placeholder {
    color: var(--text-muted);
}

.input-field:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .input-field {
    padding-left: var(--space-2xl);
}

.input-icon {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Cards */
.card {
    background: var(--carbon-700);
    border: 1px solid var(--titanium-800);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.card:hover {
    border-color: var(--gold-600);
    box-shadow: var(--shadow-gold);
}

.card-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--titanium-800);
}

.card-body {
    padding: var(--space-md);
}

.card-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--titanium-800);
}

.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.card-gold {
    border: 1px solid var(--gold-600);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, transparent 100%);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--gold-900);
    color: var(--gold-300);
    border: 1px solid var(--gold-700);
}

.badge-success {
    background: rgba(0, 200, 83, 0.2);
    color: var(--accent-success);
    border: 1px solid var(--accent-success);
}

.badge-warning {
    background: rgba(255, 215, 0, 0.2);
    color: var(--accent-warning);
    border: 1px solid var(--accent-warning);
}

.badge-error {
    background: rgba(255, 61, 0, 0.2);
    color: var(--accent-error);
    border: 1px solid var(--accent-error);
}

.badge-info {
    background: rgba(0, 176, 255, 0.2);
    color: var(--accent-info);
    border: 1px solid var(--accent-info);
}

/* Navigation - Mobile Bottom Nav */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    padding: var(--space-sm) 0;
    z-index: var(--z-sticky);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: var(--space-xs) var(--space-md);
    color: var(--text-muted);
    text-decoration: none;
    font-size: var(--font-size-xs);
    transition: all var(--transition-fast);
}

.mobile-nav-item.active {
    color: var(--gold-500);
}

.mobile-nav-item i {
    font-size: var(--font-size-xl);
}

/* Navigation - Sidebar (Desktop) */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: var(--carbon-800);
    border-right: 1px solid var(--titanium-800);
    display: flex;
    flex-direction: column;
    z-index: var(--z-sticky);
    transition: transform var(--transition-normal);
}

.sidebar-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--titanium-800);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.sidebar-logo img {
    width: 40px;
    height: 40px;
}

.sidebar-logo span {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--gold-500);
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-md);
    overflow-y: auto;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xs);
    transition: all var(--transition-fast);
}

.sidebar-nav-item:hover {
    background: var(--carbon-700);
    color: var(--text-primary);
}

.sidebar-nav-item.active {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.2) 0%, transparent 100%);
    color: var(--gold-500);
    border-left: 3px solid var(--gold-500);
}

.sidebar-nav-item i {
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--titanium-800);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: var(--z-sticky);
}

.header-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
}

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

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--titanium-700);
}

.avatar-lg {
    width: 60px;
    height: 60px;
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

.avatar-placeholder {
    background: var(--gradient-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--carbon-900);
    font-weight: var(--font-weight-bold);
}

/* Lists */
.list {
    list-style: none;
}

.list-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-bottom: 1px solid var(--titanium-800);
    transition: all var(--transition-fast);
}

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

.list-item:hover {
    background: var(--carbon-600);
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.list-item-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: var(--space-md);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--carbon-700);
    border: 1px solid var(--titanium-700);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--titanium-800);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--font-size-xl);
    cursor: pointer;
    padding: var(--space-xs);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-lg);
    overflow-y: auto;
    max-height: 60vh;
}

.modal-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--titanium-800);
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
}

/* Tabs */
.tabs {
    display: flex;
    gap: var(--space-xs);
    border-bottom: 1px solid var(--titanium-800);
    margin-bottom: var(--space-lg);
}

.tab {
    padding: var(--space-md) var(--space-lg);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--gold-500);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold-500);
}

/* Progress Steps */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

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

.step-number {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--titanium-800);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-sm);
}

.step.active .step-number {
    background: var(--gold-500);
    color: var(--carbon-900);
}

.step.completed .step-number {
    background: var(--accent-success);
    color: white;
}

.step-line {
    width: 40px;
    height: 2px;
    background: var(--titanium-800);
}

.step.completed + .step-line {
    background: var(--accent-success);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--titanium-800);
    border-top-color: var(--gold-500);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner-lg {
    width: 60px;
    height: 60px;
    border-width: 4px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: var(--z-tooltip);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    background: var(--carbon-700);
    border: 1px solid var(--titanium-700);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    box-shadow: var(--shadow-lg);
    animation: slideInRight var(--transition-normal);
    min-width: 300px;
}

.toast-success {
    border-left: 4px solid var(--accent-success);
}

.toast-error {
    border-left: 4px solid var(--accent-error);
}

.toast-warning {
    border-left: 4px solid var(--accent-warning);
}

.toast-info {
    border-left: 4px solid var(--accent-info);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
}

.empty-state-icon {
    font-size: var(--font-size-4xl);
    color: var(--titanium-700);
    margin-bottom: var(--space-md);
}

.empty-state-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-sm);
}

.empty-state-text {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

/* Search Bar */
.search-bar {
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: var(--space-md) var(--space-md) var(--space-md) var(--space-2xl);
    background: var(--carbon-700);
    border: 1px solid var(--titanium-800);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-family: var(--font-family);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--gold-500);
}

.search-bar i {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* View Switcher */
#view-switcher {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
}

#switcher-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D4AF37, #C5A028);
    border: 2px solid rgba(255,255,255,0.15);
    color: #0D0D0D;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(212,175,55,0.4);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#switcher-toggle:hover,
#switcher-toggle.active {
    transform: scale(1.1);
    box-shadow: 0 4px 30px rgba(212,175,55,0.6);
}

#switcher-menu {
    position: absolute;
    bottom: 60px;
    left: 0;
    background: #1A1A1A;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 8px;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
}

#switcher-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.switcher-header {
    padding: 8px 12px 4px;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.switcher-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}

.switcher-option:hover {
    background: #2A2A2A;
}

.switcher-option.sub {
    padding: 6px 12px 6px 24px;
    font-size: 13px;
    color: #aaa;
}

.switcher-option.sub:hover {
    color: #D4AF37;
}

.switcher-icon {
    font-size: 18px;
}

.switcher-divider {
    height: 1px;
    background: #333;
    margin: 6px 4px;
}