/* ====== Design Tokens (Calm Night v2) ======= */
:root {
    --bg: #000000;
    /* Pure black background for maximum depth */
    --bg-2: #050505;
    /* Even darker gray */
    --surface: #0a0a0a;
    /* Extremely dark surface color */
    --surface-2: #101010;
    /* Darkest secondary surface */
    --glass: color-mix(in srgb, var(--surface) 98%, transparent);
    /* Almost opaque, very clear glass */
    --fg: #ffffff;
    /* Pure white foreground for maximum contrast */
    --muted: #e0e0e0;
    /* Light gray for muted text, high contrast */
    --muted-2: #c0c0c0;
    /* Mid-gray for distinct muted elements */
    --border: rgba(0, 255, 255, .4);
    /* Cyan border with higher opacity */
    --border-2: rgba(0, 255, 255, .6);
    /* Stronger cyan border */
    --ring: #00ffff;
    /* Pure Cyan for primary accent */
    --ring-2: #33ffff;
    /* Lighter pure Cyan */
    --shadow-1: 0 16px 40px rgba(0, 0, 0, .9);
    /* Intense, large shadow */
    --shadow-2: 0 32px 72px rgba(0, 0, 0, 1);
    /* Very intense, very large shadow */
    --brand: linear-gradient(135deg, var(--ring) 0%, var(--ring-2) 100%);
    /* Pure Cyan brand gradient */
    --row-h: calc(var(--tile-min) + 10px);
    --radius-xl: 18px;
    --radius-lg: 14px;
    --radius-md: 12px;
    --pad: 14px;
    --pad-lg: 16px;
    --star-dot-rgb: 0, 255, 255;
    /* Pure Cyan dots */
    --star-line-rgb: 51, 255, 255;
    /* Lighter Pure Cyan lines */

    /* ⬆️ Bigger tiles + quick dock width */
    --tile-min: 176px;
    /* was 132px */
    --quick-w: 124px;
    /* was 104px */
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    color: var(--fg);
    background: linear-gradient(180deg, var(--bg), var(--bg-2));
    /* Simplified to only a linear gradient */
    font: 500 16px/1.35 Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.unauthenticated>*:not(.login-dialog):not(.bg-canvas) {
    display: none;
}

.hero-title {
    font-size: clamp(24px, 4vw, 34px);
}

/* Constellation background */
.bg-canvas {
    position: fixed;
    z-index: -1;
    background: var(--bg);
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
}
/* Centered menu dialog wrapper (uses your existing .ctx box inside) */
.ctx-dialog::backdrop {
  background: rgba(0,0,0,.5);
  -webkit-backdrop-filter: blur(1px) saturate(2);
  backdrop-filter: blur(1px) saturate(2);
  z-index: 1000;
}

.ctx-dialog {
  position: fixed;
  inset: 0;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  z-index: 1001;
}
.ctx-dialog:not([open]) { display: none !important; }

/* default open state (pointer-positioned menus) */
.ctx-dialog[open] { display: block; }

/* centered mode */
.ctx-dialog.center[open]{
  display: flex;
  align-items: center;
  justify-content: center;
}

/* make inner panel actually centerable in .center mode */
.ctx-dialog.center[open] .ctx {
  position: static !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
}

.ctx-dialog.center {
  display: grid;           /* grid lets us center nicely */
  place-items: center;     /* center both X and Y */
}

.ctx-dialog .ctx{
  position: fixed;          /* pointer mode: you place it at mouse coords */
  min-width: 220px;
}

.ctx-dialog.center .ctx {
  position: static;        /* let grid centering take over */
  top: auto;
  left: auto;
  transform: none;
}
.ctx-dialog-inner { margin: 0; padding: 0; }
/* Make inner ctx look like your context menu card and auto-size */

.shell,
main {
    position: relative;
    z-index: 1;
}
/* Center when the dialog is open *and* has .center */
.ctx-dialog.center[open] {
  display: flex;              /* flex is robust across browsers */
  align-items: center;
  justify-content: center;
}

/* Make sure the inner menu can actually be centered */
.ctx-dialog.center[open] .ctx{
  position: static !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  margin: 0;
}
/* keep UI above the canvas */

@media (prefers-reduced-motion: reduce) {
    .bg-canvas {
        display: none;
    }
}
:has(#menuDialog[open]), :has(#profileMenuDialog[open]) {
  overflow: hidden;
}
/* ====== Container ====== */
.container {
    width: min(1200px, 100% - 48px);
    margin-inline: auto;
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        padding-inline: var(--pad);
    }

    .quick-strip {
        -webkit-mask-image: none;
        mask-image: none;
    }

    .hide-on-mobile {
        display: none;
    }

    #addAppBtn {
        width: 44px;
        /* Square button */
        height: 44px;
        /* Square button */
        padding: 0;
        /* Remove padding */
        border-radius: 12px;
    }

    #addAppBtn svg {
        margin: 0;
    }
}

