:root {
    --brand-teal: #0f172a;
    --brand-teal-light: #1e293b;
    --brand-teal-bg: #eff6ff;
    --brand-teal-contrast: #ffffff;
    --brand-orange: #3b82f6;
    --brand-orange-hover: #2563eb;
    --brand-orange-contrast: #ffffff;
    --brand-peach: #eff6ff;
    --brand-peach-contrast: #0f172a;
    --brand-gray: #f8fafc;
    --brand-dark: #0f172a;
    --brand-muted: #64748b;
    --white: #ffffff;
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    --hover-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global resets & styling */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--brand-gray);
    color: var(--brand-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--brand-teal);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--brand-orange);
}

/* Custom CSS layout utility classes */
.bg-brand-gray { background-color: var(--brand-gray); }
.bg-brand-teal { background-color: var(--brand-teal); }
.bg-brand-orange { background-color: var(--brand-orange); }
.text-brand-dark { color: var(--brand-dark); }
.text-brand-peach { color: var(--brand-peach); }
.text-white { color: var(--white); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-grow { flex-grow: 1; }
.flex-wrap { flex-wrap: wrap; }

.grid { display: grid; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.rounded-lg { border-radius: var(--border-radius-md); }
.rounded-xl { border-radius: var(--border-radius-lg); }
.shadow-md { box-shadow: var(--card-shadow); }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }

.w-full { width: 100%; }
.min-h-screen { min-height: 100vh; }
.border-l { border-left-width: 1px; }
.border-white\/30 { border-color: rgba(255, 255, 255, 0.3); }
.pl-3 { padding-left: 0.75rem; }

/* Buttons & Forms */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--brand-orange);
    color: var(--brand-orange-contrast);
}
.btn-primary:hover {
    background-color: var(--brand-orange-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--brand-teal);
    color: var(--brand-teal-contrast);
}
.btn-secondary:hover {
    background-color: var(--brand-teal-light);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--brand-teal);
    color: var(--brand-teal);
}
.btn-outline:hover {
    background-color: var(--brand-teal);
    color: var(--brand-teal-contrast);
}

.btn-outline-orange {
    background-color: transparent;
    border: 1px solid var(--brand-orange);
    color: var(--brand-orange);
}
.btn-outline-orange:hover {
    background-color: var(--brand-orange);
    color: var(--white);
}

/* Auth Screens */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    flex-grow: 1;
}

.auth-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--brand-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23212326' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    cursor: pointer;
}
.form-control:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 3px rgba(27, 57, 57, 0.15);
}

