/* ==========================================================================
   Shared – Design-System & Styling (Systemprompt Optik & Features Standard)
   ========================================================================== */

/* Standard: Dark Mode */
:root {
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Hintergründe */
  --bg-core: #07070a;
  --bg-surface: rgba(18, 16, 26, 0.72);
  --bg-surface-elevated: rgba(28, 24, 42, 0.82);
  --bg-surface-hover: rgba(40, 34, 60, 0.88);
  
  /* Borders & Glassmorphism */
  --border: rgba(255, 255, 255, 0.10);
  --border-bright: rgba(255, 255, 255, 0.22);
  --glass-blur: blur(24px) saturate(170%);

  /* Neon Akzente */
  --neon-purple: #a855f7;
  --neon-pink: #ec4899;
  --neon-cyan: #00e5ff;
  --neon-red: #ef4444;
  --neon-glow: rgba(236, 72, 153, 0.35);

  /* Texte */
  --text-primary: #ffffff;
  --text-secondary: rgba(240, 240, 255, 0.72);
  --text-muted: rgba(240, 240, 255, 0.45);
  --text-dim: rgba(240, 240, 255, 0.35);

  /* Schatten & Radien */
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 12px 32px rgba(236, 72, 153, 0.25);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  --transition-fast: 0.15s ease;
  --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);

  /* Aliase für bestehende Selektoren */
  --bg-base: var(--bg-core);
  --text-main: var(--text-primary);
  --color-purple: var(--neon-purple);
  --color-pink: var(--neon-pink);
  --color-cyan: var(--neon-cyan);
  --color-green: #10b981;
  --color-red: var(--neon-red);
  --glass-bg: var(--bg-surface);
  --glass-border: var(--border);
  --glass-hover: var(--bg-surface-hover);
  --glass-shadow: var(--shadow-sm);
  --radius-full: var(--radius-pill);
  --transition-normal: var(--transition-smooth);
}

/* Dynamischer Hellmodus */
@media (prefers-color-scheme: light) {
  :root {
    --bg-core: #f5f6fa;
    --bg-surface: rgba(255, 255, 255, 0.75);
    --bg-surface-elevated: rgba(255, 255, 255, 0.90);
    --bg-surface-hover: rgba(255, 255, 255, 0.98);

    --border: rgba(0, 0, 0, 0.08);
    --border-bright: rgba(0, 0, 0, 0.16);
    --glass-blur: blur(24px) saturate(150%);

    --neon-purple: #8b5cf6;
    --neon-pink: #db2777;
    --neon-cyan: #0284c7;
    --neon-red: #dc2626;
    --neon-glow: rgba(219, 39, 119, 0.2);

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-dim: #94a3b8;

    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 12px 32px rgba(219, 39, 119, 0.18);
  }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    background-color: var(--bg-core);
    color: var(--text-primary);
    font-family: var(--font-family);
    min-height: 100vh;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-core);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    padding: 20px 16px 60px;
}

/* ==========================================================================
   Hintergrund-Features: Ambient Blobs & Dot-Grid (Systemprompt Spezifikation)
   ========================================================================== */
.glow-bg {
    position: fixed;
    inset: 0;
    background-color: var(--bg-core);
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    mix-blend-mode: screen;
    filter: blur(110px);
    opacity: 0.25;
    pointer-events: none;
}

@media (prefers-color-scheme: light) {
    .blob {
        mix-blend-mode: multiply;
        opacity: 0.15;
    }
}

.blob-purple {
    background-color: var(--neon-purple);
    top: -10%;
    left: -5%;
    animation: move-purple 16s infinite alternate ease-in-out;
}

.blob-pink {
    background-color: var(--neon-pink);
    bottom: -10%;
    right: -5%;
    animation: move-pink 14s infinite alternate ease-in-out;
}

.blob-cyan {
    background-color: var(--neon-cyan);
    top: 40%;
    left: 25%;
    animation: move-cyan 18s infinite alternate ease-in-out;
}

.dot-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(217, 191, 255, 0.15) 0.7px, transparent 0.7px);
    background-size: 24px 24px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 85%);
}

@media (prefers-color-scheme: light) {
    .dot-grid {
        background-image: radial-gradient(rgba(100, 116, 139, 0.18) 0.7px, transparent 0.7px);
    }
}

@keyframes move-purple {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(100px, 70px, 0) scale(1.18); }
    100% { transform: translate3d(-50px, 120px, 0) scale(0.92); }
}