/* ====== Topbar / Header ====== */
.shell {
    position: relative;
    z-index: 9999;
    /* Ensure the shell is also on top */
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 9999;
    /* Ensure the topbar is also on top */
    backdrop-filter: blur(0px) saturate(2);
    background: color-mix(in srgb, var(--surface) 75%, transparent);
    border-bottom: 1px solid var(--border);
    transition: backdrop-filter .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.topbar.is-stuck {
    box-shadow: var(--shadow-1);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--surface-2);
    /* Darkest secondary surface */
    color: var(--ring);
    /* Pure Cyan text */
    font-weight: 800;
    box-shadow: none;
    /* Remove blue shadow */
}

.brand-name {
    font-weight: 750;
    letter-spacing: .2px;
}

.top-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Round action buttons (edit / pin / delete) */
.actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.action-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .05);
    /* Slightly more opaque background */
    color: var(--fg);
    cursor: pointer;
    transition: transform .06s ease, border-color .15s ease, background .15s ease, filter .15s ease;
}

.action-btn:hover {
    transform: translateY(-1px);
    border-color: var(--border-2);
    background: rgba(255, 255, 255, .08);
    /* More opaque on hover */
}

.action-btn:active {
    transform: translateY(0);
}

.close-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    background: rgba(0, 255, 255, .1);
    /* Cyan tinted background */
    color: var(--ring);
    /* Pure Cyan for icon */
    cursor: pointer;
    transition: transform .06s ease, border-color .15s ease, background .15s ease, filter .15s ease;
}

.close-btn:hover {
    transform: translateY(-1px);
    border-color: var(--ring-2);
    /* Lighter cyan on hover */
    background: rgba(0, 255, 255, .15);
    /* More opaque cyan on hover */
}

.close-btn:active {
    transform: translateY(0);
}

.action-btn.pin[aria-pressed="true"] {
    background: linear-gradient(180deg, rgba(0, 255, 255, .7), rgba(51, 255, 255, .6));
    /* Even stronger cyan gradient */
    border-color: var(--ring);
    /* Pure Cyan border */
}

.action-btn.pin[aria-pressed="true"] svg {
    color: var(--bg);
    /* Ensure SVG icon is dark on cyan background */
}

.action-btn.danger {
    color: #ffb4b4;
    border-color: rgba(255, 0, 0, .25);
}

.action-btn.danger:hover {
    background: rgba(255, 0, 0, .08);
    border-color: rgba(255, 0, 0, .35);
}

/* grid tiles: hide actions until hover to keep it clean */
.tile.app .actions {
    opacity: 0;
    transform: translateY(4px);
    transition: .15s ease;
}

.tile.app:hover .actions {
    opacity: 1;
    transform: none;
}

/* in folder dialog we want them always visible */
.folder-dialog .tile .actions {
    opacity: 1;
    transform: none;
}

/* make sure buttons don't interfere with dragging */
.actions,
.action-btn {
    user-select: none;
}

/* ====== Masthead ====== */
.masthead {
    background: none;
    /* Removed all background to eliminate the gradient */
}

.hero-title {
    margin: 22px 0 6px;
    font-size: clamp(22px, 3.3vw, 30px);
    letter-spacing: .2px;
    font-weight: 750;
}

.hero-sub {
    margin: 0 0 14px;
    color: var(--muted);
}

/* ====== Quick-Access Dock ====== */
.quick-wrap {
    position: relative;
    overflow: hidden;
    /* Change from sticky to relative for a more integrated feel */
    top: auto;
    /* Remove fixed top positioning */
    z-index: 1;
    /* Lower z-index as it's less of a floating element */
    padding: 60px 0 60px;
    /* Significantly increased top and bottom padding for generous space */
    /* Increased padding to separate from content above/below */
    margin-bottom: 0;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    /* Center by negating half the viewport width */
    display: flex;
    justify-content: flex-start;
    /* Align content to start, as quick-strip will handle its own width */
    pointer-events: auto;
}

.quick-strip {
    display: flex;
    gap: 20px;
    /* Increased gap to provide more space between tiles */
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    padding: 16px 24px;
    /* Increased top and bottom padding for more vertical space */
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    scroll-snap-type: x mandatory;
    pointer-events: auto;
    justify-content: center;
    -webkit-mask-image: linear-gradient(to right, transparent, black 24px, black calc(100% - 24px), transparent);
    /* Fading mask for scroll indication */
    mask-image: linear-gradient(to right, transparent, black 24px, black calc(100% - 24px), transparent);
    /* Fading mask for scroll indication */
    width: 100%;
    /* Set to 100% width of its parent (.quick-wrap, which is now 100vw) */
    max-width: 100%;
    /* Ensure it spans full width */
    transition: all .2s cubic-bezier(.22, .61, .36, 1);
    -ms-overflow-style: none;     /* IE/old Edge */
}

