/* ========================================================
   INDEX.CSS – Shared styles + Landing Page (App-Style)
   ======================================================== */

/* ==============================
   SHARED LAYOUT STYLES (all pages)
   ============================== */

/* Page container used by all inner pages */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
    position: relative;
    z-index: 1;
}

/* Simple top navbar for inner pages */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 60px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-brand {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}
.nav-links {
    display: flex;
    gap: 4px;
}
.nav-links a {
    padding: 6px 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s;
}
.nav-links a:hover { color: var(--text-primary); background: var(--bg-glass); }
.nav-links a.active { color: var(--accent-primary); background: rgba(139,92,246,0.1); }

/* Standort-Switch (navbar dropdown) */
.standort-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 16px;
    padding: 0 12px;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}
.standort-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
    transition: background 0.3s;
}
.standort-select {
    background: transparent;
    color: var(--text-primary);
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%239898b0' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    padding-right: 20px;
}
.standort-select option {
    background: #1a1a2e;
    color: #f0f0f5;
    padding: 8px;
}
@media (max-width: 768px) {
    .standort-wrapper { margin: 0 8px; padding: 0 8px; }
    .standort-select { font-size: 0.7rem; }
}

/* Glass card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0;
    overflow: hidden;
}

/* btn-ghost */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.15s;
}
.btn-ghost:hover { background: var(--bg-glass); color: var(--text-primary); }

/* Admin-specific layout */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 56px);
    position: relative;
    z-index: 1;
}
.admin-sidebar {
    width: 220px;
    padding: 1.5rem 1rem;
    border-right: 1px solid var(--border-color);
    background: rgba(0,0,0,0.2);
    flex-shrink: 0;
}
.admin-main {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow-x: auto;
}
.sidebar-section {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 1rem 0.75rem 0.5rem;
    font-weight: 600;
}
.sidebar-link {
    display: block;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s;
    cursor: pointer;
    margin-bottom: 2px;
}
.sidebar-link:hover { background: var(--bg-glass); color: var(--text-primary); }
.sidebar-link.active { background: rgba(139,92,246,0.12); color: var(--accent-primary); }

.filter-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Tagesbuch additions */
:root {
    --surface-1: var(--bg-secondary);
    --surface-2: var(--bg-tertiary);
    --border: var(--border-color);
    --primary: var(--accent-primary);
    --accent: var(--accent-secondary);
}

/* ==============================
   LANDING PAGE – APP STYLE
   ============================== */

.app-container {
    min-height: 100vh;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
}

/* ---------- HERO HEADER ---------- */
.hero-header {
    position: relative;
    padding: 3rem 2rem 2rem;
    overflow: hidden;
}
.hero-bg-glow {
    position: absolute;
    top: -80px; left: 0; right: 0;
    height: 400px;
    pointer-events: none;
    opacity: 0.6;
    transition: background 0.5s ease;
}
.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Active Location (clickable) */
.active-location {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}
.active-location:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.active-location:active {
    transform: translateY(0);
}
.active-logo-ring {
    width: 64px; height: 64px;
    border-radius: 18px;
    border: 2px solid #8b5cf6;
    padding: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    overflow: hidden;
}
.active-logo-img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 14px;
}
.active-info {
    flex: 1;
    min-width: 0;
}
.active-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.active-name {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.active-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}
.switch-indicator {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all 0.2s;
}
.active-location:hover .switch-indicator {
    background: rgba(139,92,246,0.15);
    color: var(--accent-primary);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    padding: 1rem 0;
}
.hero-stat {
    text-align: center;
}
.hero-stat .stat-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}
.hero-stat .stat-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}
.hero-stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border-color);
}

/* ---------- LOCATION SWITCHER OVERLAY ---------- */
.switcher-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.switcher-overlay.open {
    opacity: 1;
    visibility: visible;
}
.switcher-panel {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(145deg, #1a1a2e 0%, #0d0d1a 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    overflow: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}
.switcher-overlay.open .switcher-panel {
    transform: translateY(0) scale(1);
}
.switcher-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.switcher-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.switcher-close {
    width: 36px; height: 36px;
    border-radius: 10px;
    border: none;
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.switcher-close:hover {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}

.switcher-list {
    padding: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}
.switcher-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 4px;
}
.switcher-item:hover {
    background: rgba(255,255,255,0.05);
}
.switcher-item.active {
    background: rgba(139,92,246,0.1);
    border: 1px solid rgba(139,92,246,0.2);
}
.switcher-item-logo {
    width: 44px; height: 44px;
    border-radius: 12px;
    border: 2px solid #555;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    flex-shrink: 0;
    overflow: hidden;
}
.switcher-logo-img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 9px;
}
.switcher-emoji {
    font-size: 1.25rem;
    align-items: center;
    justify-content: center;
}
.switcher-item-info {
    flex: 1;
    min-width: 0;
}
.switcher-item-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}
.switcher-item-kuerzel {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.switcher-check {
    color: #10b981;
    font-size: 1.1rem;
    font-weight: 700;
}
.switcher-chevron {
    color: var(--text-muted);
    font-size: 1.3rem;
}

.switcher-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.switcher-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.15s;
}
.switcher-logout:hover {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
}
.logout-icon { font-size: 1.1rem; }