@keyframes move-pink {
    0% { transform: translate3d(0, 0, 0) scale(0.95); }
    50% { transform: translate3d(-120px, -70px, 0) scale(1.22); }
    100% { transform: translate3d(70px, 50px, 0) scale(1.08); }
}

@keyframes move-cyan {
    0% { transform: translate3d(0, 0, 0) scale(1.1); }
    50% { transform: translate3d(-70px, 90px, 0) scale(0.88); }
    100% { transform: translate3d(80px, -80px, 0) scale(1.15); }
}

/* ==========================================================================
   Login Overlay
   ========================================================================== */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 40px rgba(168, 85, 247, 0.2);
    animation: modalAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.login-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 4px;
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon svg {
    position: absolute;
    left: 14px;
    color: var(--text-dim);
    pointer-events: none;
}

.input-with-icon input {
    width: 100%;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 11px 14px 11px 42px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: var(--transition-fast);
}

.input-with-icon input:focus {
    border-color: var(--color-purple);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
}

.login-remember-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    color: var(--color-green);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    line-height: 1.35;
}

.login-remember-hint svg {
    flex-shrink: 0;
}

.login-error-banner {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    line-height: 1.4;
    text-align: center;
}

.btn-login {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 0.95rem;
    margin-top: 4px;
}

.login-footer-actions {
    text-align: center;
    margin-top: 4px;
}

.btn-text-link {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 0.78rem;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}

.btn-text-link:hover {
    color: var(--text-muted);
}

/* ==========================================================================
   App Container & Header
   ========================================================================== */
.app-container {
    width: 100%;
    max-width: 1080px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.header-titles h1 {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Status Pill */
.header-status {
    margin-left: auto;
    margin-right: 12px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    transition: var(--transition-fast);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #64748b;
}

.status-online {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}
.status-online .status-dot {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.status-connecting {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}
.status-connecting .status-dot {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
    animation: pulse 1.5s infinite;
}

.status-error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}
.status-error .status-dot {
    background: #ef4444;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* User Pill */
.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: #e9d5ff;
}

.user-avatar-dot {
    font-size: 0.85rem;
}

/* Header Controls */
.desktop-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon-control {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-icon-control:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-danger-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fff;
}

/* Hamburger Menü Button (Nur auf Mobilgeräten) */
.hamburger-btn {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Hero Quick Input & Dropzone
   ========================================================================== */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
}

.quick-input-section {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.quick-input-section:focus-within {
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 8px 32px 0 rgba(168, 85, 247, 0.15);
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-hint {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.key-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-family: monospace;
    color: var(--text-muted);
}

.text-input-wrapper textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 72px;
    outline: none;
    transition: var(--transition-fast);
}

.text-input-wrapper textarea:focus {
    border-color: var(--color-purple);
    background: rgba(0, 0, 0, 0.5);
}

/* Staged Files (Chips vor dem Absenden) */
.staged-files-container {
    margin-top: 10px;
    background: rgba(18, 16, 26, 0.6);
    border: 1px dashed rgba(168, 85, 247, 0.35);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeIn 0.2s ease;
}

@media (prefers-color-scheme: light) {
    .staged-files-container {
        background: rgba(255, 255, 255, 0.7);
        border-color: rgba(139, 92, 246, 0.4);
    }
}

.staged-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.staged-files-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.btn-clear-staged {
    background: transparent;
    border: none;
    color: var(--neon-pink);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: opacity 0.2s;
}

.btn-clear-staged:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.staged-files-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.staged-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    color: var(--text-primary);
    max-width: 100%;
    transition: var(--transition-fast);
}

@media (prefers-color-scheme: light) {
    .staged-file-chip {
        background: rgba(240, 240, 250, 0.9);
        border-color: rgba(0, 0, 0, 0.1);
    }
}

.staged-chip-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.staged-chip-name {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.staged-chip-size {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.staged-chip-remove {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-left: 2px;
}

.staged-chip-remove:hover {
    background: var(--neon-red);
    color: #fff;
    transform: scale(1.1);
}

/* Upload Progress Indicator */
.upload-progress-container {
    margin-top: 10px;
    background: rgba(10, 10, 16, 0.75);
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: light) {
    .upload-progress-container {
        background: rgba(255, 255, 255, 0.85);
        border-color: rgba(139, 92, 246, 0.3);
    }
}

.progress-bar-wrap {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin-bottom: 8px;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-pink));
    border-radius: var(--radius-pill);
    box-shadow: 0 0 12px var(--neon-glow);
    transition: width 0.15s ease;
}

.upload-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.upload-progress-text {
    font-size: 0.82rem;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-progress-stats {
    font-size: 0.78rem;
    color: var(--neon-pink);
    font-weight: 600;
    white-space: nowrap;
}

.spin-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.input-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    gap: 10px;
    flex-wrap: wrap;
}

.file-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hidden-input {
    display: none;
}

.selected-files-text {
    font-size: 0.8rem;
    color: var(--color-purple);
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-pink) 100%);
    border: none;
    color: #fff;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
    box-shadow: 0 4px 14px rgba(236, 72, 153, 0.3);
}

