/* ============================================
   AC Media Library — Base Layout
   ============================================ */

:root {
    --md-sys-color-primary: #1b6b4b;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #a3f7cc;
    --md-sys-color-on-primary-container: #002114;
    --md-sys-color-secondary: #4d6357;
    --md-sys-color-on-secondary: #ffffff;
    --md-sys-color-secondary-container: #cfe9da;
    --md-sys-color-on-secondary-container: #092016;
    --md-sys-color-tertiary: #3d6473;
    --md-sys-color-on-tertiary: #ffffff;
    --md-sys-color-error: #ba1a1a;
    --md-sys-color-on-error: #ffffff;
    --md-sys-color-error-container: #ffdad6;
    --md-sys-color-on-error-container: #410002;
    --md-sys-color-background: #fbfdf8;
    --md-sys-color-on-background: #191c1a;
    --md-sys-color-surface: #fbfdf8;
    --md-sys-color-on-surface: #191c1a;
    --md-sys-color-surface-variant: #dce5dc;
    --md-sys-color-on-surface-variant: #414941;
    --md-sys-color-outline: #717971;
    --md-sys-color-outline-variant: #c1c9c0;
    --md-sys-color-shadow: #000000;
    --md-sys-color-inverse-surface: #2e312f;
    --md-sys-color-inverse-on-surface: #f0f1ec;
    --md-sys-color-inverse-primary: #86dbb1;
    --md-elevation-level1: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --md-elevation-level2: 0 3px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.04);
    --md-elevation-level3: 0 10px 20px rgba(0, 0, 0, 0.08), 0 3px 6px rgba(0, 0, 0, 0.04);
    --md-elevation-level4: 0 14px 28px rgba(0, 0, 0, 0.1), 0 5px 10px rgba(0, 0, 0, 0.05);
    --md-sys-shape-corner-small: 8px;
    --md-sys-shape-corner-medium: 12px;
    --md-sys-shape-corner-large: 16px;
    --md-sys-shape-corner-extra-large: 20px;
    --md-sys-motion-duration: 0.2s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:
        'Inter',
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    background: var(--md-sys-color-background);
    color: var(--md-sys-color-on-background);
    line-height: 1.5;
    min-height: 100vh;
}

/* ============ APP BAR ============ */

.app-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
    box-shadow: var(--md-elevation-level2);
}

.app-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-bar-icon {
    font-size: 28px;
}

.app-bar-title {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.app-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============ LAYOUT ============ */

.layout {
    display: flex;
    min-height: calc(100vh - 64px);
    margin-top: 64px;
}

/* ============ NAVIGATION RAIL ============ */

.navigation-rail {
    width: 88px;
    background: var(--md-sys-color-surface);
    border-right: 1px solid var(--md-sys-color-outline-variant);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 4px;
    gap: 4px;
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    z-index: 50;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 0;
    width: 80px;
    border: none;
    background: transparent;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    border-radius: var(--md-sys-shape-corner-large);
    transition: all var(--md-sys-motion-duration);
    font-family: inherit;
    position: relative;
}

.nav-item:hover {
    background: var(--md-sys-color-surface-variant);
}

.nav-item.active {
    color: var(--md-sys-color-primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 32px;
    background: var(--md-sys-color-primary);
    border-radius: 0 3px 3px 0;
}

.nav-icon {
    font-size: 24px;
}

.nav-label {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* ============ CONTENT ============ */

.content {
    flex: 1;
    margin-left: 88px;
    padding: 24px 32px;
    max-width: 100%;
}

/* ============ BUTTONS ============ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--md-sys-shape-corner-large);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--md-sys-motion-duration);
    text-transform: none;
    letter-spacing: 0.01em;
    line-height: 1.25;
}

.btn-primary {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    box-shadow: var(--md-elevation-level1);
}

.btn-primary:hover {
    box-shadow: var(--md-elevation-level2);
    filter: brightness(1.05);
}

.btn-text {
    background: transparent;
    color: var(--md-sys-color-primary);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.btn-text:hover {
    background: rgba(27, 107, 75, 0.08);
}

/* ============================================
   AC Media Library — Auth (Login / Register)
   ============================================ */

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--md-sys-color-background);
    padding: 24px;
}

.auth-box {
    display: flex;
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-large);
    box-shadow: var(--md-elevation-level3);
    overflow: hidden;
    max-width: 960px;
    width: 100%;
    min-height: 600px;
}

.auth-left {
    flex: 1;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-logo {
    margin-bottom: 32px;
}

.auth-logo img {
    max-width: 180px;
    height: auto;
}

.auth-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 32px;
}

.auth-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface-variant);
}

.auth-field input {
    padding: 12px 16px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-small);
    font-family: inherit;
    font-size: 15px;
    background: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    transition: border-color var(--md-sys-motion-duration);
}

.auth-field input:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 3px rgba(27, 107, 75, 0.12);
}

.auth-field input::placeholder {
    color: var(--md-sys-color-outline);
}

.auth-error {
    font-size: 14px;
    color: var(--md-sys-color-error);
    margin-bottom: 16px;
    min-height: 20px;
    display: none;
}

.auth-error.show {
    display: block;
}

.auth-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    justify-content: center;
    margin-bottom: 20px;
}

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

.auth-toggle {
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
    text-align: center;
}

.auth-toggle .btn-text {
    font-size: 14px;
    font-weight: 600;
    padding: 4px 8px;
    vertical-align: baseline;
}

.auth-right {
    flex: 1;
    display: flex;
    align-items: stretch;
    background: var(--md-sys-color-primary);
    min-height: 100%;
}

.auth-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============ Responsive ============ */

@media (max-width: 768px) {
    .auth-box {
        flex-direction: column-reverse;
        max-width: 480px;
    }

    .auth-right {
        min-height: 200px;
        max-height: 240px;
    }

    .auth-left {
        padding: 32px 24px;
    }
}

/* ============================================
   Success Overlay (nach Registrierung)
   ============================================ */

.auth-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.auth-overlay.show {
    display: flex;
}

.auth-overlay-box {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-large);
    box-shadow: var(--md-elevation-level4);
    padding: 48px 40px 32px;
    max-width: 440px;
    width: 90%;
    text-align: center;
}

.auth-overlay-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.auth-overlay-box h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 12px;
}

.auth-overlay-box p {
    font-size: 15px;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.6;
    margin-bottom: 28px;
}

.auth-overlay-box .btn {
    padding: 12px 40px;
    font-size: 15px;
}


