html, body { margin: 0; padding: 0; height: 100%; }

/* ====================================================================================
   AUTH / LOGIN VIEW: Identisches Layout wie index.html
   ==================================================================================== */
body.auth-view { 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-view header {
    flex-shrink: 0;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    padding: var(--spacer-medium, 6vh) 0 0 0;
    display: flex;
    justify-content: center;
}

body.auth-view main {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px 20px;
    box-sizing: border-box;
}

body.auth-view .container { 
    width: 100%; 
    max-width: 540px; 
    margin: 0 auto;
    text-transform: uppercase;
}

body.auth-view footer {
    flex-shrink: 0;
    width: 100%;
    text-transform: none;
}

body.auth-view footer a,
body.auth-view footer p,
body.auth-view footer span {
    text-transform: none;
}

.sticky-header-wrapper {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 999;
    background: #ffffff;
    width: 100%;
    padding-top: 35px;
    padding-bottom: 20px;
    margin-bottom: 0 !important;
    border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.1));
    box-sizing: border-box;
}

/* CARDS-GRID: Ausreichend Abstand unter dem fixierten Header */
body.dashboard-view .cards-grid {
    margin-top: 30px !important;
}

/* ANCHOR-JUMP FIX: Verhindert, dass gespeicherte Karten unter den Header springen */
.entry-card {
    scroll-margin-top: 360px !important;
}

h2 { margin-top: 0; margin-bottom: 30px; text-align: center; letter-spacing: -0.015em; }

/* QUICK NAVIGATION DROPDOWN (SNAP & POST-EDIT) */
.quick-nav-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 10px auto;
    box-sizing: border-box;
}
.quick-nav-select {
    width: 100%;
    height: 40px !important;
    background: #ffffff;
    color: #000000;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.1)) !important;
    font-family: inherit;
    font-size: var(--font-size-regular, 1rem) !important;
    letter-spacing: -0.015em;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    padding: 0 16px !important;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.quick-nav-select:hover {
    border-color: rgba(0, 0, 0, 0.4) !important;
    background: rgba(0, 0, 0, 0.02);
}
.quick-nav-select:focus {
    outline: none !important;
    border-color: rgba(0, 0, 0, 0.8) !important;
}

/* NEW POST ACCORDION WRAPPER (OHNE RAND, VOLLE BREITE) */
.new-post-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 35px auto;
    border: none;
    background: transparent;
    box-sizing: border-box;
}
.new-post-toggle-icon span {
    display: block;
    width: 100%;
    height: 1px;
    background: #ffffff;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.is-open .new-post-toggle-icon span:first-child {
    transform: translateY(4.5px) rotate(45deg);
}
.is-open .new-post-toggle-icon span:last-child {
    transform: translateY(-4.5px) rotate(-45deg);
}

.new-post-header {
    width: 100%;
    height: 40px;
    background: #000000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 16px;
    box-sizing: border-box;
    cursor: pointer;
    font-size: var(--font-size-regular, 1rem);
    letter-spacing: -0.015em;
    user-select: none;
    text-align: center;
}

/* WEISSER HEADER-STIL FÜR MOMENTS BARS */
.new-post-header.header-light {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.15)) !important;
    transition: border-color 0.2s ease;
}
.new-post-header.header-light:hover {
    border-color: rgba(0, 0, 0, 0.4) !important;
}
.new-post-header.header-light .new-post-toggle-icon span {
    background: #000000 !important;
}

.new-post-toggle-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}
.new-post-toggle-icon span {
    display: block;
    width: 100%;
    height: 1px;
    background: #ffffff;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.new-post-header.is-open .new-post-toggle-icon span:first-child {
    transform: translateY(4.5px) rotate(45deg);
}
.new-post-header.is-open .new-post-toggle-icon span:last-child {
    transform: translateY(-4.5px) rotate(-45deg);
}

.new-post-body {
    padding: 12px 0 0 0;
    display: none;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
}
.new-post-body.open {
    display: flex;
}

/* CARDS GRID */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px; 
    width: 100%;
}
@media (min-width: 680px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; } 
}
@media (min-width: 1200px) {
    .cards-grid { grid-template-columns: repeat(3, 1fr); gap: 30px; } 
}

.burger-btn {
    width: 100% !important;
    height: 38px !important;
    background: #ffffff !important;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.1)) !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #000000;
    transition: all 0.2s ease;
    box-sizing: border-box;
    border-radius: 0 !important;
    appearance: none;
    -webkit-appearance: none;
    margin-bottom: 0 !important;
}
.burger-btn:hover {
    border-color: rgba(0, 0, 0, 0.8) !important;
    background: rgba(0, 0, 0, 0.03) !important;
}
.burger-btn.active {
    background: #000000 !important;
    color: #ffffff !important;
    border-color: #000000 !important;
}