.btn-primary:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    color: #fff;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.btn-danger:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.78rem;
}

/* ==========================================================================
   Toolbar: Filters & Search
   ========================================================================== */
.toolbar-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.filter-tab {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.filter-tab.active {
    background: rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.45);
    color: #fff;
    font-weight: 600;
}

.tab-badge {
    background: rgba(255, 255, 255, 0.12);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.filter-tab.active .tab-badge {
    background: var(--color-purple);
    color: #fff;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 220px;
    flex: 1;
    max-width: 320px;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-dim);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    padding: 7px 32px 7px 34px;
    color: var(--text-main);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition-fast);
}

.search-box input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(168, 85, 247, 0.4);
}

.clear-search-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
}

/* ==========================================================================
   Items Grid & Cards
   ========================================================================== */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 16px;
}

.item-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s, box-shadow 0.2s;
}

.item-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-type-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-text {
    background: rgba(168, 85, 247, 0.18);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-image {
    background: rgba(236, 72, 153, 0.18);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.badge-document {
    background: rgba(6, 182, 212, 0.18);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.card-date {
    font-size: 0.72rem;
    color: var(--text-dim);
}

/* Card Body - Text */
.card-content-text {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 240px;
    overflow-y: auto;
    user-select: text;
}

/* Card Body - Image */
.card-image-preview {
    width: 100%;
    max-height: 240px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.card-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-image-preview:hover img {
    transform: scale(1.03);
}

.image-overlay-hint {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.card-image-preview:hover .image-overlay-hint {
    opacity: 1;
}

/* Card Body - Document */
.card-doc-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.doc-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.doc-details {
    overflow: hidden;
}

.doc-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-size {
    font-size: 0.74rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.badge-post {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(236, 72, 153, 0.25));
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.4);
}

/* Multi-Item / Attached Files inside a Card */
.card-attached-files {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.card-attached-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    gap: 10px;
}

@media (prefers-color-scheme: light) {
    .card-attached-file-item {
        background: rgba(255, 255, 255, 0.6);
        border-color: rgba(0, 0, 0, 0.08);
    }
}

.attached-file-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.attached-file-icon {
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

.attached-file-info {
    min-width: 0;
    flex: 1;
}

.attached-file-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attached-file-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.attached-file-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.btn-mini-action {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-fast);
}

.btn-mini-action:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Card Footer Actions */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.card-actions-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-card-action {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition-fast);
    text-decoration: none;
}

.btn-card-action:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.btn-card-action:active {
    transform: scale(0.96);
}

.btn-action-view:hover {
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.12);
}

.btn-action-download:hover {
    color: #a78bfa;
    border-color: rgba(167, 139, 250, 0.4);
    background: rgba(167, 139, 250, 0.12);
}

.btn-action-copy-link:hover {
    color: #f472b6;
    border-color: rgba(244, 114, 182, 0.4);
    background: rgba(244, 114, 182, 0.12);
}

.btn-card-action.copied {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.btn-card-delete {
    background: none;
    border: none;
    color: var(--text-dim);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-card-delete:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 4px;
}

.empty-state h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.empty-state p {
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 400px;
}

/* ==========================================================================
   Drag & Drop Overlay
   ========================================================================== */
.drag-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.drag-overlay.active {
    display: flex;
}

.drag-box {
    border: 2px dashed var(--color-purple);
    border-radius: var(--radius-lg);
    padding: 40px 60px;
    text-align: center;
    background: rgba(168, 85, 247, 0.08);
    box-shadow: 0 0 50px rgba(168, 85, 247, 0.35);
    animation: dragPulse 1.5s infinite alternate;
}

.drag-icon {
    font-size: 3.5rem;
    margin-bottom: 12px;
}

@keyframes dragPulse {
    0% { transform: scale(0.98); }
    100% { transform: scale(1.02); }
}

/* ==========================================================================
   Modals & Lightbox
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop.open {
    display: flex;
}

.confirm-box, .settings-box {
    max-width: 440px;
    width: 100%;
    padding: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: modalAppear 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.confirm-icon {
    font-size: 2.2rem;
}

.confirm-buttons, .settings-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 8px;
}

.settings-box {
    text-align: left;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

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

.settings-field label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.settings-field input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--text-main);
    font-size: 0.88rem;
    outline: none;
}

.settings-field input:focus {
    border-color: var(--color-purple);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Lightbox Content */
.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: modalAppear 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.lightbox-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 12px;
    padding: 0 4px;
}

.lightbox-caption {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 70%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes modalAppear {
    0% { opacity: 0; transform: scale(0.94); }
    100% { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   Mobile Slideover (Gemini / ZimaOS Standard)
   ========================================================================== */
.slideover-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.slideover-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.slideover {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-left: 1px solid var(--glass-border);
    z-index: 1060;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.slideover.open {
    transform: translateX(0);
}

.slideover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.slideover-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slideover-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.slideover-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.slideover-section h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.slideover-user-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    color: #e9d5ff;
}

.slideover-status-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.slideover-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
}

.menu-item-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-bottom: 8px;
}

.menu-item-btn:hover {
    background: var(--glass-hover);
}

.btn-danger-menu {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.btn-danger-menu:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fff;
}

.slideover-info-text {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.45;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(25, 25, 30, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 10px 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 6000;
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-green);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ==========================================================================
   Dynamic Island & Swipe Edge (Systemprompt Spezifikation)
   ========================================================================== */
.dynamic-island-container {
    position: fixed;
    top: 14px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 9999;
    pointer-events: none;
}

.dynamic-island {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 10, 14, 0.94);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-bright);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px var(--neon-glow);
    transform: translateY(-80px) scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    font-size: 0.86rem;
    font-weight: 600;
    max-width: 90vw;
}

@media (prefers-color-scheme: light) {
    .dynamic-island {
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 0 20px var(--neon-glow);
    }
}

.dynamic-island.expanded {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.island-icon {
    font-size: 1rem;
    line-height: 1;
}

.island-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.swipe-edge {
    position: fixed;
    top: 25%;
    right: 0;
    width: 4px;
    height: 90px;
    border-radius: 4px 0 0 4px;
    background: linear-gradient(to bottom, transparent, var(--neon-purple), var(--neon-pink), transparent);
    opacity: 0.35;
    z-index: 1040;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

@media (min-width: 601px) {
    .swipe-edge {
        display: none !important;
    }
}

/* ==========================================================================
   Mobile Hochformat (iPhone & Smartphone Portrait Optimization - nur <= 600px)
   ========================================================================== */
@media (max-width: 600px) {
    /* iOS Safe-Area & Viewport Handling */
    html, body {
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
    }

    body {
        padding: max(12px, env(safe-area-inset-top)) 12px max(34px, env(safe-area-inset-bottom));
        gap: 14px;
    }

    .app-container {
        gap: 14px;
        width: 100%;
    }

    /* 1. Header (Kompakt, schwebend, iOS-Style) */
    .app-header {
        padding: 10px 14px;
        border-radius: 18px;
        gap: 10px;
    }

    .header-brand {
        gap: 10px;
    }

    .header-logo {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .header-titles h1 {
        font-size: 1.25rem;
        line-height: 1.2;
    }

    .header-subtitle {
        display: none; /* Im Smartphone-Header ausgeblendet für mehr Platz */
    }

    .header-status {
        margin-right: 4px;
    }

    .status-pill {
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    .desktop-controls {
        display: none !important; /* Nur mobil relevantes Hamburger-Menü anzeigen */
    }

    .hamburger-btn {
        display: flex;
        width: 42px;
        height: 42px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.07);
        border: 1px solid var(--glass-border);
        transition: transform 0.15s ease, background 0.15s ease;
    }

    .hamburger-btn:active {
        transform: scale(0.92);
        background: rgba(255, 255, 255, 0.14);
    }

    /* 2. Quick-Input Section (Ergonomisch für Daumenbedienung) */
    .quick-input-section {
        padding: 14px;
        border-radius: 20px;
        gap: 10px;
    }

    .input-header {
        display: none; /* Desktop-Tastenkürzel-Tipp auf Handys ausblenden */
    }

    .text-input-wrapper textarea {
        min-height: 68px;
        font-size: 0.95rem;
        padding: 12px 14px;
        border-radius: 14px;
        line-height: 1.45;
    }

    .input-actions-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-top: 10px;
        width: 100%;
    }

    .file-picker-wrapper {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }

    .btn-secondary {
        padding: 9px 13px;
        font-size: 0.82rem;
        border-radius: 12px;
        min-height: 40px;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .btn-paste-mobile {
        background: rgba(168, 85, 247, 0.12);
        border-color: rgba(168, 85, 247, 0.35);
        color: #e9d5ff;
    }

    .btn-paste-mobile:active {
        transform: scale(0.94);
        background: rgba(168, 85, 247, 0.25);
    }

    .submit-actions {
        flex-shrink: 0;
    }

    .btn-primary {
        padding: 9px 18px;
        font-size: 0.88rem;
        border-radius: 12px;
        min-height: 40px;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }

    .btn-primary:active {
        transform: scale(0.94);
    }

    .selected-files-text {
        display: none;
    }

    /* 3. Toolbar: Horizontal swipebare Filter & Suchleiste */
    .toolbar-section {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .filter-tabs {
        width: 100%;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 4px 2px;
        scroll-snap-type: x mandatory;
    }

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .filter-tab {
        scroll-snap-align: start;
        flex-shrink: 0;
        padding: 8px 14px;
        font-size: 0.82rem;
        border-radius: var(--radius-full);
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--glass-border);
    }

    .filter-tab.active {
        background: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(236, 72, 153, 0.3) 100%);
        border-color: rgba(168, 85, 247, 0.6);
        color: #fff;
    }

    .search-box {
        max-width: 100%;
        width: 100%;
    }

    .search-box input {
        height: 40px;
        padding: 8px 36px 8px 38px;
        font-size: 0.9rem;
        background: rgba(255, 255, 255, 0.06);
    }

    /* 4. Feed Grid (Single Column & Touch Cards) */
    .items-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .item-card {
        padding: 16px;
        border-radius: 18px;
        gap: 12px;
        background: rgba(22, 22, 28, 0.8);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
    }

    .item-card:hover {
        transform: none; /* Kein Hover-Lift auf Touch-Screens */
    }

    .card-content-text {
        font-size: 0.95rem;
        line-height: 1.55;
        padding: 14px;
        border-radius: 12px;
        max-height: 320px;
    }

    .card-image-preview {
        max-height: 280px;
        border-radius: 12px;
    }

    .image-overlay-hint {
        opacity: 0.9;
        font-size: 0.68rem;
    }

    .file-info-row {
        padding: 6px 4px 0;
    }

    .card-doc-info {
        padding: 12px 14px;
        border-radius: 14px;
        gap: 12px;
        background: rgba(0, 0, 0, 0.4);
    }

    .doc-icon-wrap {
        width: 46px;
        height: 46px;
        font-size: 1.5rem;
        border-radius: 12px;
    }

    .doc-details {
        flex: 1;
        min-width: 0;
    }

    .doc-title {
        font-size: 0.92rem;
        font-weight: 600;
        line-height: 1.35;
        word-break: break-word;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .doc-size {
        font-size: 0.76rem;
        color: var(--text-dim);
        margin-top: 4px;
    }

    .card-footer {
        padding-top: 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .card-actions-left {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    .btn-card-action {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-height: 36px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.12);
        gap: 6px;
    }

    .btn-card-action:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.16);
    }

    .btn-card-delete {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: rgba(239, 68, 68, 0.08);
        border: 1px solid rgba(239, 68, 68, 0.2);
        color: #fca5a5;
        flex-shrink: 0;
    }

    .btn-card-delete:active {
        transform: scale(0.92);
        background: rgba(239, 68, 68, 0.25);
    }

    /* 5. Mobile Slideover Menu */
    .slideover {
        width: 84vw;
        max-width: 320px;
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }

    .slideover-body {
        padding: 16px;
        gap: 18px;
    }

    .menu-item-btn {
        min-height: 46px;
        padding: 12px 14px;
        font-size: 0.92rem;
        border-radius: 12px;
    }

    .menu-item-btn:active {
        transform: scale(0.97);
        background: rgba(255, 255, 255, 0.1);
    }

    /* 6. Login Screen auf Handys */
    .login-overlay {
        padding: 16px;
    }

    .login-card {
        padding: 28px 20px;
        border-radius: 22px;
        max-width: 100%;
    }

    .login-logo {
        width: 58px;
        height: 58px;
    }

    .input-with-icon input {
        height: 46px;
        font-size: 0.95rem;
    }

    .btn-login {
        height: 48px;
        font-size: 1rem;
        border-radius: 12px;
    }

    /* 7. Toasts oberhalb des iOS Home-Indicators */
    .toast {
        bottom: max(20px, env(safe-area-inset-bottom));
        font-size: 0.82rem;
        padding: 10px 16px;
    }
}