.quick-strip::-webkit-scrollbar {
    display: none;
}

.quick-tile {
    flex-shrink: 0;
    /* Prevent items from shrinking */
    flex-grow: 0;
    /* Prevent items from growing */
    flex-basis: 130px;
    /* Explicitly set base width to match 'width' */
    width: 130px;
    height: 130px;
    scroll-snap-align: center;
    border-radius: 16px;
    background: var(--surface);
    /* Use primary surface for a simpler background */
    border: 1px solid rgba(0, 255, 255, .1);
    /* Very subtle cyan border */
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
    /* Very subtle, light shadow */
    transition: all .15s ease-out;
    /* Smoother, more subtle transition */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 10px 10px;
    /* Increased top padding, kept side and bottom */
}

.quick-tile:hover {
    transform: translateY(0px) scale(1.02);
    /* Reduced lift on hover to prevent clipping */
    border-color: rgba(0, 255, 255, .2);
    /* Slightly more visible cyan border on hover */
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    /* Subtle background change on hover */
    box-shadow: 0 2px 8px rgba(0, 255, 255, .2);
    /* Subtle cyan tinted shadow on hover */
}

.quick-tile .icon {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    background: var(--surface-2);
    /* Darker background for icon for contrast */
    color: var(--ring);
    font-size: 26px;
    margin-bottom: 0;
    border: none;
    box-shadow: none;
}

.quick-tile .label {
    color: var(--muted);
    /* Use muted color for labels for softer look */
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    text-wrap: balance;
}

@media (max-width: 768px) {
    .quick-wrap {
        top: auto;
        padding: 30px 0 30px;
        /* Adjusted padding for mobile, increased top and bottom padding */
        margin-left: calc(50% - 50vw);
        width: 100vw;
    }

    .quick-strip {
        padding: 10px 16px;
        /* Increased top and bottom padding for mobile quick-strip */
        gap: 16px;
        border-radius: 0;
        max-width: 100%;
        -webkit-mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 16px), transparent);
        mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 16px), transparent);
    }

    .quick-tile {
        width: 80px;
        height: 80px;
        border-radius: 14px;
        padding: 10px 8px 8px;
        /* Increased top padding for mobile tiles */
    }

    .quick-tile .icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .quick-tile .label {
        font-size: 11px;
    }
}

/* ====== Buttons ====== */
.btn {
    appearance: none;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03));
    /* Slightly more visible gradient */
    color: var(--fg);
    padding: 10px 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background .15s ease, border-color .15s ease, transform .06s ease, box-shadow .15s ease;
}

.btn:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .05));
    /* More visible gradient on hover */
    border-color: var(--border-2);
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus-visible {
    outline: 2px solid var(--ring);
    /* Pure Cyan focus outline */
    outline-offset: 2px;
}

.btn.ghost {
    background: transparent;
}

.btn.primary {
    background: linear-gradient(135deg, var(--ring) 0%, var(--ring-2) 100%);
    /* Pure Cyan brand gradient */
    color: #000;
    /* Dark text on cyan for contrast */
    border-color: transparent;
    /* Very intense cyan tinted shadow */
}

.btn.primary:hover {
    filter: brightness(1.5);
    /* Much brighter on hover */
    transform: translateY(-1px);
}

.btn.primary:active {
    transform: translateY(0);
}

/* ====== Divider / Sections ====== */
.divider {
    border: none;
    height: 1px;
    margin: 18px 0 10px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0 14px;
}

h2 {
    margin: 0;
    font-size: 13.5px;
    color: var(--muted-2);
    font-weight: 650;
    letter-spacing: .2px;
}

/* ====== Grid ====== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--tile-min), 1fr));
    gap: 18px;
    grid-auto-rows: var(--row-h);
    /* <-- fixed row unit for row spanning */
    padding-bottom: 44px;
}

/* ====== Tiles (Apps/Folders) ====== */
.tile {
    position: relative;
    user-select: none;
    border-radius: var(--radius-xl);
    background: var(--surface-2);
    /* Solid background for a simpler look */
    border: 1px solid var(--border);
    padding: 18px;
    /* was var(--pad) */
    min-height: calc(var(--tile-min) + 10px);
    /* a bit taller */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
    /* Softer, less expansive shadow */
    transition: transform .15s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
    cursor: pointer;
    /* NEW: Add pointer cursor on hover */
}

.tile:hover {
    transform: translateY(-2px);
    border-color: var(--border-2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .6);
    /* Softer, less expansive shadow on hover */
    /* Maximum intense shadow on hover */
}

.tile .icon {
    width: 86px;
    /* was 66px */
    height: 86px;
    /* was 66px */
    border-radius: 16px;
    /* slightly rounder for big size */
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--surface);
    /* Solid background for a simpler icon */
    border: 1px solid var(--border);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), inset 0 -6px 24px rgba(0, 0, 0, .7);
    /* Very intense inset shadow */
}

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