/* Timeline/Zeitleiste scrolling view */
.timeline-scroller-wrapper {
    background: var(--brand-teal);
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-scroller {
    overflow-x: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.timeline-scroller::-webkit-scrollbar {
    height: 4px;
}
.timeline-scroller::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

.timeline-nav-btn {
    color: var(--white);
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.timeline-nav-btn:hover {
    background-color: var(--white);
    color: var(--brand-teal);
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.timeline-months {
    display: flex;
    gap: 1.5rem;
    margin: 0 1rem;
}

.timeline-month-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 0.6rem 0.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255,255,255,0.06);
    cursor: pointer;
    transition: var(--transition);
    width: 145px;
    min-height: 58px;
    text-align: center;
    flex-shrink: 0;
}
.timeline-month-item:hover {
    background: rgba(255,255,255,0.12);
    color: var(--white);
}
.timeline-month-item.active {
    color: var(--brand-teal);
    background: var(--white);
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.month-label {
    font-size: 0.85rem;
    line-height: 1.2;
}

.month-channels {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.75rem;
    margin-top: 1px;
}

.channel-count {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

/* Inactive State: soft pastel colors for better visibility on dark teal */
.timeline-month-item:not(.active) .channel-count[data-channel="ki_blog"] i { color: #80cbc4; }
.timeline-month-item:not(.active) .channel-count[data-channel="facebook"] i { color: #82b1ff; }
.timeline-month-item:not(.active) .channel-count[data-channel="instagram"] i { color: #ff8a80; }
.timeline-month-item:not(.active) .channel-count[data-channel="linkedin"] i { color: #80d8ff; }

/* Active State: official solid platform colors on white background */
.timeline-month-item.active .channel-count[data-channel="ki_blog"] i { color: var(--brand-teal); }
.timeline-month-item.active .channel-count[data-channel="facebook"] i { color: #1877f2; }
.timeline-month-item.active .channel-count[data-channel="instagram"] i { color: #e1306c; }
.timeline-month-item.active .channel-count[data-channel="linkedin"] i { color: #0077b5; }

.channel-count .count-num {
    font-size: 0.65rem;
    font-weight: 500;
}
.timeline-month-item:not(.active) .channel-count .count-num {
    color: rgba(255, 255, 255, 0.7);
}
.timeline-month-item.active .channel-count .count-num {
    color: var(--brand-muted);
}
.no-posts {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}
.timeline-month-item.active .no-posts {
    color: var(--brand-muted);
}

/* Layout for main dashboard */
.dashboard-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: 100%;
}

/* Sidebar and themes */
.sidebar-panel {
    background: var(--white);
    border-right: 1px solid rgba(27, 57, 57, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-header {
    padding: 1.2rem;
    border-bottom: 1px solid rgba(27, 57, 57, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-scroll {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.2rem;
}

.theme-card-draggable {
    background: var(--brand-teal-bg);
    border-left: 4px solid var(--brand-teal);
    padding: 1rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 0.8rem;
    cursor: grab;
    user-select: none;
    transition: var(--transition);
}
.theme-card-draggable:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow);
}
.theme-card-draggable:active {
    cursor: grabbing;
}

.theme-card-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--brand-muted);
}

/* Calendar Grid */
.calendar-panel {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    height: 100%;
    overflow: hidden;
}

.calendar-header-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-muted);
    margin-bottom: 0.5rem;
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-auto-rows: minmax(75px, 1fr);
    gap: 6px;
    flex-grow: 1;
}

.calendar-day-cell {
    background: var(--white);
    border-radius: var(--border-radius-md);
    padding: 0.5rem;
    border: 1px solid rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}
.calendar-day-cell:hover {
    box-shadow: var(--card-shadow);
}
.calendar-day-cell.other-month {
    background: rgba(0, 0, 0, 0.02);
}
.calendar-day-cell.other-month .day-number {
    color: var(--brand-muted);
}
.calendar-day-cell.today {
    border: 2px solid var(--brand-orange);
}

.day-number-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.day-number {
    color: var(--brand-dark);
}

.calendar-day-cell.dragover {
    background: rgba(235, 75, 48, 0.05);
    border: 1px dashed var(--brand-orange);
}

.post-badge {
    position: relative;
    padding: 0.35rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    transition: var(--transition);
}
.post-badge:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Status colors and channel styles */
.post-badge.ki_blog { background-color: var(--brand-teal-bg); border-left: 3px solid var(--brand-teal); color: var(--brand-teal); }
.post-badge.facebook { background-color: #e7f3ff; border-left: 3px solid #1877f2; color: #1877f2; }
.post-badge.instagram { background-color: #fdf0f5; border-left: 3px solid #e1306c; color: #e1306c; }
.post-badge.linkedin { background-color: #e8f4f9; border-left: 3px solid #0077b5; color: #0077b5; }

.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
.post-badge .status-indicator {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    margin-right: 0;
}
.status-draft { background-color: var(--brand-muted); }
.status-under_review { background-color: #ff9f43; }
.status-approved { background-color: #28c76f; }
.status-correction_needed { background-color: var(--brand-orange); }

/* Post Creator/Editor Drawer or Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(27, 57, 57, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    width: 90%;
    max-width: 1100px;
    height: 85vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}

.modal-form-panel {
    padding: 2rem;
    overflow-y: auto;
    border-right: 1px solid rgba(0,0,0,0.08);
}

.modal-preview-panel {
    background: var(--brand-gray);
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tab-nav {
    display: flex;
    border-bottom: 2px solid rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.tab-btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--brand-muted);
    padding: 0.5rem 0.2rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}
.tab-btn.active, .tab-btn:hover {
    color: var(--brand-teal);
    border-bottom-color: var(--brand-teal);
}

/* Real-time Previews Styling */
.preview-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-muted);
    margin-bottom: 1.2rem;
    align-self: flex-start;
}

/* Facebook Preview Card Mockup */
.facebook-preview-card {
    background: var(--white);
    border: 1px solid #dddfe2;
    border-radius: 8px;
    font-family: Helvetica, Arial, sans-serif;
    color: #1c1e21;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.facebook-header {
    display: flex;
    align-items: center;
    padding: 12px;
    gap: 8px;
}

.facebook-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--brand-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.facebook-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.facebook-author-info {
    display: flex;
    flex-direction: column;
}

.facebook-author-name {
    font-size: 14px;
    font-weight: bold;
    color: #050505;
}

.facebook-time-row {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #65676b;
    margin-top: 2px;
}

.facebook-text {
    padding: 4px 12px 12px 12px;
    font-size: 14px;
    white-space: pre-wrap;
    word-break: break-word;
}

.facebook-media {
    width: 100%;
    background: #f0f2f5;
    border-top: 1px solid #f0f2f5;
    border-bottom: 1px solid #f0f2f5;
}

.facebook-media img {
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 320px;
    object-fit: cover;
    display: block;
}

.facebook-footer {
    display: flex;
    border-top: 1px solid #e5e5e5;
    padding: 4px;
    justify-content: space-around;
}

.facebook-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #65676b;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}
.facebook-btn:hover {
    background-color: #f2f2f2;
}

/* Instagram Preview Card Mockup */
.instagram-preview-card {
    background: var(--white);
    border: 1px solid #dbdbdb;
    border-radius: 3px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #262626;
    width: 100%;
    max-width: 420px;
}

.instagram-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
}

.instagram-avatar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.instagram-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--brand-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbdbdb;
    overflow: hidden;
}

.instagram-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.instagram-username {
    font-size: 13px;
    font-weight: 600;
}

.instagram-media {
    width: 100%;
    aspect-ratio: 1/1;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.instagram-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.instagram-actions {
    padding: 10px 14px 6px 14px;
    display: flex;
    justify-content: space-between;
    font-size: 20px;
}

.instagram-actions-left {
    display: flex;
    gap: 16px;
}

.instagram-actions i {
    cursor: pointer;
}

.instagram-caption-section {
    padding: 0 14px 14px 14px;
    font-size: 13.5px;
    line-height: 1.4;
}

.instagram-caption-text {
    white-space: pre-wrap;
    word-break: break-word;
}

/* LinkedIn Preview Card Mockup */
.linkedin-preview-card {
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Fira Sans", Ubuntu, Oxygen, "Oxygen Sans", Cantarell, "Droid Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Lucida Grande", Helvetica, Arial, sans-serif;
    color: rgba(0,0,0,0.9);
    width: 100%;
    max-width: 480px;
}

.linkedin-header {
    display: flex;
    padding: 12px 16px;
    gap: 12px;
}

.linkedin-avatar {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    background-color: var(--brand-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.linkedin-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.linkedin-info {
    display: flex;
    flex-direction: column;
}

.linkedin-name {
    font-size: 14px;
    font-weight: 600;
}

.linkedin-meta-followers {
    font-size: 12px;
    color: rgba(0,0,0,0.6);
}

.linkedin-meta-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: rgba(0,0,0,0.6);
    margin-top: 1px;
}

.linkedin-text {
    padding: 0 16px 12px 16px;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.linkedin-media {
    width: 100%;
    background: #f3f6f8;
}

.linkedin-media img {
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 280px;
    object-fit: cover;
    display: block;
}

.linkedin-footer {
    display: flex;
    border-top: 1px solid rgba(0,0,0,0.08);
    padding: 4px 8px;
    justify-content: flex-start;
    gap: 12px;
}

.linkedin-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(0,0,0,0.6);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.linkedin-btn .lbl-desktop {
    display: none;
}

.linkedin-btn .lbl-mobile {
    display: inline;
}
.linkedin-btn:hover {
    background-color: rgba(0,0,0,0.05);
    color: rgba(0,0,0,0.9);
}

/* KI-Blog Preview Card Mockup (Implantat Stiftung look & feel) */
.kiblog-preview-card {
    background: var(--white);
    border-radius: 0;
    font-family: 'Outfit', sans-serif;
    color: var(--brand-dark);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.kiblog-media {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.kiblog-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.kiblog-preview-card:hover .kiblog-media img {
    transform: scale(1.03);
}

.kiblog-body {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.kiblog-category {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand-orange);
    margin-bottom: 0.75rem;
}

.kiblog-title {
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--brand-teal);
    margin-bottom: 1rem;
}

.kiblog-snippet {
    font-size: 15px;
    color: #4a4d52;
    line-height: 1.55;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.kiblog-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-teal);
    font-size: 15px;
    font-weight: 600;
    align-self: flex-start;
    border-bottom: 1px solid var(--brand-teal);
    padding-bottom: 2px;
}
.kiblog-btn i {
    font-size: 13px;
    transition: var(--transition);
}
.kiblog-preview-card:hover .kiblog-btn i {
    transform: translateX(4px);
}

/* Public Review Layout */
.review-header {
    background: var(--brand-teal);
    color: var(--brand-teal-contrast, var(--white));
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 4px solid var(--brand-orange);
}

.review-layout-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    max-width: 1200px;
    margin: 2.5rem auto;
    gap: 2rem;
    padding: 0 1.5rem;
}

@media (max-width: 900px) {
    .review-layout-grid {
        grid-template-columns: 1fr;
        margin: 1.5rem auto;
        gap: 1.5rem;
    }
}

.review-history-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.review-history-item {
    background: var(--white);
    padding: 1.2rem;
    border-radius: var(--border-radius-md);
    border-left: 4px solid var(--brand-muted);
    box-shadow: var(--card-shadow);
}
.review-history-item.approved {
    border-left-color: #28c76f;
}
.review-history-item.correction {
    border-left-color: var(--brand-orange);
}

.review-history-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--brand-muted);
    margin-bottom: 0.5rem;
}

/* Alerts and notifications */
.alert-flash {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.alert-success { background: #d2f4ea; color: #0f5132; border: 1px solid #badbcc; }
.alert-error { background: #f8d7da; color: #842029; border: 1px solid #f5c2c7; }

/* Channel selection buttons */
.btn-channel {
    background-color: var(--white);
    border: 1px solid #d1d5db;
    flex-grow: 1;
    font-size: 1.25rem;
    padding: 0.6rem;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Inactive button border & icon colors */
.btn-channel[data-channel="ki_blog"] {
    color: var(--brand-teal);
    border-color: var(--brand-teal);
}
.btn-channel[data-channel="facebook"] {
    color: #1877f2;
    border-color: #1877f2;
}
.btn-channel[data-channel="instagram"] {
    color: #e1306c;
    border-color: #e1306c;
}
.btn-channel[data-channel="linkedin"] {
    color: #0077b5;
    border-color: #0077b5;
}

/* Hover background states */
.btn-channel[data-channel="ki_blog"]:hover { background-color: var(--brand-teal-bg); }
.btn-channel[data-channel="facebook"]:hover { background-color: #e7f3ff; }
.btn-channel[data-channel="instagram"]:hover { background-color: #fdf0f5; }
.btn-channel[data-channel="linkedin"]:hover { background-color: #e8f4f9; }

/* Active filled states */
.btn-channel.active[data-channel="ki_blog"] {
    background-color: var(--brand-teal);
    color: var(--white) !important;
    border-color: var(--brand-teal);
}
.btn-channel.active[data-channel="facebook"] {
    background-color: #1877f2;
    color: var(--white) !important;
    border-color: #1877f2;
}
.btn-channel.active[data-channel="instagram"] {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: var(--white) !important;
    border-color: transparent;
}
.btn-channel.active[data-channel="linkedin"] {
    background-color: #0077b5;
    color: var(--white) !important;
    border-color: #0077b5;
}

/* Custom File Input Styling */
input[type="file"] {
    padding: 0.4rem;
    font-size: 0.85rem;
    background-color: var(--white);
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    background-color: var(--brand-teal);
    color: var(--white);
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    margin-right: 10px;
}

input[type="file"]::file-selector-button:hover {
    background-color: var(--brand-teal-light);
    transform: translateY(-1px);
}

/* Toast Notification Styling (Premium Brand Theme) */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
}

.toast {
    min-width: 320px;
    max-width: 420px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 16px 40px rgba(27, 57, 57, 0.16);
    padding: 1.1rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 14px;
    animation: slideInRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: all 0.3s ease;
    position: relative;
}

/* Success / Info: Solid brand teal light background, dark teal text */
.toast.toast-success, .toast.toast-info {
    background-color: #eef7f7;
    border: 1px solid var(--brand-teal);
    color: var(--brand-teal);
}

/* Error / Warning: Solid brand orange light background, dark orange text */
.toast.toast-error {
    background-color: #fdf2f0;
    border: 1px solid var(--brand-orange);
    color: var(--brand-orange);
}

.toast.toast-success .toast-icon, 
.toast.toast-success .toast-message,
.toast.toast-info .toast-icon, 
.toast.toast-info .toast-message {
    color: var(--brand-teal);
}

.toast.toast-error .toast-icon, 
.toast.toast-error .toast-message {
    color: var(--brand-orange);
}

.toast.toast-success .toast-close,
.toast.toast-info .toast-close {
    color: rgba(27, 57, 57, 0.6);
}
.toast.toast-success .toast-close:hover,
.toast.toast-info .toast-close:hover {
    color: var(--brand-teal);
}

.toast.toast-error .toast-close {
    color: rgba(235, 75, 48, 0.6);
}
.toast.toast-error .toast-close:hover {
    color: var(--brand-orange);
}

.toast-icon {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
}

.toast-message {
    font-size: 0.875rem;
    font-weight: 600;
    flex-grow: 1;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.toast-close {
    cursor: pointer;
    font-size: 1.05rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
}
.toast-close:hover {
    transform: scale(1.1);
}

@keyframes slideInRight {
    from {
        transform: translateX(120%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes fadeOutToast {
    from {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateX(120%) scale(0.9);
        opacity: 0;
    }
}

/* Header Logout Button */
.header-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    height: 34px;
    box-sizing: border-box;
    padding: 0 0.9rem;
    border-radius: var(--border-radius-md);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}
.header-logout-btn:hover {
    background-color: var(--brand-orange);
    color: var(--white);
}

/* Application Footer */
.app-footer {
    background-color: rgba(27, 57, 57, 0.05);
    border-top: 1px solid rgba(27, 57, 57, 0.1);
    color: rgba(27, 57, 57, 0.7);
    padding: 1rem 0;
    text-align: center;
    font-size: 0.75rem;
    width: 100%;
    margin-top: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Quick Login Buttons (Test Profile Cards) */
.quick-login-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    background-color: var(--white);
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    color: var(--brand-dark);
}
.quick-login-btn:hover {
    border-color: var(--brand-teal);
    box-shadow: 0 4px 12px rgba(27, 57, 57, 0.08);
    transform: translateY(-1px);
}

.lbl-mobile {
    display: none;
}

/* Hover Preview Popover Styles */
.hover-preview-popover {
    position: fixed;
    z-index: 11000;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px rgba(27, 57, 57, 0.22);
    border: 1px solid rgba(27, 57, 57, 0.08);
    pointer-events: none; /* Let clicks pass through */
    display: none;
    padding: 0.75rem;
    box-sizing: border-box;
    animation: popoverFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Channel-dependent widths for the popover */
.hover-preview-popover.facebook { width: 280px; }
.hover-preview-popover.instagram { width: 260px; }
.hover-preview-popover.linkedin { width: 280px; }
.hover-preview-popover.ki_blog { width: 250px; }

/* Scale down elements inside the hover popover */
.hover-preview-popover .facebook-preview-card,
.hover-preview-popover .instagram-preview-card,
.hover-preview-popover .linkedin-preview-card,
.hover-preview-popover .kiblog-preview-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.hover-preview-popover .facebook-text,
.hover-preview-popover .linkedin-text,
.hover-preview-popover .instagram-caption-text {
    font-size: 0.68rem !important;
    line-height: 1.35 !important;
    margin-bottom: 0.4rem !important;
}

.hover-preview-popover .facebook-avatar,
.hover-preview-popover .instagram-avatar,
.hover-preview-popover .linkedin-avatar {
    width: 28px !important;
    height: 28px !important;
}

.hover-preview-popover .facebook-avatar img,
.hover-preview-popover .instagram-avatar img {
    width: 100% !important;
    height: 100% !important;
    border-radius: inherit !important;
}

.hover-preview-popover .linkedin-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: inherit !important;
}

.hover-preview-popover .facebook-author-name,
.hover-preview-popover .linkedin-name,
.hover-preview-popover .instagram-username {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
}

.hover-preview-popover .facebook-time-row,
.hover-preview-popover .linkedin-meta-followers,
.hover-preview-popover .linkedin-meta-time {
    font-size: 0.62rem !important;
    line-height: 1.2 !important;
}

.hover-preview-popover .facebook-header,
.hover-preview-popover .instagram-header,
.hover-preview-popover .linkedin-header {
    padding-bottom: 0.35rem !important;
    margin-bottom: 0.35rem !important;
}

.hover-preview-popover.facebook img,
.hover-preview-popover.linkedin img {
    max-height: 120px !important;
    width: 100% !important;
    object-fit: cover !important;
    border-radius: var(--border-radius-sm) !important;
}

.hover-preview-popover .instagram-caption-section {
    margin-top: 0.35rem !important;
    font-size: 0.68rem !important;
}

/* Instagram specific layout fixes for Popover */
.hover-preview-popover.instagram .instagram-media {
    width: 100% !important;
    aspect-ratio: 1/1 !important;
    height: auto !important;
}

.hover-preview-popover.instagram .instagram-media img {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
}

.hover-preview-popover .instagram-avatar-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.hover-preview-popover .instagram-actions,
.hover-preview-popover .facebook-footer,
.hover-preview-popover .linkedin-footer {
    padding-top: 0.3rem !important;
    margin-top: 0.3rem !important;
    font-size: 0.65rem !important;
    gap: 4px !important;
}

.hover-preview-popover .facebook-btn,
.hover-preview-popover .linkedin-btn {
    font-size: 0.6rem !important;
    padding: 0.15rem 0.3rem !important;
    gap: 3px !important;
}

.hover-preview-popover .facebook-btn i,
.hover-preview-popover .linkedin-btn i {
    font-size: 0.6rem !important;
}

/* LinkedIn specific layout fixes for Popover */
.hover-preview-popover .linkedin-info {
    gap: 1px !important;
    display: flex !important;
    flex-direction: column !important;
}

.hover-preview-popover .linkedin-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    display: flex !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding: 0.3rem 0 !important;
}

.hover-preview-popover .linkedin-btn {
    padding: 0.2rem 0.4rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.hover-preview-popover .linkedin-btn i {
    font-size: 0.8rem !important;
    color: #5e5e5e !important;
}

.hover-preview-popover .linkedin-btn .lbl-desktop {
    display: none !important;
}

.hover-preview-popover .linkedin-btn .lbl-mobile {
    display: inline !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    color: #5e5e5e !important;
}

/* KI Blog specific layout fixes for Popover */
.hover-preview-popover.ki_blog .kiblog-media {
    width: 100% !important;
    aspect-ratio: 16/9 !important;
    height: auto !important;
}

.hover-preview-popover.ki_blog .kiblog-media img {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
}

.hover-preview-popover .kiblog-body {
    padding: 0.4rem 0.1rem 0 0.1rem !important;
}

.hover-preview-popover .kiblog-category {
    font-size: 0.6rem !important;
    margin-bottom: 0.2rem !important;
}

.hover-preview-popover .kiblog-title {
    font-size: 0.8rem !important;
    margin-bottom: 0.3rem !important;
    line-height: 1.2 !important;
}

.hover-preview-popover .kiblog-snippet {
    font-size: 0.68rem !important;
    line-height: 1.35 !important;
    margin-bottom: 0.35rem !important;
}

.hover-preview-popover .kiblog-btn {
    font-size: 0.68rem !important;
    margin-top: 0.3rem !important;
}

@keyframes popoverFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Search & Overview Modal Styles */
.modal-search-content {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    width: 95%;
    max-width: 1000px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-search-content .modal-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid rgba(27, 57, 57, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--brand-teal-bg);
}

.modal-search-content .modal-header h3 {
    margin: 0;
    color: var(--brand-teal);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-search-content .modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--brand-muted);
    transition: var(--transition);
}

.modal-search-content .modal-close-btn:hover {
    color: var(--brand-orange);
}

.modal-search-content table th {
    font-weight: 600;
    color: var(--brand-teal);
    border-bottom: 2px solid rgba(27, 57, 57, 0.08);
    padding: 0.8rem 1rem;
}

.modal-search-content table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(27, 57, 57, 0.05);
}

/* Statistics cards micro-animations */
.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

/* Media Gallery & Slider Premium CSS */
.gallery-thumbnail-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-thumbnail-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}
.new-staged-media img {
    opacity: 0.95;
}
/* Hide scrollbars for sliders */
.instagram-slides::-webkit-scrollbar,
.linkedin-slides::-webkit-scrollbar {
    display: none;
}
.insta-dot.active {
    background-color: var(--white) !important;
    transform: scale(1.2) !important;
}

/* Field Meta Bar & Inline Field Save Triggers */
.field-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding: 2px 4px;
    height: 32px; /* Fixed height to prevent layout shifts when the Speichern button toggles */
}

.btn-field-history {
    background: none;
    border: none;
    padding: 0;
    color: var(--brand-teal);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.btn-field-history:hover {
    color: var(--brand-orange);
}

.btn-field-save {
    background: var(--brand-teal);
    color: var(--white);
    border: none;
    padding: 0.35rem 0.8rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.btn-field-save:hover {
    background-color: var(--brand-teal-hover, #234d4d);
    transform: translateY(-1px);
}

/* History Modal Timeline (SynApp Layout) */
.history-timeline {
    position: relative;
    padding-left: 24px;
    margin-left: 8px;
    border-left: 2px solid rgba(27, 57, 57, 0.1);
}

.history-item {
    position: relative;
    margin-bottom: 2rem;
}

.history-item:last-child {
    margin-bottom: 0;
}

.history-marker {
    position: absolute;
    left: -31px; /* Center dot on the vertical line */
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--brand-teal);
    border: 2px solid var(--white);
    box-shadow: 0 0 0 2px rgba(27, 57, 57, 0.1);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.history-user {
    font-weight: 700;
    color: var(--brand-dark);
    font-size: 0.85rem;
}

.history-role-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 50px;
    text-transform: uppercase;
    margin-left: 6px;
}

.role-badge-student, .role-badge-reviewer {
    background-color: #e3f2fd;
    color: #0d47a1;
}

.role-badge-editor {
    background-color: #e8f5e9;
    color: #1b5e20;
}

.role-badge-administrator {
    background-color: #fff3e0;
    color: #e65100;
}

.history-date {
    font-size: 0.75rem;
    color: var(--brand-muted);
}

.history-content-box {
    background: var(--brand-gray);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--border-radius-sm);
    padding: 0.8rem 1rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #333;
    white-space: pre-wrap;
}

/* Diffing Highlighting & Hover CSS Tooltips */
.diff-highlight {
    background-color: #fff59d; /* Soft yellow highlight */
    border-bottom: 1px dashed #f57f17;
    position: relative;
    cursor: help;
}

.diff-removed-marker {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    border-radius: 3px;
    padding: 0 4px;
    margin: 0 2px;
    font-size: 0.75rem;
    font-family: monospace;
    cursor: help;
    position: relative;
}

[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) scale(0.85);
    background: #263238;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.72rem;
    white-space: normal;
    width: max-content;
    max-width: 250px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    line-height: 1.35;
    font-weight: 500;
    text-transform: none;
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}
