/* ==========================================================================
   DESIGN SYSTEM & VARIABLES (Apple-style Light Theme)
   ========================================================================== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #e8e8ed;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --accent: #0066cc;
    --accent-hover: #004499;
    --accent-light: rgba(0, 102, 204, 0.08);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-focus: rgba(0, 102, 204, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
    --navbar-height: 48px;
    --navbar-bg: rgba(255, 255, 255, 0.75);
    --glass-blur: 20px;
    --border-radius-xl: 20px;
    --border-radius-lg: 16px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.47059;
    letter-spacing: -0.022em;
    overflow-x: hidden;
    padding-top: var(--navbar-height);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-hover);
}

/* ==========================================================================
   NAVIGATION BAR (Apple-style Translucent)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background-color: var(--navbar-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.navbar-container {
    max-width: 1024px;
    height: 100%;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 19px;
    letter-spacing: -0.03em;
}

.brand-logo {
    color: var(--text-primary);
    transition: transform var(--transition-normal);
}

.brand-link:hover .brand-logo {
    transform: rotate(10deg);
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-item {
    font-size: 12px;
    color: var(--text-primary);
    opacity: 0.8;
    font-weight: 400;
    letter-spacing: -0.01em;
    transition: opacity var(--transition-fast);
}

.nav-item:hover, .nav-item.active {
    opacity: 1;
    color: var(--accent);
}

.nav-actions .btn-login {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    background-color: var(--accent-light);
    padding: 4px 12px;
    border-radius: 99px;
    transition: all var(--transition-fast);
}

.nav-actions .btn-login:hover {
    background-color: var(--accent);
    color: #ffffff;
}

.nav-actions .btn-logout {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.nav-actions .btn-logout:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   LANDING PAGE (Home View)
   ========================================================================== */
.hero-section {
    text-align: center;
    padding: 100px 22px 60px 22px;
    max-width: 800px;
    margin: 0 auto;
}

.hero-tagline {
    font-size: 17px;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hero-title {
    font-size: 64px;
    line-height: 1.07;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 24px;
    line-height: 1.25;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn-primary {
    display: inline-block;
    background-color: var(--accent);
    color: #ffffff;
    font-size: 17px;
    padding: 12px 28px;
    border-radius: 99px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    color: #ffffff;
    transform: scale(1.02);
}

.btn-secondary {
    display: inline-block;
    color: var(--accent);
    font-size: 17px;
    padding: 12px 28px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

/* App Showcase Section */
.showcase-section {
    background-color: var(--bg-secondary);
    padding: 80px 22px;
    border-top: 1px solid var(--border-color);
}

.section-container {
    max-width: 1024px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 19px;
    color: var(--text-secondary);
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.app-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.app-icon-wrapper {
    width: 56px;
    height: 56px;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 24px;
}

.app-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.app-badge.free {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.app-badge.pro {
    background-color: rgba(0, 102, 204, 0.1);
    color: var(--accent);
}

.app-name {
    font-size: 21px;
    font-weight: 600;
    margin-bottom: 8px;
}

.app-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 24px;
    flex-grow: 1;
}

.app-link {
    font-weight: 500;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Pricing/Abo-Modell Section */
.pricing-section {
    padding: 80px 22px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.pricing-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.pricing-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pricing-card.featured {
    border: 2px solid var(--accent);
}

.featured-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 99px;
    letter-spacing: 0.05em;
}

.pricing-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.pricing-price {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.pricing-price span {
    font-size: 17px;
    font-weight: 400;
    color: var(--text-secondary);
}

.pricing-features {
    list-style: none;
    margin-bottom: 32px;
    flex-grow: 1;
}

.pricing-features li {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-features li svg {
    color: #28a745;
}

.btn-pricing {
    width: 100%;
    text-align: center;
    padding: 10px;
    font-weight: 500;
}

/* ==========================================================================
   AUTH PAGE (Login View)
   ========================================================================== */
.auth-container {
    max-width: 380px;
    margin: 100px auto;
    padding: 0 22px;
    animation: fadeInUp 0.4s var(--transition-normal);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
}

.auth-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 10px 12px;
    font-family: inherit;
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--border-color-focus);
}

.btn-auth {
    width: 100%;
    margin-top: 10px;
}

.demo-credentials {
    margin-top: 24px;
    padding: 16px;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    border: 1px dashed var(--border-color);
}

.demo-credentials p {
    font-size: 13px;
    margin-bottom: 6px;
}

.demo-credentials code {
    font-family: monospace;
    background-color: var(--bg-tertiary);
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 12px;
}

/* ==========================================================================
   DASHBOARD PAGE
   ========================================================================== */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - var(--navbar-height));
    animation: fadeIn 0.4s var(--transition-normal);
}

/* Sidebar */
.dashboard-sidebar {
    width: 240px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 32px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.user-profile-card {
    padding: 16px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    margin-bottom: 24px;
}

.profile-name {
    font-size: 15px;
    font-weight: 600;
}

.profile-role {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.profile-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 99px;
    letter-spacing: 0.05em;
}

.profile-badge.free {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.profile-badge.pro {
    background-color: var(--accent-light);
    color: var(--accent);
}

.profile-badge.enterprise {
    background-color: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.sidebar-nav-item:hover, .sidebar-nav-item.active {
    background-color: var(--bg-tertiary);
    color: var(--accent);
}

/* Dashboard Content */
.dashboard-content {
    flex-grow: 1;
    padding: 40px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.dashboard-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.dashboard-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Tools Grid inside Dashboard */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.tool-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all var(--transition-normal);
}

.tool-card:hover:not(.locked) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tool-icon-box {
    width: 44px;
    height: 44px;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.tool-card:not(.locked) .tool-icon-box {
    color: var(--accent);
    background-color: var(--accent-light);
}

.tool-name {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
}

.tool-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 20px;
    flex-grow: 1;
}

.tool-action-btn {
    align-self: flex-start;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 99px;
    background-color: var(--accent-light);
    color: var(--accent);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tool-action-btn:hover {
    background-color: var(--accent);
    color: #ffffff;
}

/* Locked Card Styling */
.tool-card.locked {
    opacity: 0.6;
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

.tool-lock-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    color: var(--text-secondary);
}

.tool-card.locked .tool-action-btn {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* ==========================================================================
   ADMIN SETTINGS PAGE
   ========================================================================== */
.admin-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    margin-bottom: 32px;
}

.admin-section-title {
    font-size: 21px;
    font-weight: 600;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.admin-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Dynamic Demo Gating Selector */
.user-switch-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.user-switch-label {
    font-size: 14px;
    font-weight: 600;
}

.user-switch-select {
    padding: 8px 12px;
    font-family: inherit;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    outline: none;
    font-size: 14px;
    background-color: var(--bg-primary);
}

/* Permission Matrix Table */
.matrix-table-wrapper {
    overflow-x: auto;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.matrix-table th, .matrix-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.matrix-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background-color: var(--bg-secondary);
}

.matrix-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

.admin-save-bar {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

/* ==========================================================================
   ANIMATIONS & EFFECTS
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.view-transition {
    animation: fadeIn 0.4s var(--transition-normal);
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .hero-title {
        font-size: 40px;
    }
    .hero-subtitle {
        font-size: 19px;
    }
    .dashboard-layout {
        flex-direction: column;
    }
    .dashboard-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
    }
    .dashboard-content {
        padding: 20px;
    }
}