.monogram {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 24px;
    /* was 20px */
    letter-spacing: .4px;
    color: var(--fg);
}

.tile .label {
    font-size: 14px;
    /* was 13px */
    color: var(--muted);
    text-align: center;
    text-wrap: balance;
}

/* Pins */
.pin {
    position: absolute;
    top: 10px;
    /* Adjusted top position to give more space from the top edge */
    right: 10px;
    /* Adjusted right position for consistency */
    border-radius: 999px;
    border: 2px solid rgba(0, 255, 255, .15);
    /* Slightly more visible border */
    background: rgba(255, 255, 255, .05);
    /* Slightly more opaque background */
    padding: 6px;
    /* Slightly smaller padding for a more compact button */
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    opacity: 0;
    transform: translateY(0px) scale(0.9);
    /* Ensure no initial upward transform */
    transition: all .15s ease-out;
    /* Smoother, more subtle transition */
}

.tile:hover .pin {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.pin[aria-pressed="true"] {
    background: var(--ring);
    /* Solid Pure Cyan background */
    border-color: var(--ring-2);
    /* Lighter Pure Cyan border */
    box-shadow: 0 4px 16px rgba(0, 255, 255, .7);
    /* Intense cyan shadow */
    color: var(--bg);
    /* Dark text on cyan */
}

.pin[aria-pressed="true"] svg {
    color: var(--bg);
    /* Ensure SVG icon is dark on cyan background */
}

/* Folders (Glas) */
.tile.folder {
    position: relative;
    overflow: visible;
    background: color-mix(in srgb, var(--surface) 95%, transparent);
    -webkit-backdrop-filter: blur(0px) saturate(2);
    /* No blur, maximum saturation */
    backdrop-filter: blur(0px) saturate(2);
    box-shadow: inset 0 0 25px rgba(0, 0, 0, 1);
    /* Added a subtle inner shadow for depth */
}

.tile.folder::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(0, 255, 255, .4);
    /* Stronger cyan tinted inset shadow */
}

.tile.folder.is-open {
    border-color: var(--ring-2);
    /* Highlight border with lighter cyan */
    box-shadow: 0 0 0 6px rgba(0, 255, 255, .5);
    /* Very prominent cyan glow */
}

.tile.folder.drop-center {
    outline: 2px dashed var(--ring);
    outline-offset: -8px;
    transition: outline-offset .2s ease-out, outline-color .2s ease-out;
}

.drop-marker {
    position: fixed;
    width: 2px;
    background: var(--ring);
    border-radius: 1px;
    box-shadow: 0 0 0 3px rgba(0, 255, 255, .3);
    /* Stronger cyan tinted shadow */
    pointer-events: none;
    z-index: 9999;
    display: none;
}

.tile.ghost {
    z-index: 10000;
}
.tile.ghost, .drop-marker { z-index: 1002; }
.topbar, .shell { z-index: 900; }
.folder-cover {
    /* Defaults (2×2) — werden per JS je Ordner überschrieben */
    --mini-cols: 2;
    --mini-rows: 2;

    /* Zellgröße & Abstand so gewählt, dass 2×2 ≈ 112×112 bleibt */
    --mini-unit: 51px;
    /*  (112 - 10) / 2  */
    --mini-gap: 10px;

    width: calc(var(--mini-cols) * var(--mini-unit) + (var(--mini-cols) - 1) * var(--mini-gap));
    height: calc(var(--mini-rows) * var(--mini-unit) + (var(--mini-rows) - 1) * var(--mini-gap));

    display: grid;
    grid-template-columns: repeat(var(--mini-cols), var(--mini-unit));
    grid-template-rows: repeat(var(--mini-rows), var(--mini-unit));
    gap: var(--mini-gap);
}

.folder-cover .mini {
    border-radius: 14px;
    /* was 12px */
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    color: var(--fg);
    /* White text on cyan for maximum contrast */
    font-weight: 800;
    font-size: 16px;
    /* was 14px */
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(0, 255, 255, .25);
    /* More prominent cyan inset shadow */
}

.folder-label {
    font-size: 12.5px;
    color: var(--muted);
    /* Use muted for folder labels */
    margin-top: 6px;
}

/* „Wird Ordner“-Vorschau */
.tile.app.preview-folder {
    outline: 2px solid var(--ring);
    /* Pure Cyan outline */
    box-shadow: 0 0 0 8px rgba(0, 255, 255, .4);
    /* Very prominent cyan tinted shadow */
    animation: pulse .6s ease-in-out infinite alternate;
}

@keyframes pulse {
    to {
        transform: translateY(-2px) scale(1.01);
    }
}