.card-collapsible-fields {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.preview-mode-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}
.preview-mode-btn {
    flex: 1;
    background: #ffffff;
    border: 1px solid var(--border, rgba(0,0,0,0.1));
    font-size: 10px;
    letter-spacing: 0.05em;
    padding: 4px 0;
    cursor: pointer;
    font-family: inherit;
    color: #888888;
    text-align: center;
    transition: all 0.18s ease;
}
.preview-mode-btn:hover {
    color: #000000;
    border-color: rgba(0, 0, 0, 0.3);
}
.preview-mode-btn.active {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.entry-card img {
    width: 100%; 
    display: block;
    aspect-ratio: 1080 / 606;
    object-fit: cover;
    border: 1px solid var(--border, rgba(0,0,0,0.1));
    margin-bottom: 8px; 
    box-sizing: border-box;
    background: #ffffff;
    transition: aspect-ratio 0.2s ease, padding 0.25s ease;
}
.entry-card img.crop-insta-preview {
    aspect-ratio: 4 / 5 !important;
    object-fit: contain !important;
}
.entry-card img.pad-90 { padding: 5% !important; }
.entry-card img.pad-85 { padding: 7.5% !important; }

form { display: flex; flex-direction: column; gap: 8px; margin: 0; }

input[type="text"], input[type="password"], textarea, .btn, .file-upload-wrapper, .toggle-wrapper {
    margin: 0 !important;
    width: 100%; 
    box-sizing: border-box;
    border-radius: 0 !important; 
    -webkit-appearance: none; 
    appearance: none;
    font-family: inherit; 
    font-size: var(--font-size-regular, 1rem) !important; 
    line-height: 1.2; 
    font-weight: 400; 
    letter-spacing: -0.015em;
    text-align: center;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.1));
    background: #ffffff;
    color: #000000;
}

input[type="text"], input[type="password"], .btn, .file-upload-wrapper, .toggle-wrapper, .card-gemini-prompt, .btn-card-gemini {
    height: 40px !important;
    padding: 0 15px;
}

textarea, .card-raw-inspiration {
    height: 80px;
    padding: 10px 15px;
    resize: vertical;
    color: inherit;
}

input[type="text"]:focus, input[type="password"]:focus, textarea:focus { 
    outline: none !important; 
    box-shadow: none !important; 
    border-color: rgba(0, 0, 0, 0.8) !important; 
}

.file-upload-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #757575;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: border-color 0.18s ease, color 0.18s ease;
}
.file-upload-wrapper:hover {
    border-color: rgba(0, 0, 0, 0.4);
    color: #000000;
}
.file-upload-wrapper input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.toggle-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #757575;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.18s ease, color 0.18s ease;
}
.toggle-wrapper:hover {
    border-color: rgba(0, 0, 0, 0.4);
    color: #000000;
}
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider-round {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 18px;
}
.slider-round:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
.toggle-switch input:checked + .slider-round { background-color: #000000; }
.toggle-switch input:checked + .slider-round:before { transform: translateX(16px); }

.toggle-row-group { display: flex; gap: 8px; width: 100%; }
.toggle-row-group .toggle-wrapper {
    flex: 1;
    font-size: var(--font-size-regular, 1rem) !important;
    padding: 0 15px;
}
.toggle-wrapper span { font-size: var(--font-size-regular, 1rem) !important; }

.toggle-switch input:checked + .slider-round.danger { background-color: #ff3b30 !important; }

.btn {
    color: rgba(0,0,0,0.45);
    cursor: pointer;
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: color 0.3s ease, border-color 0.3s ease;
}
.btn:hover { color: rgba(0,0,0,0.8); border-color: rgba(0, 0, 0, 0.4); }

.btn-card-gemini {
    background: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #000000 !important;
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.btn-card-gemini:hover { opacity: 0.85; }

.alert { padding: 15px; margin-bottom: 20px; border-left: 3px solid; background: rgba(0,0,0,0.02); text-transform: none; text-align: center; }
.success { color: #155724; border-color: #155724; }
.error { color: #721c24; border-color: #721c24; }

.nav-links { display: inline-block; font-size: var(--font-size-regular, 1rem); color: inherit; opacity: 0.5; text-decoration: none; margin: 0 15px; }
.nav-links:hover { opacity: 1; text-decoration: none; }
.empty-state { text-align: center; padding: 40px; color: #666; border: 1px dashed #ccc; }

.controls-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 25px;
    width: 100%;
}
@media (min-width: 680px) {
    .controls-bar { grid-template-columns: auto 2fr 1fr 1fr; }
}
.controls-bar input, .controls-bar select, .controls-bar .btn-refresh {
    height: 40px !important;
    padding: 0 12px !important;
    margin: 0 !important;
    box-sizing: border-box;
    border-radius: 0 !important;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.1));
    background: #ffffff;
    font-family: inherit;
    font-size: var(--font-size-regular, 1rem);
    letter-spacing: -0.015em;
    text-align: center;
    -webkit-appearance: none;
    appearance: none;
}
.btn-refresh { 
    cursor: pointer; 
    white-space: nowrap; 
    background: #000000 !important; 
    color: #ffffff !important; 
    border: 1px solid #000000 !important;
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 6px; 
    text-decoration: none; 
    transition: opacity 0.2s ease;
}
.btn-refresh:hover { 
    opacity: 0.85;
    border-color: #000000 !important; 
}

/* AUTO-FILL BUTTON IM NEW-POST FORMULAR */
#btn_import_amazon {
    background: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #000000 !important;
    border-radius: 0 !important;
    cursor: pointer;
    transition: opacity 0.2s ease;
}
#btn_import_amazon:hover {
    opacity: 0.85;
}


.bottom-nav { text-align: center; margin-top: 30px; display: flex; justify-content: center; gap: 20px; }
.bottom-nav a { opacity: 0.5; font-size: 12px; text-decoration: none; color: inherit; letter-spacing: 0.05em; transition: opacity 0.3s; }
.bottom-nav a:hover { opacity: 1; }

.status-bar { display: flex; justify-content: space-between; align-items: center; font-size: 11px; letter-spacing: 0.05em; margin-bottom: 8px; padding: 0 4px; }
.status-indicator { display: flex; align-items: center; gap: 6px; color: #aaaaaa; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background-color: #d1d1d1; display: inline-block; }
.status-indicator.is-online { color: #000000; }
.status-indicator.is-online .status-dot { background-color: #2ecc71; box-shadow: 0 0 6px rgba(46, 204, 113, 0.6); }