/* ---------- LOCATION CARDS ---------- */
.locations-section,
.modules-section,
.notifications-section {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

/* ---------- NOTIFICATION CARDS ---------- */
.notif-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}
.notif-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(12px);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.notif-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
}
.notif-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.15);
}
.notif-icon {
    font-size: 1.5rem;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}
.notif-body { flex: 1; }
.notif-count {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
}
.notif-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}
.notif-arrow {
    font-size: 1rem;
    color: var(--text-muted);
    opacity: 0;
    transition: all 0.2s;
}
.notif-card:hover .notif-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* Card types */
.notif-chat::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.notif-chat .notif-icon { background: rgba(59,130,246,0.15); }
.notif-chat .notif-count { color: #60a5fa; }

.notif-freigabe::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.notif-freigabe .notif-icon { background: rgba(139,92,246,0.15); }
.notif-freigabe .notif-count { color: #a78bfa; }

.notif-problem::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.notif-problem .notif-icon { background: rgba(245,158,11,0.15); }
.notif-problem .notif-count { color: #fbbf24; }

.notif-tausch::before { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.notif-tausch .notif-icon { background: rgba(6,182,212,0.15); }
.notif-tausch .notif-count { color: #22d3ee; }
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.section-icon {
    font-size: 1.1rem;
}

.location-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}
.loc-card {
    position: relative;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    padding: 0;
}
.loc-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.loc-card.active {
    border-color: rgba(139,92,246,0.3);
    box-shadow: 0 0 0 1px rgba(139,92,246,0.15), 0 8px 30px rgba(139,92,246,0.15);
}
.loc-card-glow {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    opacity: 0.7;
    transition: height 0.3s, opacity 0.3s;
}
.loc-card:hover .loc-card-glow {
    height: 6px;
    opacity: 1;
}
.loc-card-content {
    padding: 1.5rem 1rem 1.25rem;
    text-align: center;
}
.loc-logo-wrap {
    width: 56px; height: 56px;
    border-radius: 16px;
    border: 2px solid #555;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    overflow: hidden;
    padding: 3px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.loc-card:hover .loc-logo-wrap {
    transform: scale(1.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.loc-logo {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 13px;
}
.loc-emoji {
    font-size: 1.5rem;
    align-items: center;
    justify-content: center;
}
.loc-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
}
.loc-kuerzel {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.loc-active-badge {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    color: #10b981;
    background: rgba(16,185,129,0.1);
    padding: 3px 10px;
    border-radius: 20px;
}

/* ---------- MODULE GRID (NEW) ---------- */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
}
.module-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
    cursor: pointer;
}
.module-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    transform: translateX(4px);
}
.module-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
    transition: all 0.2s;
}
.module-card:hover .module-icon {
    background: var(--accent-gradient);
    box-shadow: 0 4px 16px var(--accent-glow);
    transform: scale(1.05);
}
.module-text {
    flex: 1;
    min-width: 0;
}
.module-text h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 2px;
}
.module-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}
.module-arrow {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: all 0.2s;
    opacity: 0;
}
.module-card:hover .module-arrow {
    opacity: 1;
    transform: translateX(4px);
    color: var(--accent-primary);
}

/* ---------- FOOTER ---------- */
.app-footer {
    max-width: 960px;
    margin: 2rem auto 0;
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.04);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
    .hero-header { padding: 2rem 1rem 1.5rem; }
    .active-location { padding: 1rem; gap: 0.75rem; border-radius: 16px; }
    .active-logo-ring { width: 48px; height: 48px; }
    .active-name { font-size: 1.3rem; }
    .hero-stats { gap: 1rem; }
    .hero-stat .stat-num { font-size: 1.2rem; }
    .location-cards { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.75rem; }
    .loc-card-content { padding: 1.25rem 0.75rem 1rem; }
    .loc-logo-wrap { width: 44px; height: 44px; }
    .loc-name { font-size: 0.8rem; }
    .module-grid { grid-template-columns: 1fr; }
    .locations-section, .modules-section { padding: 0 1rem 1.5rem; }
    .switcher-panel { margin: 0 1rem; }
}