/* ====== Dialoge ====== */
.folder-dialog::backdrop {
    background: rgba(0, 0, 0, .98);
    /* Almost pure black backdrop */
    -webkit-backdrop-filter: blur(0px) saturate(2);
    /* No blur, maximum saturation */
    backdrop-filter: blur(0px) saturate(2);
    z-index: 10990;
}

.folder-dialog {
    position: fixed;
    /* you already have this */
    z-index: 11000;
    /* NEW: Use fixed positioning for centering */
    top: 50%;
    /* NEW: Center vertically */
    left: 50%;
    /* NEW: Center horizontally */
    transform: translate(-50%, -50%);
    /* NEW: Adjust for exact centering */
    border: none;
    border-radius: 18px;
    background: var(--surface);
    color: var(--fg);
    border: 1px solid var(--border);
    width: min(900px, calc(100% - 28px));
    box-shadow: var(--shadow-2);
    transition: opacity .18s ease, transform .18s ease;
}

.folder-dialog.minimize-pass {
    opacity: 0;
    transform: translateY(-4px) scale(.98);
    pointer-events: none;
}

.dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.folder-content {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    /* was 120px */
    gap: 14px;
    align-content: start;
    max-height: 400px;
    /* Limit height to enable scrolling */
    overflow-y: auto;
    /* Enable vertical scrolling */
}

.newapp-dialog::backdrop {
    background: rgba(0, 0, 0, .98);
    /* Almost pure black backdrop */
    -webkit-backdrop-filter: blur(0px) saturate(2);
    /* No blur, maximum saturation */
    backdrop-filter: blur(0px) saturate(2);
    /* Apply blur effect */
}

.newapp-dialog {
    border: none;
    border-radius: 18px;
    background: var(--surface);
    color: var(--fg);
    border: 1px solid var(--border);
    width: min(520px, calc(100% - 28px));
    box-shadow: var(--shadow-2);
}

.newapp-dialog,
.login-dialog {
    z-index: 10500;
}

.newapp-form {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.newapp-form h3 {
    margin: 0 0 6px;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
}

input {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--fg);
}

input:focus-visible {
    outline: 2px solid var(--ring);
    /* Pure Cyan focus outline */
    outline-offset: 2px;
}

.dialog-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 6px;
}

/* ====== Login Dialog ====== */
.login-dialog::backdrop {
    background: rgba(0, 0, 0, .75);
    /* Darker backdrop */
    -webkit-backdrop-filter: blur(0px) saturate(2);
    /* No blur, maximum saturation */
    backdrop-filter: blur(0px) saturate(2);
}

.login-dialog {
    border: 1px solid var(--border);
    width: min(400px, calc(100% - 28px));
    background: var(--surface);
    /* Use surface for consistency */
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, .8);
    /* More intense shadow */
    padding: 20px;
    text-align: center;
}

.login-dialog h3 {
    margin: 0 0 20px;
    font-size: 24px;
    font-weight: 700;
    color: var(--fg);
}

.login-form {
    display: grid;
    gap: 16px;
}

.login-form label {
    text-align: left;
}

.login-form input {
    width: 100%;
}

.login-form .checkbox-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Align checkbox to the left */
    gap: 8px;
    /* Spacing between checkbox and label */
    margin-top: -8px;
    /* Adjust spacing with previous input */
    margin-bottom: 8px;
    /* Spacing before error message */
}

.login-form .checkbox-row input[type="checkbox"] {
    width: 16px;
    /* Standard checkbox size */
    height: 16px;
    accent-color: var(--ring);
    /* Use brand color for checkbox */
}

.login-form .checkbox-row label {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.login-form .dialog-actions {
    margin-top: 20px;
    justify-content: center;
}

/* ====== Context Menu ====== */
.ctx {
    position: fixed;
    z-index: 99999;
    /* Ensure it appears on top of all other elements */
    min-width: 220px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 16px 44px rgba(0, 0, 0, .9);
    /* More intense shadow */
    user-select: none;
    pointer-events: auto;
}

.ctx.hidden {
    display: none !important;
}

.ctx .item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    background: none;
    border: none;
    color: var(--fg);
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: background .15s ease;
}

.ctx .item:hover {
    background: color-mix(in srgb, var(--surface-2) 98%, transparent);
    /* Even more opaque on hover */
}

.ctx .item:active {
    background: color-mix(in srgb, var(--surface-2) 95%, transparent);
}

.ctx .item[disabled] {
    opacity: .5;
    pointer-events: none;
    cursor: not-allowed;
}

.ctx .item.danger {
    color: #ffb4b4;
}

.ctx .item.danger:hover {
    background: color-mix(in srgb, rgba(255, 180, 180, 0.1) 98%, transparent);
}

.ctx .sep {
    height: 1px;
    margin: 6px 4px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.ctx .has-submenu {
    position: relative;
}

.ctx .arrow {
    opacity: 1;
    /* Fully visible arrow */
    font-size: 1.1em;
    /* Slightly larger arrow */
    line-height: 1;
}

.ctx .submenu {
    position: absolute;
    top: -6px;
    /* Align with parent item */
    left: calc(100% + 6px);
    /* Position to the right of the parent item with a small gap */
    min-width: 220px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 16px 44px rgba(0, 0, 0, .9);
    /* More intense shadow */
    display: none;
    /* Hidden by default */
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
    /* Smooth transition */
    transform: translateX(10px);
    /* Start slightly offset to the right */
}

.ctx .has-submenu:hover>.submenu {
    display: block;
    opacity: 1;
    pointer-events: auto;
    /* Enable pointer events */
    transform: translateX(0);
    /* Slide into position */
}

.ctx.flip-x {
    transform: translateX(-100%);
}

/* ====== Folder minimize animation ====== */
@keyframes folderMinimize {
    from {
        transform: scale(1);
        opacity: 1;
    }

    to {
        transform: scale(.94);
        opacity: .92;
    }
}

.tile.folder.folder-minimize {
    animation: folderMinimize .22s ease-out;
}

/* ====== Hint ====== */
.field-hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
    opacity: .9;
    user-select: none;
}

/* ====== Utility: reduced motion ====== */
@media (prefers-reduced-motion: reduce) {

    .tile,
    .btn,
    .topbar {
        transition: none
    }
}

/* Tile actions (e.g., delete) */
.act {
    position: absolute;
    top: 8px;
    left: 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .05);
    /* Slightly more opaque background */
    padding: 6px;
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    opacity: 0;
    transform: translateY(-4px);
    transition: .15s ease;
}

.tile:hover .act {
    opacity: 1;
    transform: none;
}

.act.danger {
    color: #ffb4b4;
    border-color: rgba(255, 0, 0, .25);
}

.act.danger:hover {
    background: rgba(255, 0, 0, .08);
    border-color: rgba(255, 0, 0, .35);
}

.profile-menu-wrap {
    position: relative;
    z-index: 9999;
    /* Ensure the wrap is also on top */
}

#profileBtn {
    padding: 10px;
    /* Adjust padding to match other buttons */
    border-radius: 12px;
    /* Match other button's border-radius */
}

#profileMenu {
    position: absolute;
    top: calc(100% + 8px);
    /* Position below the button with some spacing */
    right: 0;
    /* Align to the right of the button */
    left: auto;
    /* Override default left positioning if it's there */
    z-index: 9999;
    /* Ensure it appears on top of all other elements */
    min-width: 180px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-2);
}

.profile-menu-wrap .menu-banner {
    padding: 8px 10px;
    font-weight: bold;
    color: var(--fg);
    background-color: var(--surface-2);
    border-radius: 8px;
    margin-bottom: 6px;
}

.profile-menu-wrap .item {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    background: none;
    border: none;
    color: var(--fg);
    text-align: left;
    cursor: pointer;
}

.profile-menu-wrap .item:hover {
    background: color-mix(in srgb, var(--surface-2) 98%, transparent);
    /* Even more opaque on hover */
}

.profile-menu-wrap .item.danger {
    color: #ffb4b4;
}

.profile-menu-wrap .sep {
    height: 1px;
    margin: 6px 4px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* style for the register link */
/*
.register-text {
    text-align: center;
    font-size: 14px;
    color: var(--muted);
    margin-top: 15px;
}

.register-text a {
    color: var(--ring);
    text-decoration: none;
    font-weight: 600;
}

.register-text a:hover {
    text-decoration: underline;
}
*/

/* show the pin button inside folder dialog */
.folder-dialog .tile .pin {
    opacity: 1;
    transform: none;
}

/* layout helpers */
.stack {
    display: grid;
    gap: 8px;
}

/* file/url switch */
.icon-mode {
    display: flex;
    justify-content: flex-end;
}

.switch {
    display: inline-grid;
    grid-auto-flow: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.switch input {
    display: none;
}

.switch .track {
    width: 54px;
    height: 28px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-2) 80%, transparent);
    /* More opaque background */
    border: 1px solid var(--border);
    display: inline-block;
    position: relative;
}

.switch .thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--fg);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .6);
    /* More intense shadow */
    transition: left .18s ease;
}

.switch input:checked+.track .thumb {
    left: 29px;
}

.switch .switch-labels {
    font-size: 12px;
    color: var(--muted);
    display: grid;
    grid-auto-flow: column;
    gap: 6px;
}

/* dropzone */
.dropzone {
    border: 1px dashed var(--border-2);
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--fg);
    /* Ensures text is visible */
    padding: 18px;
    display: grid;
    place-items: center;
    cursor: pointer;
    outline: none;
    position: relative;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.dropzone:hover,
.dropzone.is-over,
.dropzone:focus-visible {
    border-color: var(--ring);
    /* Pure Cyan border */
    box-shadow: 0 0 0 3px rgba(0, 255, 255, .4);
    /* Cyan tinted shadow */
}

.dropzone .dz-inner {
    display: grid;
    place-items: center;
    gap: 8px;
    color: var(--muted);
}

.dropzone .dz-preview {
    display: none;
    width: 72px;
    height: 72px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: inset 0 0 0 1px rgba(0, 255, 255, .1);
    /* Subtle cyan inset shadow */
}

.dropzone.has-file .dz-inner {
    display: none;
}

.dropzone.has-file .dz-preview {
    display: block;
}

.hidden {
    display: none !important;
}

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

.color-row .grow {
    flex: 1;
}

.color-chip {
    width: 44px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(0, 255, 255, .3), rgba(0, 255, 255, .2));
    /* Stronger cyan tinted background */
    box-shadow: inset 0 0 0 1px rgba(0, 255, 255, .25);
    /* More prominent cyan inset shadow */
    cursor: pointer;
    transition: box-shadow .15s ease, border-color .15s ease, filter .15s ease;
}

.color-chip:hover {
    border-color: var(--ring);
    /* Pure Cyan border on hover */
    filter: brightness(1.3);
}

.color-chip::after {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: var(--chip-color, transparent);
}

#colorHex {
    min-width: 120px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--fg);
}

.swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.swatches button {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid var(--border);
    box-shadow: inset 0 0 0 1px rgba(0, 255, 255, .08);
    /* Subtle cyan inset shadow */
    cursor: pointer;
}

.swatches button:focus-visible {
    outline: 2px solid var(--ring);
    /* Pure Cyan outline */
    outline-offset: 2px;
}

.hidden-native {
    position: absolute;
    inset: auto;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
}

.color-chip-wrap {
    position: relative;
    display: inline-block;
}

.color-chip-wrap input[type="color"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    border: 0;
    padding: 0;
}

/* fieldset used as a simple group, no default border/padding */
.no-fieldset-border {
    border: 0;
    margin: 0;
    padding: 0;
}

.no-fieldset-border>legend {
    margin: 0 0 6px 0;
    padding: 0;
    color: var(--muted);
    font-size: 14px;
}

/* the hidden native color input must not catch clicks from the group */
.hidden-native {
    position: absolute;
    left: -9999px;
    width: 0;
    height: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

/* swatches already have inline background now, keep other styling */
.swatches button {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid var(--border);
    box-shadow: inset 0 0 0 1px rgba(0, 255, 255, .08);
    /* Subtle cyan inset shadow */
    cursor: pointer;
}

.tile .icon img,
.tile .monogram {
    -webkit-user-drag: none;
    /* Chrome/Safari/Edge */
    user-select: none;
    /* Text-Selektion beim Monogramm vermeiden */
}

.tile.folder .resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    cursor: nwse-resize;
    z-index: 20;
    /* höher als Cover/Pin */
    pointer-events: auto;
}

.tile.folder .resize-handle::before {
    content: "";
    position: absolute;
    inset: 2px;
    border-right: 6px solid rgba(0, 255, 255, 1);
    border-bottom: 6px solid rgba(0, 255, 255, 1);
    border-radius: 0 0 16px 0;
    opacity: 1;
    filter:
        drop-shadow(0 0 4px rgba(0, 255, 255, 1)) drop-shadow(0 0 12px rgba(0, 255, 255, .9)) drop-shadow(0 0 24px rgba(0, 255, 255, .6));
}

.tile.folder .resize-handle::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 0 0 16px 0;
    pointer-events: none;
    /* subtle backlight pooling behind the corner */
    background: transparent;
    /* Simplified to transparent background */
}

/* target cell preview while dragging */
.grid-cell-marker {
    position: fixed;
    z-index: 9998;
    border: 2px dashed var(--ring);
    border-radius: var(--radius-xl);
    pointer-events: none;
    box-shadow: 0 0 0 4px rgba(0, 255, 255, .4);
    /* Stronger cyan tinted shadow */
    background: transparent;
    /* Simplified to transparent background */
    transition: left .15s ease-out, top .15s ease-out, width .15s ease-out, height .15s ease-out;
}

.tile.swap-target {
    outline: 2px dashed var(--ring);
    outline-offset: -6px;
}

.folder-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    grid-auto-rows: var(--row-h);
    gap: 14px;
    align-content: start;
}

.folder-dialog .tile {
    /* ensure tiles don’t carry any spans/starts that slipped in */
    grid-column: auto / auto !important;
    grid-row: auto / auto !important;
}

#folderContent {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--tile-min), 1fr));
    grid-auto-rows: calc(var(--tile-min) + 10px + 2*18px);
    gap: 18px;
    align-content: start;
    max-height: 400px;
    /* Limit height to enable scrolling */
    overflow-y: auto;
    /* Enable vertical scrolling */
}

#folderContent .tile {
    grid-column: auto !important;
    grid-row: auto !important;
}

.tile.folder .folder-cover,
.tile.folder .folder-cover * {
    pointer-events: none;
}

/* Cursor im Header */
#folderDialog .dialog-head,
#folderDialog .header,
#folderDialog [data-drag-handle] {
    cursor: grabbing;
}

/* Wenn per Drag positioniert wird, keine Transform-Zentrierung benutzen */
#folderDialog.is-floating {
    transform: none;
}

/* Custom Dialog Styling */
.custom-dialog::backdrop {
    background: rgba(0, 0, 0, .98);
    /* Almost pure black backdrop */
    -webkit-backdrop-filter: blur(0px) saturate(2);
    /* No blur, maximum saturation */
    backdrop-filter: blur(0px) saturate(2);
    z-index: 10990;
}

.custom-dialog {
    position: fixed;
    z-index: 11000;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: none;
    border-radius: 18px;
    background: var(--surface);
    color: var(--fg);
    border: 1px solid var(--border);
    width: min(400px, calc(100% - 28px));
    box-shadow: var(--shadow-2);
    padding: 20px;
    text-align: center;
}

.custom-dialog .dialog-content {
    display: grid;
    gap: 16px;
}

.custom-dialog h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--fg);
}

.custom-dialog p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

.custom-dialog input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--fg);
}

.custom-dialog .dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.tile.app.dragging {
    transform: scale(0.95);
    transition: transform 0.15s ease;
}

/* ====== Theme System Styles ====== */

/* Theme Settings Dialog */
.theme-settings-dialog::backdrop {
    background: rgba(0, 0, 0, .98);
    -webkit-backdrop-filter: blur(0px) saturate(2);
    backdrop-filter: blur(0px) saturate(2);
    z-index: 10990;
}

.theme-settings-dialog {
    position: fixed;
    z-index: 11000;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0;
    max-width: 800px;
    width: 90vw;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow-2);
}

.theme-settings-content {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.theme-section {
    margin-bottom: 32px;
}

.theme-section h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--fg);
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.theme-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.theme-card:hover {
    border-color: var(--ring);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.theme-card.active {
    border-color: var(--ring);
    background: color-mix(in srgb, var(--ring) 10%, var(--surface-2));
}

.theme-preview-small {
    width: 100%;
    height: 80px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--bg), var(--bg-2));
    position: relative;
    overflow: hidden;
}

.theme-preview-small::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 16px;
    height: 16px;
    background: var(--ring);
    border-radius: 4px;
}

.theme-preview-small::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 12px;
    background: var(--surface);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.theme-info h5 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--fg);
}

.theme-description {
    margin: 0 0 12px 0;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

.theme-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.active-badge {
    background: var(--ring);
    color: var(--bg);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Theme Editor Dialog */
.theme-editor-dialog::backdrop {
    background: rgba(0, 0, 0, .98);
    -webkit-backdrop-filter: blur(0px) saturate(2);
    backdrop-filter: blur(0px) saturate(2);
    z-index: 10990;
}

.theme-editor-dialog {
    position: fixed;
    z-index: 11000;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0;
    max-width: 1000px;
    width: 95vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-2);
}

.theme-editor-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

@media (max-width: 768px) {
    .theme-editor-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.theme-preview {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    height: fit-content;
    min-height: 300px;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.preview-brand {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--surface-2);
    color: var(--ring);
    font-weight: 800;
    font-size: 14px;
}

.preview-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--fg);
}

.preview-content {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.preview-tile {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    width: 80px;
    text-align: center;
}

.preview-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--ring);
    color: var(--bg);
    display: grid;
    place-items: center;
    font-weight: 600;
    margin: 0 auto 8px;
}

.preview-label {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}

.theme-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.theme-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--fg);
}

.theme-form input[type="text"] {
    padding: 8px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--fg);
    font-size: 14px;
}

.theme-form input[type="text"]:focus {
    outline: none;
    border-color: var(--ring);
}

.color-settings {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
}

.color-settings h4 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--fg);
}

.color-group {
    margin-bottom: 16px;
}

.color-group:last-child {
    margin-bottom: 0;
}

.color-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-inputs {
    display: flex;
    gap: 8px;
}

.color-inputs input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: none;
}

.color-inputs input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-inputs input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    margin: 0;
    border: none;
    background: none;
    border-top: 1px solid var(--border);
}

.btn.small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.btn.ghost.small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--fg);
}

.btn.ghost.small:hover {
    background: var(--surface-2);
    border-color: var(--ring);
}

.btn.ghost.small.danger {
    color: #ff6b6b;
    border-color: #ff6b6b;
}

.btn.ghost.small.danger:hover {
    background: rgba(255, 107, 107, 0.1);
}