/* ═════════════════════════════════════════════
   BIENEN ORGA — PREMIUM DESIGN SYSTEM v12
   10k+ Look — Aurora, Glass, Glow, Motion
   ═════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700;800&family=Inter:wght@200;300;400;500;600;700;800&display=swap');

:root {
    /* ── Core ── */
    --bg: #030508;
    --bg-elevated: #0a0f1a;
    --bg-card: rgba(255,255,255,0.02);
    --bg-card-hover: rgba(255,255,255,0.04);
    --text: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* ── Amber/Gold ── */
    --amber-50: #fffbeb;
    --amber-100: rgba(251,191,36,0.15);
    --amber-200: rgba(251,191,36,0.3);
    --amber-300: rgba(251,191,36,0.5);
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-glow: rgba(251,191,36,0.4);
    
    /* ── Green ── */
    --green-100: rgba(34,197,94,0.15);
    --green-400: #4ade80;
    --green-500: #22c55e;
    --green-glow: rgba(34,197,94,0.3);
    
    /* ── Red ── */
    --red-100: rgba(239,68,68,0.15);
    --red-400: #f87171;
    --red-500: #ef4444;
    --red-glow: rgba(239,68,68,0.3);
    
    /* ── Blue ── */
    --blue-100: rgba(59,130,246,0.15);
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-glow: rgba(59,130,246,0.3);
    
    /* ── Glass ── */
    --glass: rgba(255,255,255,0.03);
    --glass-hover: rgba(255,255,255,0.06);
    --glass-border: rgba(255,255,255,0.08);
    --glass-border-hover: rgba(255,255,255,0.15);
    
    /* ── Shadows ── */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-lg: 0 24px 64px rgba(0,0,0,0.5);
    --shadow-xl: 0 32px 80px rgba(0,0,0,0.6);
    
    /* ── Radii ── */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

/* ══ Light Mode ══ */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg: #f0f4f8;
        --bg-elevated: #ffffff;
        --bg-card: rgba(255,255,255,0.7);
        --bg-card-hover: rgba(255,255,255,0.9);
        --text: #0f172a;
        --text-secondary: #475569;
        --text-muted: #94a3b8;
        --glass: rgba(255,255,255,0.6);
        --glass-hover: rgba(255,255,255,0.8);
        --glass-border: rgba(0,0,0,0.06);
        --glass-border-hover: rgba(0,0,0,0.12);
        --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
        --shadow-md: 0 8px 32px rgba(0,0,0,0.08);
        --shadow-lg: 0 24px 64px rgba(0,0,0,0.1);
        --shadow-xl: 0 32px 80px rgba(0,0,0,0.12);
    }
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ═════════════════════════════════════════════
   AURORA BACKGROUND
   ═════════════════════════════════════════════ */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -3;
    background:
        radial-gradient(ellipse 100% 60% at 15% 20%, rgba(251,191,36,0.12), transparent 60%),
        radial-gradient(ellipse 80% 50% at 85% 40%, rgba(34,197,94,0.08), transparent 55%),
        radial-gradient(ellipse 60% 40% at 50% 80%, rgba(59,130,246,0.06), transparent 50%);
    animation: auroraShift 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes auroraShift {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.8; }
    33% { transform: translate(2%, -1%) scale(1.02); opacity: 0.9; }
    66% { transform: translate(-1%, 2%) scale(0.98); opacity: 0.7; }
}

/* Noise overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* ═════════════════════════════════════════════
   GLASSMORPHISM NAVIGATION
   ═════════════════════════════════════════════ */
nav {
    background: var(--glass);
    backdrop-filter: blur(24px) saturate(2);
    -webkit-backdrop-filter: blur(24px) saturate(2);
    border-bottom: 1px solid var(--glass-border);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

nav.scrolled {
    background: rgba(3,5,8,0.85);
    border-bottom-color: rgba(255,255,255,0.04);
    box-shadow: var(--shadow-md);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) nav.scrolled {
        background: rgba(240,244,248,0.9);
    }
}

nav .logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

nav .logo .logo-icon {
    font-size: 1.6rem;
    animation: logoPulse 3s ease-in-out infinite;
    filter: drop-shadow(0 0 12px var(--amber-glow));
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 12px var(--amber-glow)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 20px var(--amber-glow)); }
}

nav .logo .logo-text {
    background: linear-gradient(135deg, var(--amber-400), var(--amber-500), var(--green-400));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 4s ease infinite;
}

@keyframes gradientText {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.nav-links {
    display: flex;
    gap: 6px;
    margin-left: auto;
    font-size: 0.85rem;
    font-weight: 600;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--amber-400), var(--amber-500));
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: var(--radius-sm);
    z-index: -1;
}

.nav-links a:hover {
    color: #fff;
    transform: translateY(-2px);
}

.nav-links a:hover::before {
    opacity: 1;
}

.nav-links a.active {
    color: var(--amber-400);
    background: var(--amber-100);
}

/* ═════════════════════════════════════════════
   MAGNETIC PARTICLE BUTTON (Push)
   ═════════════════════════════════════════════ */
.magnetic-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    border: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
    box-shadow:
        0 4px 20px rgba(245,158,11,0.3),
        0 0 40px rgba(245,158,11,0.1),
        inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    letter-spacing: 0.02em;
}

.magnetic-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--amber-400), var(--green-400), var(--amber-500));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
    animation: spinGradient 3s linear infinite;
    filter: blur(8px);
}

@keyframes spinGradient {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.magnetic-btn:hover::before {
    opacity: 0.7;
}

.magnetic-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 12px 40px rgba(245,158,11,0.4),
        0 0 60px rgba(245,158,11,0.15),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.magnetic-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.magnetic-btn .btn-icon {
    font-size: 1.1rem;
    animation: btnIconPulse 2s ease-in-out infinite;
}

@keyframes btnIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.magnetic-btn .btn-glow {
    position: absolute;
    inset: -4px;
    border-radius: 50px;
    background: radial-gradient(circle, rgba(251,191,36,0.3), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: -2;
}

.magnetic-btn:hover .btn-glow {
    opacity: 1;
}

/* ── Secondary Button ── */
.btn-secondary-magnetic {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.btn-secondary-magnetic::before {
    background: linear-gradient(135deg, var(--text-secondary), var(--text-muted));
}

.btn-secondary-magnetic:hover {
    color: var(--text);
    border-color: var(--glass-border-hover);
    background: var(--glass-hover);
}

/* ═════════════════════════════════════════════
   SPOTLIGHT CARDS (3D Tilt)
   ═════════════════════════════════════════════ */
.spotlight-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.spotlight-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(251,191,36,0.15), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.spotlight-card:hover::before {
    opacity: 1;
}

.spotlight-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(251,191,36,0.04);
    background: var(--bg-card-hover);
}

/* ═════════════════════════════════════════════
   KINETIC STAT CARDS
   ═════════════════════════════════════════════ */
.kinetic-stat {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.kinetic-stat::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--amber-400), var(--amber-500), var(--green-400));
    opacity: 0;
    transition: opacity 0.3s;
}

.kinetic-stat:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(251,191,36,0.06);
}

.kinetic-stat:hover::after {
    opacity: 1;
}

.kinetic-stat .number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--amber-400), var(--amber-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin-bottom: 8px;
}

.kinetic-stat .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.kinetic-stat .trend {
    font-size: 0.75rem;
    margin-top: 6px;
    font-weight: 600;
}

/* ═════════════════════════════════════════════
   HERO PANEL WITH MESH GRADIENT
   ═════════════════════════════════════════════ */
.hero-premium {
    position: relative;
    background: 
        linear-gradient(135deg, rgba(251,191,36,0.06), rgba(34,197,94,0.03), rgba(59,130,246,0.02));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 32px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.hero-premium::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 20% 30%, rgba(251,191,36,0.08), transparent),
        radial-gradient(ellipse 50% 30% at 80% 70%, rgba(34,197,94,0.06), transparent);
    animation: meshShift 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes meshShift {
    0%, 100% { opacity: 0.6; transform: translate(0, 0); }
    50% { opacity: 1; transform: translate(-2%, 1%); }
}

.hero-premium .content {
    position: relative;
    z-index: 1;
}

.hero-premium .eyebrow {
    color: var(--amber-400);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
}

.hero-premium h1, .hero-premium h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 8px;
}

.hero-premium .lead {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 500px;
    line-height: 1.6;
}

/* ═════════════════════════════════════════════
   AMBER PANELS
   ═════════════════════════════════════════════ */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.panel:hover {
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-md);
}

.panel-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.panel-header h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

/* ═════════════════════════════════════════════
   FLOATING PARTICLES (Decorative)
   ═════════════════════════════════════════════ */
.particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--amber-400);
    border-radius: 50%;
    opacity: 0.3;
    pointer-events: none;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-20vh) rotate(720deg); opacity: 0; }
}

/* ═════════════════════════════════════════════
   FORM INPUTS (Premium)
   ═════════════════════════════════════════════ */
.premium-input {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
}

.premium-input:focus {
    border-color: var(--amber-400);
    box-shadow: 0 0 0 4px rgba(251,191,36,0.1), 0 0 20px rgba(251,191,36,0.1);
    background: var(--bg-card-hover);
}

.premium-input::placeholder {
    color: var(--text-muted);
}

.form-group-premium {
    margin-bottom: 20px;
}

.form-group-premium label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ═════════════════════════════════════════════
   BADGES (Premium)
   ═════════════════════════════════════════════ */
.badge-premium {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

.badge-amber { background: var(--amber-100); color: var(--amber-400); border-color: rgba(251,191,36,0.2); }
.badge-green { background: var(--green-100); color: var(--green-400); border-color: rgba(34,197,94,0.2); }
.badge-red { background: var(--red-100); color: var(--red-400); border-color: rgba(239,68,68,0.2); }
.badge-blue { background: var(--blue-100); color: var(--blue-400); border-color: rgba(59,130,246,0.2); }

/* ═════════════════════════════════════════════
   TABLE (Premium)
   ═════════════════════════════════════════════ */
.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.88rem;
}

.premium-table thead th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
    background: var(--bg-card);
}

.premium-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.premium-table tbody tr:hover td {
    color: var(--text);
    background: var(--glass-hover);
}

/* ═════════════════════════════════════════════
   ANIMATED GRADIENT BORDER (for special elements)
   ═════════════════════════════════════════════ */
.animated-border {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.animated-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1.5px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--amber-400), var(--green-400), var(--blue-400), var(--amber-400));
    background-size: 300% 300%;
    animation: gradientRotate 3s linear infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

@keyframes gradientRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ═════════════════════════════════════════════
   SKELETON LOADING
   ═════════════════════════════════════════════ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--glass-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ═════════════════════════════════════════════
   SCROLLBAR (Custom)
   ═════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--glass-border-hover);
}

/* ═════════════════════════════════════════════
   FLASH MESSAGES (Premium)
   ═════════════════════════════════════════════ */
.flash-premium {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
    backdrop-filter: blur(10px);
    animation: flashSlide 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes flashSlide {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.flash-premium.success { background: var(--green-100); color: var(--green-400); border-color: rgba(34,197,94,0.2); }
.flash-premium.error { background: var(--red-100); color: var(--red-400); border-color: rgba(239,68,68,0.2); }
.flash-premium.info { background: var(--blue-100); color: var(--blue-400); border-color: rgba(59,130,246,0.2); }

/* ═════════════════════════════════════════════
   MOBILE BOTTOM NAV (Premium)
   ═════════════════════════════════════════════ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(3,5,8,0.85);
    backdrop-filter: blur(24px) saturate(2);
    -webkit-backdrop-filter: blur(24px) saturate(2);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 1000;
    display: none;
}

@media (max-width: 768px) {
    .bottom-nav { display: flex; }
    body { padding-bottom: 70px; }
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    transition: all 0.3s;
    border-radius: var(--radius-sm);
}

.bottom-nav a .icon {
    font-size: 1.3rem;
    transition: transform 0.3s;
}

.bottom-nav a:hover,
.bottom-nav a.active {
    color: var(--amber-400);
}

.bottom-nav a:hover .icon,
.bottom-nav a.active .icon {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px var(--amber-glow));
}

/* ═════════════════════════════════════════════
   BACKWARD COMPATIBILITY — Legacy Classes
   Maps old classes to premium equivalents
   ═════════════════════════════════════════════ */

/* ── Hero Panel ── */
.hero-panel {
    position: relative;
    background: linear-gradient(135deg, rgba(251,191,36,0.06), rgba(34,197,94,0.03), rgba(59,130,246,0.02));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 32px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}
.hero-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 40% at 20% 30%, rgba(251,191,36,0.08), transparent),
                radial-gradient(ellipse 50% 30% at 80% 70%, rgba(34,197,94,0.06), transparent);
    animation: meshShift 8s ease-in-out infinite;
    pointer-events: none;
}
.hero-panel .content { position: relative; z-index: 1; }
.hero-panel .eyebrow {
    color: var(--amber-400);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
}
.hero-panel h1, .hero-panel h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 8px;
}
.hero-panel .lead {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 500px;
    line-height: 1.6;
}

/* ── Stats ── */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 24px; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }

/* ── Stat Card (Legacy = Kinetic Stat) ── */
.stat-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--amber-400), var(--amber-500), var(--green-400));
    opacity: 0;
    transition: opacity 0.3s;
}
.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(251,191,36,0.06);
}
.stat-card:hover::after { opacity: 1; }
.stat-card .number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--amber-400), var(--amber-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin-bottom: 8px;
}
.stat-card .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Card (Legacy = Spotlight) ── */
.card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
    margin-bottom: 14px;
}
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(251,191,36,0.15), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.card:hover::before { opacity: 1; }
.card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(251,191,36,0.04);
    background: var(--bg-card-hover);
}
.card h3 {
    color: var(--amber-400);
    margin-bottom: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}
.card-link { text-decoration: none; color: inherit; display: block; }

/* ── Panel ── */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}
.panel:hover {
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-md);
}
.panel-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.panel-header h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

/* ── Eyebrow / Lead ── */
.eyebrow {
    color: var(--amber-400);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.lead {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-top: 6px;
}

/* ── Flash ── */
.flash {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
    backdrop-filter: blur(10px);
    animation: flashSlide 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
@keyframes flashSlide {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.flash-success { background: var(--green-100); color: var(--green-400); border-color: rgba(34,197,94,0.2); }
.flash-error { background: var(--red-100); color: var(--red-400); border-color: rgba(239,68,68,0.2); }
.flash-info { background: var(--blue-100); color: var(--blue-400); border-color: rgba(59,130,246,0.2); }

/* ── Buttons ── */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    border: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
    box-shadow: 0 4px 20px rgba(245,158,11,0.3), 0 0 40px rgba(245,158,11,0.1), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    letter-spacing: 0.02em;
    text-decoration: none;
}
.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(245,158,11,0.4), 0 0 60px rgba(245,158,11,0.15), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn:active { transform: translateY(-1px) scale(0.98); }
.btn-sm { padding: 8px 16px; font-size: 0.78rem; }
.btn-primary { background: linear-gradient(135deg, var(--amber-500), var(--amber-600)); color: #fff; }
.btn-secondary {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}
.btn-secondary:hover {
    color: var(--text);
    border-color: var(--glass-border-hover);
    background: var(--glass-hover);
}

/* ── Page Head ── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 10px 0 24px; }
.page-head h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* ── Toolbar ── */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}
.badge-amber { background: var(--amber-100); color: var(--amber-400); border-color: rgba(251,191,36,0.2); }
.badge-green { background: var(--green-100); color: var(--green-400); border-color: rgba(34,197,94,0.2); }
.badge-red { background: var(--red-100); color: var(--red-400); border-color: rgba(239,68,68,0.2); }
.badge-blue { background: var(--blue-100); color: var(--blue-400); border-color: rgba(59,130,246,0.2); }

/* ── Beute Grid ── */
.beute-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .beute-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Quick Grid ── */
.quick-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .quick-grid { grid-template-columns: repeat(3, 1fr); } }

/* ── Ampel ── */
.ampel-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.ampel-segment { flex: 1; padding: 14px 8px; border-radius: 12px; text-align: center; transition: all 0.3s; }
.ampel-segment:hover { transform: scale(1.03); }
.ampel-red { background: var(--red-100); }
.ampel-yellow { background: var(--amber-100); }
.ampel-green { background: var(--green-100); }
.ampel-blue { background: var(--blue-100); }
.ampel-count { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 1.6rem; font-weight: 800; margin-bottom: 4px; }
.ampel-red .ampel-count { color: var(--red-400); }
.ampel-yellow .ampel-count { color: var(--amber-400); }
.ampel-green .ampel-count { color: var(--green-400); }
.ampel-blue .ampel-count { color: var(--blue-400); }
.ampel-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); }

/* ── Offline Status ── */
.offline-status { position: fixed; bottom: 70px; right: 16px; z-index: 2000; padding: 10px 16px; border-radius: 12px; background: var(--bg-card); border: 1px solid var(--glass-border); backdrop-filter: blur(10px); font-size: 0.78rem; display: none; align-items: center; gap: 10px; }

/* ── Nav user / logout ── */
.nav-user { font-size: 0.75rem; color: var(--text-muted); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 10px; background: var(--bg-card); border-radius: 6px; border: 1px solid var(--glass-border); }
.nav-logout { color: var(--text-secondary); text-decoration: none; font-size: 1rem; padding: 8px; border-radius: 8px; transition: all 0.25s; cursor: pointer; background: transparent; border: none; }
.nav-logout:hover { color: var(--red-500); background: var(--red-100); }

/* ── Form compat ── */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.85rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="datetime-local"], select, textarea {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--amber-400); box-shadow: 0 0 0 4px rgba(251,191,36,0.1), 0 0 20px rgba(251,191,36,0.1); background: var(--bg-card-hover); }
input::placeholder, textarea::placeholder { color: var(--text-muted); }

/* ── Table ── */
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.88rem; }
thead th { text-align: left; padding: 12px 16px; font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); border-bottom: 1px solid var(--glass-border); background: var(--bg-card); }
tbody td { padding: 14px 16px; border-bottom: 1px solid var(--glass-border); color: var(--text-secondary); transition: all 0.2s; }
tbody tr:hover td { color: var(--text); background: var(--glass-hover); }

/* ── Timeline ── */
.timeline { display: flex; flex-direction: column; gap: 0; position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--glass-border); }
.timeline-item { position: relative; padding: 14px 0; }
.timeline-item::before { content: ''; position: absolute; left: -24px; top: 20px; width: 10px; height: 10px; border-radius: 50%; background: var(--amber-400); border: 2px solid var(--bg); box-shadow: 0 0 8px var(--amber-glow); }
.timeline-item.red::before { background: var(--red-400); box-shadow: 0 0 8px var(--red-glow); }
.timeline-item.green::before { background: var(--green-400); box-shadow: 0 0 8px var(--green-glow); }
.timeline-date { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.timeline-title { font-weight: 700; color: var(--text); margin-bottom: 4px; }
.timeline-desc { font-size: 0.85rem; color: var(--text-secondary); }

/* ── Misc ── */
.floating { animation: float 6s ease-in-out infinite; }
.glass { background: var(--glass); backdrop-filter: blur(20px); border: 1px solid var(--glass-border); }
.glass-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-bottom: 14px;
}
.glass-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(251,191,36,0.04);
    background: var(--bg-card-hover);
}

/* ═════════════════════════════════════════════
   DASHBOARD V2 — 10K Edition
   ═════════════════════════════════════════════ */

.db-hero {
    position: relative;
    border-radius: var(--radius-xl);
    padding: 56px 40px;
    margin-bottom: 32px;
    overflow: hidden;
    text-align: center;
    border: 1px solid var(--glass-border);
}
.db-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 30% 20%, rgba(251,191,36,0.08), transparent),
        radial-gradient(ellipse 50% 40% at 80% 60%, rgba(34,197,94,0.05), transparent),
        radial-gradient(ellipse 40% 30% at 50% 80%, rgba(59,130,246,0.04), transparent);
    animation: meshShift 10s ease-in-out infinite;
    pointer-events: none;
}
.db-hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}
.db-hero .db-eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
}
.db-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--amber-400), var(--amber-500), var(--green-400));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 4s ease infinite;
}
.db-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto 28px;
    line-height: 1.6;
}
.db-hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Buttons ── */
.db-btn-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    border: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
    box-shadow: 0 4px 24px rgba(245,158,11,0.3), 0 0 40px rgba(245,158,11,0.1), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    letter-spacing: 0.02em;
}
.db-btn-main:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 40px rgba(245,158,11,0.4), 0 0 60px rgba(245,158,11,0.15);
}
.db-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--text-secondary);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}
.db-btn-ghost:hover {
    border-color: var(--glass-border-hover);
    background: var(--glass-hover);
    color: var(--text);
    transform: translateY(-2px);
}
.db-btn-xs { padding: 6px 14px; font-size: 0.78rem; }

/* ── Stats Bar ── */
.db-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}
@media (min-width: 768px) {
    .db-stats { grid-template-columns: repeat(5, 1fr); }
}
.db-stat {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 28px 16px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}
.db-stat::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--amber-400), var(--amber-500));
    opacity: 0;
    transition: opacity 0.3s;
}
.db-stat:hover {
    transform: translateY(-6px);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(251,191,36,0.04);
}
.db-stat:hover::after { opacity: 1; }
.db-stat-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--amber-400), var(--amber-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}
.db-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ── Panel ── */
.db-panel {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.db-panel:hover {
    border-color: var(--glass-border-hover);
}
.db-panel-compact { padding: 22px; }
.db-panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.db-h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.db-h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ── Ampel ── */
.db-ampel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 768px) {
    .db-ampel { grid-template-columns: repeat(4, 1fr); }
}
.db-ampel-seg {
    padding: 24px 16px;
    border-radius: var(--radius-md);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid transparent;
}
.db-ampel-seg:hover {
    transform: translateY(-4px) scale(1.02);
}
.db-ampel-red { background: var(--red-100); border-color: rgba(239,68,68,0.15); }
.db-ampel-yellow { background: var(--amber-100); border-color: rgba(251,191,36,0.15); }
.db-ampel-green { background: var(--green-100); border-color: rgba(34,197,94,0.15); }
.db-ampel-blue { background: var(--blue-100); border-color: rgba(59,130,246,0.15); }
.db-ampel-count {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1;
}
.db-ampel-red .db-ampel-count { color: var(--red-400); }
.db-ampel-yellow .db-ampel-count { color: var(--amber-400); }
.db-ampel-green .db-ampel-count { color: var(--green-400); }
.db-ampel-blue .db-ampel-count { color: var(--blue-400); }
.db-ampel-label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }

/* ── Grid ── */
.db-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}
@media (min-width: 768px) {
    .db-grid-2 { grid-template-columns: repeat(2, 1fr); }
}
.db-col { display: flex; flex-direction: column; gap: 24px; }

/* ── List ── */
.db-list { display: flex; flex-direction: column; }
.db-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}
.db-list-row:hover { padding-left: 8px; }
.db-list-row:last-child { border-bottom: none; }
.db-list-title { font-weight: 600; font-size: 0.92rem; color: var(--text); }
.db-list-meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.db-list-right { text-align: right; flex-shrink: 0; }

/* ── Badge ── */
.db-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    white-space: nowrap;
}
.db-badge-amber { background: var(--amber-100); color: var(--amber-400); border-color: rgba(251,191,36,0.2); }
.db-badge-green { background: var(--green-100); color: var(--green-400); border-color: rgba(34,197,94,0.2); }
.db-badge-red { background: var(--red-100); color: var(--red-400); border-color: rgba(239,68,68,0.2); }
.db-badge-blue { background: var(--blue-100); color: var(--blue-400); border-color: rgba(59,130,246,0.2); }

/* ── Section ── */
.db-section { margin-bottom: 32px; }
.db-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* ── Beute Cards ── */
.db-beute-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 640px) { .db-beute-grid { grid-template-columns: repeat(2, 1fr); } }
.db-beute-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    color: inherit;
    transform-style: preserve-3d;
    perspective: 1000px;
}
.db-beute-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(251,191,36,0.12), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.db-beute-card:hover::before { opacity: 1; }
.db-beute-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(251,191,36,0.04);
    background: var(--bg-card-hover);
}
.db-beute-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}
.db-beute-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--amber-400);
    letter-spacing: -0.02em;
    margin: 0;
}
.db-beute-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.db-beute-reason {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.db-beute-last {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ── Timeline ── */
.db-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 32px;
}
.db-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--amber-400), var(--green-400), var(--blue-400));
    opacity: 0.3;
    border-radius: 2px;
}
.db-timeline-item {
    position: relative;
    padding: 16px 0;
}
.db-timeline-dot {
    position: absolute;
    left: -28px;
    top: 22px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--amber-400);
    border: 3px solid var(--bg);
    box-shadow: 0 0 12px var(--amber-glow);
}
.db-timeline-content { position: relative; }
.db-timeline-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}
.db-timeline-title {
    font-weight: 700;
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 4px;
}
.db-timeline-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
.db-timeline-title a:hover { color: var(--amber-400); }
.db-timeline-wetter {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* ── Empty ── */
.db-empty {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 24px 0;
}
.db-empty-lg {
    text-align: center;
    padding: 56px 24px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}
.db-empty-lg p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ── Eyebrow (Dashboard) ── */
.db-eyebrow {
    color: var(--amber-400);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .db-hero { padding: 36px 20px; }
    .db-title { font-size: 2rem; }
    .db-stats { grid-template-columns: repeat(2, 1fr); }
    .db-ampel { grid-template-columns: repeat(2, 1fr); }
    .db-grid-2 { grid-template-columns: 1fr; }
    .db-beute-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .db-hero { padding: 28px 16px; }
    .db-title { font-size: 1.6rem; }
    .db-stats { grid-template-columns: 1fr; }
    .db-hero-actions { flex-direction: column; align-items: stretch; }
    .db-btn-main, .db-btn-ghost { justify-content: center; }
}

/* ═════════════════════════════════════════════
   APP-WIDE PREMIUM HELPERS
   Shared utilities used by non-dashboard templates
   ═════════════════════════════════════════════ */

.is-hidden { display: none !important; }
.is-invisible { opacity: 0.7; }
.is-scroll-locked { overflow: hidden; }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-red { color: var(--red-400); }
.text-amber { color: var(--amber-400); }
.text-green { color: var(--green-400); }
.text-blue { color: var(--blue-400); }
.text-strong { font-weight: 700; }
.text-strike { text-decoration: line-through; }
.text-center { text-align: center; }

.db-stat-num-red {
    background: none;
    -webkit-text-fill-color: var(--red-400);
    color: var(--red-400);
}
.db-stat-num-green {
    background: none;
    -webkit-text-fill-color: var(--green-400);
    color: var(--green-400);
}
.db-stat-num-blue {
    background: none;
    -webkit-text-fill-color: var(--blue-400);
    color: var(--blue-400);
}
.db-stat-num-amber {
    background: none;
    -webkit-text-fill-color: var(--amber-400);
    color: var(--amber-400);
}
.db-list-meta-alert { color: var(--red-400); font-weight: 700; }
.db-list-meta-danger { color: var(--red-400); }
.db-list-meta-warning { color: var(--amber-400); }

.db-toolbar,
.db-action-row,
.db-filter-row,
.db-chip-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.db-toolbar { justify-content: flex-end; }
.db-action-row { margin-top: 18px; }
.db-filter-row { margin-bottom: 18px; }
.db-chip-row { margin: 0 0 20px; }
.db-inline-form { display: inline-flex; margin: 0; }
.db-search-form {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 220px;
}
.db-search-input { flex: 1; }
.db-stack { display: flex; flex-direction: column; gap: 16px; }
.db-stack-sm { display: flex; flex-direction: column; gap: 10px; }
.db-stack-tight { display: flex; flex-direction: column; gap: 6px; }
.db-flex-1 { flex: 1; }
.db-actions-end {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.db-nowrap { white-space: nowrap; }

.db-btn-sm {
    padding: 9px 18px;
    font-size: 0.8rem;
}
.db-btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid rgba(239,68,68,0.25);
    background: var(--red-100);
    color: var(--red-400);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}
.db-btn-danger:hover {
    border-color: rgba(239,68,68,0.45);
    box-shadow: 0 10px 34px rgba(239,68,68,0.18);
    transform: translateY(-2px);
}

.db-form-shell {
    max-width: 760px;
    margin: 0 auto;
}
.db-form-wide {
    max-width: 980px;
    margin: 0 auto;
}
.form-input,
.form-control {
    width: 100%;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 720px) {
    .form-row { grid-template-columns: repeat(2, 1fr); }
}
.form-status {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 8px;
}
.file-input { font-size: 0.95rem; }

.info-grid,
.db-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    font-size: 0.92rem;
}
@media (min-width: 680px) {
    .info-grid,
    .db-info-grid { grid-template-columns: repeat(2, 1fr); }
}
.db-info-note {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--glass-border);
}

.tab-bar,
.db-tab-bar {
    display: flex;
    gap: 8px;
    margin: 0 0 20px;
    padding: 8px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    background: var(--glass);
    overflow-x: auto;
}
.tab,
.tab-btn,
.db-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s;
}
.tab:hover,
.tab-btn:hover,
.db-tab:hover {
    color: var(--text);
    background: var(--glass-hover);
}
.tab.active,
.tab-btn.active,
.db-tab.active {
    color: var(--amber-400);
    border-color: rgba(251,191,36,0.25);
    background: var(--amber-100);
    box-shadow: 0 0 24px rgba(251,191,36,0.08);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.db-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 740px) {
    .db-card-grid { grid-template-columns: repeat(2, 1fr); }
}
.db-card-grid-single {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.db-empty-compact {
    text-align: center;
    padding: 34px 22px;
    color: var(--text-secondary);
}
.db-empty-icon {
    display: block;
    font-size: 2.4rem;
    margin-bottom: 10px;
}

.checkbox-group {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}
@media (min-width: 720px) {
    .checkbox-group { grid-template-columns: repeat(3, 1fr); }
}
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s;
}
.checkbox-item:hover,
.checkbox-item:has(input:checked) {
    border-color: rgba(251,191,36,0.28);
    background: var(--amber-100);
    color: var(--text);
}
.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--amber-500);
}
.quick-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}
@media (min-width: 760px) {
    .quick-grid { grid-template-columns: repeat(4, 1fr); }
}
.quick-btn.active {
    color: #fff;
    border-color: rgba(251,191,36,0.35);
    background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
}
.gps-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 50px;
    border: 1px solid rgba(251,191,36,0.25);
    background: var(--amber-100);
    color: var(--amber-400);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
}
.gps-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(251,191,36,0.45);
    box-shadow: 0 10px 34px rgba(251,191,36,0.12);
}
.gps-btn.is-loading { opacity: 0.7; }
.gps-btn.gps-success { color: var(--green-400); border-color: rgba(34,197,94,0.35); background: var(--green-100); }

.photo-grid,
.photo-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.photo-grid img,
.photo-preview img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.25s;
}
.photo-grid img:hover,
.photo-preview img:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-md);
}

.chart-panel { padding: 18px; }
.chart-canvas {
    width: 100%;
    height: 300px;
}
.qr-img {
    max-width: 180px;
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    margin-bottom: 12px;
}
.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
}
.forecast-card {
    text-align: center;
    padding: 12px 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
}
.forecast-day { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 4px; }
.forecast-icon { font-size: 1.6rem; margin: 4px 0; }
.forecast-text { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 4px; }
.forecast-temp { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.forecast-rain { font-size: 0.72rem; color: var(--blue-400); margin-top: 2px; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    transition: all 0.35s;
    aspect-ratio: 1;
}
.gallery-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(251,191,36,0.06);
    border-color: rgba(251,191,36,0.2);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 12px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.72));
    color: #fff;
    font-size: 0.78rem;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.gallery-item:hover .gallery-meta { opacity: 1; }
.gallery-meta strong {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 2px;
}
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.lightbox-overlay.open {
    display: flex;
    opacity: 1;
}
.lightbox-img {
    max-width: 92vw;
    max-height: 85vh;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    object-fit: contain;
    transform: scale(0.92);
    transition: transform 0.3s;
}
.lightbox-overlay.open .lightbox-img { transform: scale(1); }
.lightbox-close,
.lightbox-nav {
    position: absolute;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.8);
    transition: all 0.2s;
}
.lightbox-close {
    top: 20px;
    right: 24px;
    font-size: 2.2rem;
    background: transparent;
    padding: 4px;
    line-height: 1;
}
.lightbox-close:hover { color: #fff; }
.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}
.lightbox-nav:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-caption {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    text-align: center;
    background: rgba(0,0,0,0.5);
    padding: 10px 20px;
    border-radius: 24px;
    backdrop-filter: blur(5px);
    max-width: 80vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-shell { margin-bottom: 24px; }
#map {
    height: 70vh;
    min-height: 420px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.leaflet-bee-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.leaflet-bee-marker-green { background: var(--green-500); }
.leaflet-bee-marker-yellow { background: var(--amber-500); }
.leaflet-bee-marker-red { background: var(--red-500); }
.leaflet-bee-marker-blue { background: var(--blue-500); }

.login-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--bg);
}
.login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 30%, rgba(251,191,36,0.1), transparent),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(34,197,94,0.07), transparent),
        radial-gradient(ellipse 50% 30% at 50% 80%, rgba(59,130,246,0.05), transparent);
    animation: meshShift 10s ease-in-out infinite;
}
.login-bg::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none;
}
.login-wrap,
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.login-card,
.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(24px);
    width: 100%;
    max-width: 440px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(251,191,36,0.04);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.login-card:hover,
.auth-card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-xl), 0 0 80px rgba(251,191,36,0.08);
    transform: translateY(-4px);
}
.login-glow-amber,
.auth-glow-amber {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--amber-glow), transparent 70%);
    opacity: 0.5;
    pointer-events: none;
}
.login-glow-green,
.auth-glow-green {
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--green-glow), transparent 70%);
    opacity: 0.3;
    pointer-events: none;
}
.login-head,
.auth-head {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}
.login-bee,
.auth-bee {
    font-size: 4rem;
    margin-bottom: 16px;
    display: inline-block;
    animation: float 5s ease-in-out infinite;
    filter: drop-shadow(0 0 20px var(--amber-glow));
}
.login-title,
.auth-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--amber-400), var(--amber-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}
.login-subtitle,
.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}
.login-form,
.auth-form {
    position: relative;
    z-index: 1;
}
.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.login-footer a {
    color: var(--amber-400);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
}
.login-footer a:hover { text-shadow: 0 0 12px rgba(251,191,36,0.3); }
.login-flash { margin-bottom: 20px; }
.login-submit,
.auth-submit {
    width: 100%;
    margin-top: 8px;
}
.auth-info {
    background: linear-gradient(135deg, var(--amber-100), rgba(251,191,36,0.05));
    border: 1px solid var(--amber-200);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: var(--amber-400);
    backdrop-filter: blur(5px);
}
.push-toggle-compact {
    padding: 8px 12px;
    font-size: 0.78rem;
    min-width: 94px;
    white-space: nowrap;
}

.push-toggle-compact .btn-icon {
    display: none;
}

@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .lightbox-nav { width: 44px; height: 44px; font-size: 1.8rem; }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
    #map { min-height: 360px; height: 62vh; }
    .db-toolbar { justify-content: flex-start; }
    .login-wrap,
    .auth-wrap {
        width: 100vw;
        padding: 16px;
    }
    .login-card,
    .auth-card {
        width: calc(100vw - 32px);
        max-width: calc(100vw - 32px);
        padding: 32px 24px;
    }
}

@media (max-width: 767px) {
    .login-card,
    .auth-card {
        width: min(360px, calc(100vw - 32px));
        max-width: min(360px, calc(100vw - 32px));
    }
}

/* ═════════════════════════════════════════════
   BIENEN ORGA — PRODUCT UI REFIT v16
   Mature operational SaaS skin layered over the template sweep
   ═════════════════════════════════════════════ */

:root {
    --bg: #07100d;
    --bg-elevated: #101b16;
    --bg-card: rgba(18, 29, 24, 0.78);
    --bg-card-hover: rgba(24, 38, 31, 0.9);
    --text: #f5f7f2;
    --text-secondary: #b9c6bb;
    --text-muted: #748276;
    --amber-400: #f4b73f;
    --amber-500: #df9322;
    --amber-600: #b96d14;
    --green-400: #62d38c;
    --green-500: #31a864;
    --blue-400: #7eb6d8;
    --blue-500: #3f88b5;
    --red-400: #f27f73;
    --red-500: #de4d40;
    --glass: rgba(255, 255, 255, 0.055);
    --glass-hover: rgba(255, 255, 255, 0.095);
    --glass-border: rgba(225, 232, 217, 0.11);
    --glass-border-hover: rgba(244, 183, 63, 0.3);
    --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.18);
    --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.22);
    --shadow-lg: 0 26px 70px rgba(0, 0, 0, 0.28);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
}

:root[data-theme="light"] {
    --bg: #eef4ef;
    --bg-elevated: #fbfdf9;
    --bg-card: rgba(255, 255, 255, 0.86);
    --bg-card-hover: rgba(255, 255, 255, 0.96);
    --text: #17211b;
    --text-secondary: #4b5d51;
    --text-muted: #728075;
    --glass: rgba(255, 255, 255, 0.74);
    --glass-hover: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(28, 45, 35, 0.1);
    --glass-border-hover: rgba(223, 147, 34, 0.28);
    --shadow-sm: 0 6px 18px rgba(35, 50, 40, 0.08);
    --shadow-md: 0 18px 40px rgba(35, 50, 40, 0.1);
    --shadow-lg: 0 30px 70px rgba(35, 50, 40, 0.13);
}

body {
    background:
        linear-gradient(135deg, rgba(7, 16, 13, 0.98), rgba(9, 23, 18, 0.98)),
        var(--bg);
    font-size: 15px;
}

:root[data-theme="light"] body {
    background:
        radial-gradient(circle at 12% 0%, rgba(244, 183, 63, 0.18), transparent 28%),
        radial-gradient(circle at 100% 18%, rgba(98, 211, 140, 0.18), transparent 26%),
        linear-gradient(180deg, #f7faf5, var(--bg));
}

body::before {
    opacity: 0.55;
    animation: none;
    background:
        radial-gradient(ellipse 80% 42% at 12% 0%, rgba(244, 183, 63, 0.13), transparent 62%),
        radial-gradient(ellipse 64% 42% at 100% 12%, rgba(98, 211, 140, 0.11), transparent 62%),
        linear-gradient(120deg, transparent 0 46%, rgba(255, 255, 255, 0.018) 46% 47%, transparent 47%);
}

body::after,
.login-bg::after,
#particle-container,
.particle {
    display: none;
}

nav {
    padding: 10px 22px;
    gap: 14px;
    background: rgba(8, 14, 12, 0.88);
    border-bottom: 1px solid rgba(225, 232, 217, 0.1);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
}

:root[data-theme="light"] nav {
    background: rgba(251, 253, 249, 0.9);
    box-shadow: 0 12px 36px rgba(35, 50, 40, 0.08);
}

nav.scrolled {
    background: rgba(8, 14, 12, 0.94);
}

:root[data-theme="light"] nav.scrolled {
    background: rgba(251, 253, 249, 0.95);
}

nav .logo {
    font-size: 1.05rem;
    letter-spacing: 0;
    gap: 9px;
    min-width: max-content;
}

nav .logo .logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    color: #1a160b;
    background: linear-gradient(135deg, #ffd76a, var(--amber-500));
    box-shadow: 0 10px 24px rgba(223, 147, 34, 0.28);
    animation: none;
    filter: none;
}

nav .logo .logo-text {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--text);
    animation: none;
}

.nav-links {
    gap: 4px;
    font-size: 0.82rem;
}

.nav-links a {
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--text-secondary);
}

.nav-links a::before {
    display: none;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--glass-hover);
    transform: none;
}

.nav-links a.active {
    color: #1d1609;
    background: linear-gradient(135deg, #ffd76a, var(--amber-500));
    box-shadow: 0 10px 26px rgba(223, 147, 34, 0.18);
}

.nav-user {
    max-width: 168px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 8px 12px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.nav-logout,
.theme-toggle {
    min-height: 34px;
    padding: 8px 11px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-logout:hover,
.theme-toggle:hover {
    color: var(--text);
    background: var(--glass-hover);
}

.container {
    max-width: 1220px;
    padding: 24px 22px 96px;
}

.container-wide {
    max-width: 1800px;
}

.db-hero {
    padding: 30px 34px;
    margin: 12px 0 22px;
    text-align: left;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(244, 183, 63, 0.12), rgba(98, 211, 140, 0.08) 42%, rgba(126, 182, 216, 0.07)),
        rgba(16, 27, 22, 0.62);
    box-shadow: var(--shadow-md);
}

:root[data-theme="light"] .db-hero {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(244, 183, 63, 0.12) 52%, rgba(98, 211, 140, 0.1)),
        var(--bg-card);
}

.db-hero-bg {
    opacity: 0.62;
    animation: none;
}

.db-hero-content {
    max-width: none;
    margin: 0;
}

.db-hero .db-eyebrow,
.db-eyebrow {
    margin-bottom: 8px;
    color: var(--amber-400);
    letter-spacing: 0.14em;
}

.db-title {
    max-width: 820px;
    margin-bottom: 10px;
    font-size: clamp(2rem, 3.7vw, 3rem);
    letter-spacing: -0.03em;
    animation: none;
    background: linear-gradient(135deg, #ffe39a, var(--amber-400) 45%, var(--green-400));
    -webkit-background-clip: text;
    background-clip: text;
}

:root[data-theme="light"] .db-title {
    background: linear-gradient(135deg, #2b2314, var(--amber-600) 42%, #25734a);
    -webkit-background-clip: text;
    background-clip: text;
}

.db-subtitle {
    max-width: 640px;
    margin: 0 0 18px;
    color: var(--text-secondary);
}

.db-hero-actions {
    justify-content: flex-start;
}

.db-btn-main,
.magnetic-btn,
.login-submit,
.auth-submit {
    border-radius: 12px;
    padding: 12px 20px;
    color: #221706;
    background: linear-gradient(135deg, #ffd76a, var(--amber-500));
    box-shadow: 0 12px 28px rgba(223, 147, 34, 0.22);
    letter-spacing: 0;
}

.db-btn-main:hover,
.magnetic-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(223, 147, 34, 0.26);
}

.db-btn-main .btn-icon,
.magnetic-btn .btn-icon {
    animation: none;
}

.db-btn-ghost,
.btn-secondary-magnetic,
.gps-btn {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.055);
    border-color: var(--glass-border);
    color: var(--text-secondary);
    box-shadow: none;
}

.db-btn-ghost:hover,
.btn-secondary-magnetic:hover,
.gps-btn:hover {
    transform: translateY(-1px);
    color: var(--text);
    background: rgba(255, 255, 255, 0.09);
}

:root[data-theme="light"] .db-btn-ghost,
:root[data-theme="light"] .btn-secondary-magnetic,
:root[data-theme="light"] .gps-btn {
    background: rgba(255, 255, 255, 0.74);
}

.db-btn-danger {
    border-radius: 12px;
}

.db-stats {
    grid-template-columns: repeat(auto-fill, minmax(158px, 220px)) !important;
    justify-content: start;
    gap: 14px;
    margin-bottom: 22px;
}

.db-stat {
    padding: 18px 18px;
    text-align: left;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent),
        var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.db-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.db-stat-num {
    font-size: clamp(2rem, 3vw, 2.6rem);
    margin-bottom: 6px;
}

.db-stat-label {
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.db-panel,
.panel,
.spotlight-card,
.db-beute-card,
.db-empty-lg,
.gallery-item {
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 42%),
        var(--bg-card);
    border-color: var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.db-panel:hover,
.panel:hover,
.spotlight-card:hover,
.db-beute-card:hover {
    transform: translateY(-2px);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-md);
}

.db-panel {
    padding: 22px;
    margin-bottom: 18px;
}

.db-panel-head {
    margin-bottom: 16px;
}

.db-h2 {
    font-size: 1.22rem;
}

.db-h3 {
    font-size: 1.05rem;
}

.db-beute-grid,
.db-card-grid {
    gap: 14px;
}

@media (min-width: 980px) {
    .db-beute-grid,
    .db-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.db-beute-card {
    padding: 20px;
}

.db-beute-name,
.db-beute-card-title {
    color: var(--text);
}

.db-beute-meta,
.db-beute-card-meta,
.db-list-meta {
    color: var(--text-secondary);
}

.db-list-row {
    padding: 12px 0;
}

.db-list-row:hover {
    padding-left: 0;
    color: var(--text);
}

.db-badge,
.badge-premium {
    border-radius: 999px;
    padding: 5px 10px;
}

.tab-bar,
.db-tab-bar {
    border-radius: 14px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.045);
}

.tab,
.tab-btn,
.db-tab {
    border-radius: 10px;
    padding: 9px 13px;
}

.tab.active,
.tab-btn.active,
.db-tab.active {
    color: #201606;
    border-color: rgba(244, 183, 63, 0.35);
    background: linear-gradient(135deg, #ffd76a, var(--amber-500));
    box-shadow: 0 10px 24px rgba(223, 147, 34, 0.18);
}

.premium-input,
.form-input,
.form-control,
select,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
input[type="date"] {
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.055);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

:root[data-theme="light"] .premium-input,
:root[data-theme="light"] .form-input,
:root[data-theme="light"] .form-control,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea,
:root[data-theme="light"] input[type="text"],
:root[data-theme="light"] input[type="email"],
:root[data-theme="light"] input[type="password"],
:root[data-theme="light"] input[type="number"],
:root[data-theme="light"] input[type="datetime-local"],
:root[data-theme="light"] input[type="date"] {
    background: rgba(255, 255, 255, 0.82);
}

.checkbox-item {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
}

.quick-grid {
    gap: 10px;
}

.gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}

.gallery-item {
    aspect-ratio: 4 / 3;
}

.gallery-meta {
    opacity: 1;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
}

#map {
    height: min(62vh, 620px);
    min-height: 420px;
    border-radius: var(--radius-lg);
}

.leaflet-bee-marker {
    border: 2px solid rgba(255, 255, 255, 0.85);
}

.leaflet-bee-marker::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
}

.bottom-nav {
    background: rgba(8, 14, 12, 0.9);
    border-top: 1px solid var(--glass-border);
}

.bottom-nav a .icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--glass);
    font-size: 0.7rem;
    font-weight: 800;
}

.login-card,
.auth-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 44%),
        var(--bg-card);
}

.login-bee,
.auth-bee {
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffd76a, var(--amber-500));
    color: #211706;
    font-size: 0;
    animation: none;
    filter: none;
    box-shadow: 0 16px 36px rgba(223, 147, 34, 0.22);
}

.login-bee::before,
.auth-bee::before {
    content: 'BO';
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 800;
}

@media (max-width: 980px) {
    nav {
        gap: 10px;
    }
    .nav-links {
        overflow-x: auto;
        scrollbar-width: none;
    }
    .nav-links::-webkit-scrollbar {
        display: none;
    }
    .nav-user {
        display: none;
    }
}

@media (max-width: 767px) {
    nav {
        padding: 9px 14px;
    }
    nav .logo .logo-text {
        display: none;
    }
    .container {
        padding: 14px 14px 90px;
    }
    .db-hero {
        padding: 24px 20px;
        margin-top: 8px;
    }
    .db-title {
        font-size: 2rem;
    }
    .db-subtitle {
        font-size: 0.98rem;
    }
    .db-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .db-stat {
        padding: 16px;
    }
    .db-panel {
        padding: 18px;
    }
    .db-card-grid,
    .db-beute-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .db-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .db-hero-actions,
    .db-toolbar,
    .db-action-row {
        align-items: stretch;
    }
    .db-btn-main,
    .db-btn-ghost,
    .db-btn-danger,
    .gps-btn {
        justify-content: center;
        width: 100%;
    }
}

/* ═════════════════════════════════════════════
   MOBILE APP NAV v18
   Imkado-inspired compact app bar + sheet menu + bottom tabs
   ═════════════════════════════════════════════ */

.mobile-menu-toggle,
.mobile-menu-home,
.mobile-menu-logout {
    display: none;
}

@media (max-width: 860px) {
    body {
        padding-bottom: calc(96px + env(safe-area-inset-bottom));
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    nav {
        min-height: 62px;
        padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
        gap: 10px;
        background: rgba(7, 16, 13, 0.92);
        border-bottom-color: rgba(225, 232, 217, 0.1);
    }

    :root[data-theme="light"] nav {
        background: rgba(251, 253, 249, 0.94);
    }

    nav .logo {
        gap: 8px;
        min-width: 0;
    }

    nav .logo .logo-icon {
        width: 38px;
        height: 38px;
        border-radius: 13px;
        font-size: 0.74rem;
    }

    nav .logo .logo-text {
        display: inline;
        max-width: 132px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 1rem;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 42px;
        height: 42px;
        margin-left: auto;
        border-radius: 14px;
        border: 1px solid var(--glass-border);
        background: var(--glass);
        color: var(--text);
        cursor: pointer;
        box-shadow: var(--shadow-sm);
    }

    .mobile-menu-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: transform 0.22s, opacity 0.22s;
    }

    body.mobile-menu-open .mobile-menu-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    body.mobile-menu-open .mobile-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    body.mobile-menu-open .mobile-menu-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-links {
        display: none;
        position: fixed;
        left: 12px;
        right: 12px;
        top: calc(62px + env(safe-area-inset-top));
        z-index: 1100;
        margin: 0;
        padding: 10px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        overflow: visible;
        border-radius: 22px;
        border: 1px solid var(--glass-border);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 60%),
            rgba(9, 22, 17, 0.96);
        box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
        backdrop-filter: blur(22px) saturate(1.4);
        -webkit-backdrop-filter: blur(22px) saturate(1.4);
    }

    :root[data-theme="light"] .nav-links {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 250, 245, 0.92)),
            var(--bg-card);
        box-shadow: 0 24px 70px rgba(35, 50, 40, 0.18);
    }

    body.mobile-menu-open .nav-links {
        display: grid;
    }

    .mobile-menu-home,
    .mobile-menu-logout {
        display: inline-flex;
    }

    .nav-links a {
        min-height: 48px;
        padding: 13px 14px;
        border-radius: 15px;
        border: 1px solid var(--glass-border);
        background: rgba(255, 255, 255, 0.045);
        color: var(--text);
        font-size: 0.92rem;
        justify-content: flex-start;
        box-shadow: none;
    }

    :root[data-theme="light"] .nav-links a {
        background: rgba(255, 255, 255, 0.72);
    }

    .nav-links a.active {
        color: #201606;
        border-color: rgba(244, 183, 63, 0.42);
        background: linear-gradient(135deg, #ffd76a, var(--amber-500));
    }

    .nav-links a.mobile-menu-logout {
        color: var(--red-400);
        border-color: rgba(242, 127, 115, 0.24);
        background: rgba(242, 127, 115, 0.1);
    }

    .nav-user,
    .nav-logout,
    .push-toggle-compact {
        display: none !important;
    }

    .theme-toggle {
        min-width: 64px;
        height: 42px;
        padding: 0 12px;
        border-radius: 14px;
        font-size: 0.75rem;
    }

    .bottom-nav {
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        z-index: 1200;
        height: 70px;
        padding: 6px;
        border-radius: 24px;
        border: 1px solid var(--glass-border);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
            rgba(8, 15, 12, 0.92);
        box-shadow: 0 20px 48px rgba(0, 0, 0, 0.34);
        backdrop-filter: blur(22px) saturate(1.5);
        -webkit-backdrop-filter: blur(22px) saturate(1.5);
    }

    :root[data-theme="light"] .bottom-nav {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 246, 0.92)),
            var(--bg-card);
        box-shadow: 0 18px 42px rgba(35, 50, 40, 0.16);
    }

    .bottom-nav a {
        display: none;
        min-width: 0;
        height: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 5px 2px;
        border-radius: 18px;
        color: var(--text-muted);
        font-size: 0.68rem;
        font-weight: 800;
        line-height: 1;
        text-decoration: none;
    }

    .bottom-nav a:nth-child(1),
    .bottom-nav a:nth-child(2),
    .bottom-nav a:nth-child(3),
    .bottom-nav a:nth-child(4),
    .bottom-nav a:nth-child(8) {
        display: flex;
    }

    .bottom-nav a .icon {
        width: 26px;
        height: 26px;
        border-radius: 11px;
        background: rgba(255, 255, 255, 0.06);
        color: var(--text-secondary);
        font-size: 0.74rem;
        font-weight: 900;
    }

    :root[data-theme="light"] .bottom-nav a .icon {
        background: rgba(18, 29, 24, 0.06);
    }

    .bottom-nav a.active {
        color: #201606;
        background: linear-gradient(135deg, #ffd76a, var(--amber-500));
        box-shadow: 0 12px 26px rgba(223, 147, 34, 0.22);
    }

    .bottom-nav a.active .icon {
        color: #201606;
        background: rgba(255, 255, 255, 0.34);
    }

    .container {
        padding: 14px 14px calc(108px + env(safe-area-inset-bottom));
    }

    .db-hero {
        padding: 22px 18px;
        border-radius: 22px;
    }

    .db-title {
        font-size: clamp(1.85rem, 11vw, 2.3rem);
    }

    .db-subtitle {
        max-width: 100%;
        font-size: 0.96rem;
    }
}

@media (max-width: 420px) {
    nav .logo .logo-text {
        display: none;
    }

    .theme-toggle {
        min-width: 54px;
    }

    .nav-links {
        grid-template-columns: 1fr;
    }

    .bottom-nav {
        left: 8px;
        right: 8px;
        height: 68px;
        border-radius: 22px;
    }

    .bottom-nav a {
        font-size: 0.64rem;
    }
}

/* ═════════════════════════════════════════════
   MOBILE-FIRST INTERACTION UPGRADE v19
   App start screen, quick actions, sticky capture flow
   ═════════════════════════════════════════════ */

.mobile-app-home,
.mobile-menu-summary,
.mobile-menu-quick {
    display: none;
}

@media (max-width: 860px) {
    .dashboard-desktop-only,
    .dashboard-desktop-secondary {
        display: none !important;
    }

    .mobile-app-home {
        display: block;
        margin: 8px 0 18px;
    }

    .mobile-today-card {
        position: relative;
        overflow: hidden;
        border: 1px solid rgba(28, 45, 35, 0.1);
        border-radius: 28px;
        padding: 22px;
        background:
            radial-gradient(circle at 100% 0%, rgba(98, 211, 140, 0.24), transparent 42%),
            radial-gradient(circle at 0% 100%, rgba(244, 183, 63, 0.22), transparent 44%),
            rgba(255, 255, 255, 0.9);
        box-shadow: 0 22px 54px rgba(35, 50, 40, 0.14);
        animation: mobileCardIn 0.45s ease both;
    }

    :root[data-theme="dark"] .mobile-today-card {
        border-color: var(--glass-border);
        background:
            radial-gradient(circle at 100% 0%, rgba(98, 211, 140, 0.16), transparent 42%),
            radial-gradient(circle at 0% 100%, rgba(244, 183, 63, 0.18), transparent 44%),
            rgba(14, 26, 20, 0.9);
        box-shadow: 0 24px 58px rgba(0, 0, 0, 0.28);
    }

    @keyframes mobileCardIn {
        from { opacity: 0; transform: translateY(14px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .mobile-card-kicker,
    .mobile-section-head span {
        display: block;
        color: var(--amber-500);
        font-size: 0.72rem;
        font-weight: 900;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        margin-bottom: 7px;
    }

    .mobile-today-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
    }

    .mobile-today-head h1 {
        font-family: 'Space Grotesk', sans-serif;
        font-size: clamp(2rem, 11vw, 2.7rem);
        line-height: 0.95;
        letter-spacing: 0;
        margin-bottom: 10px;
        color: var(--text);
    }

    :root[data-theme="light"] .mobile-today-head h1 {
        color: #1f251f;
    }

    .mobile-today-head p {
        max-width: 220px;
        color: var(--text-secondary);
        font-size: 0.94rem;
        line-height: 1.35;
    }

    .mobile-live-pill {
        flex-shrink: 0;
        border-radius: 999px;
        padding: 8px 10px;
        background: rgba(49, 168, 100, 0.12);
        color: var(--green-500);
        border: 1px solid rgba(49, 168, 100, 0.22);
        font-size: 0.72rem;
        font-weight: 900;
        white-space: nowrap;
    }

    .mobile-today-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 9px;
        margin-top: 22px;
    }

    .mobile-metric-card {
        min-height: 86px;
        padding: 12px 10px;
        border-radius: 18px;
        text-decoration: none;
        border: 1px solid rgba(28, 45, 35, 0.08);
        background: rgba(255, 255, 255, 0.64);
        color: var(--text);
        box-shadow: 0 10px 26px rgba(35, 50, 40, 0.08);
        transition: transform 0.18s, box-shadow 0.18s;
    }

    :root[data-theme="dark"] .mobile-metric-card {
        border-color: var(--glass-border);
        background: rgba(255, 255, 255, 0.055);
    }

    .mobile-metric-card:active {
        transform: scale(0.96);
        box-shadow: 0 6px 16px rgba(35, 50, 40, 0.08);
    }

    .mobile-metric-card strong {
        display: block;
        font-family: 'Space Grotesk', sans-serif;
        font-size: 1.85rem;
        line-height: 1;
        color: var(--amber-500);
        margin-bottom: 8px;
    }

    .mobile-metric-card span {
        color: var(--text-secondary);
        font-size: 0.74rem;
        font-weight: 850;
        line-height: 1.2;
    }

    .mobile-quick-actions {
        display: grid;
        grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr));
        gap: 8px;
        margin: 14px 0 22px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .mobile-quick-actions::-webkit-scrollbar,
    .mobile-hive-rail::-webkit-scrollbar {
        display: none;
    }

    .mobile-action,
    .mobile-action-primary {
        min-width: 86px;
        min-height: 54px;
        border-radius: 17px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 10px 12px;
        text-align: center;
        color: var(--text);
        text-decoration: none;
        font-size: 0.76rem;
        font-weight: 900;
        line-height: 1.05;
        border: 1px solid var(--glass-border);
        background: var(--bg-card);
        box-shadow: var(--shadow-sm);
        transition: transform 0.18s, box-shadow 0.18s;
    }

    .mobile-action-primary {
        min-width: 124px;
        color: #211706;
        border-color: rgba(244, 183, 63, 0.35);
        background: linear-gradient(135deg, #ffd76a, var(--amber-500));
        box-shadow: 0 14px 28px rgba(223, 147, 34, 0.24);
    }

    .mobile-action:active,
    .mobile-action-primary:active {
        transform: scale(0.96);
    }

    .mobile-section-head {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 12px;
        margin: 14px 2px 10px;
    }

    .mobile-section-head h2 {
        font-family: 'Space Grotesk', sans-serif;
        font-size: 1.25rem;
        line-height: 1.05;
    }

    .mobile-section-head a {
        color: var(--amber-500);
        font-size: 0.82rem;
        font-weight: 900;
        text-decoration: none;
    }

    .mobile-hive-rail {
        display: flex;
        gap: 12px;
        margin: 0 -14px 18px;
        padding: 0 14px 6px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .mobile-hive-card {
        flex: 0 0 min(82vw, 310px);
        scroll-snap-align: start;
        border-radius: 24px;
        padding: 18px;
        border: 1px solid var(--glass-border);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent),
            var(--bg-card);
        color: var(--text);
        text-decoration: none;
        box-shadow: var(--shadow-sm);
        transition: transform 0.2s, box-shadow 0.2s;
    }

    .mobile-hive-card:active {
        transform: scale(0.98);
    }

    .mobile-hive-red { border-color: rgba(242, 127, 115, 0.26); }
    .mobile-hive-yellow { border-color: rgba(244, 183, 63, 0.32); }
    .mobile-hive-green { border-color: rgba(49, 168, 100, 0.28); }
    .mobile-hive-blue { border-color: rgba(126, 182, 216, 0.3); }

    .mobile-hive-top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 12px;
    }

    .mobile-hive-top strong {
        font-family: 'Space Grotesk', sans-serif;
        font-size: 1.2rem;
        line-height: 1.1;
    }

    .mobile-hive-top span {
        flex-shrink: 0;
        border-radius: 999px;
        padding: 6px 9px;
        background: rgba(255, 255, 255, 0.08);
        color: var(--text-secondary);
        font-size: 0.7rem;
        font-weight: 900;
    }

    .mobile-hive-card p {
        min-height: 42px;
        color: var(--text-secondary);
        font-size: 0.9rem;
        line-height: 1.35;
        margin-bottom: 12px;
    }

    .mobile-hive-card small {
        color: var(--text-muted);
        font-weight: 800;
    }

    .mobile-sheet {
        border-radius: 28px 28px 20px 20px;
        padding: 10px 16px 18px;
        border: 1px solid var(--glass-border);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
            var(--bg-card);
        box-shadow: var(--shadow-md);
    }

    .mobile-sheet-handle {
        width: 42px;
        height: 5px;
        border-radius: 999px;
        margin: 2px auto 14px;
        background: rgba(128, 140, 130, 0.32);
    }

    .mobile-activity-list {
        display: grid;
        gap: 9px;
    }

    .mobile-activity-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 13px 0;
        color: var(--text);
        text-decoration: none;
        border-bottom: 1px solid var(--glass-border);
    }

    .mobile-activity-row:last-child {
        border-bottom: none;
    }

    .mobile-activity-row strong,
    .mobile-activity-row span {
        display: block;
    }

    .mobile-activity-row strong {
        font-size: 0.95rem;
        line-height: 1.25;
    }

    .mobile-activity-row span,
    .mobile-activity-row time,
    .mobile-empty-state {
        color: var(--text-secondary);
        font-size: 0.78rem;
    }

    .mobile-menu-summary {
        display: block;
        grid-column: 1 / -1;
        padding: 6px 4px 2px;
    }

    .mobile-menu-summary span {
        display: block;
        color: var(--amber-500);
        font-size: 0.7rem;
        font-weight: 900;
        letter-spacing: 0.12em;
        text-transform: uppercase;
    }

    .mobile-menu-summary strong {
        display: block;
        font-family: 'Space Grotesk', sans-serif;
        font-size: 1.28rem;
        margin-top: 2px;
    }

    .mobile-menu-quick {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 2px;
    }

    .nav-links .mobile-menu-quick .mobile-menu-quick-link {
        min-height: 44px;
        color: #211706;
        border-color: rgba(244, 183, 63, 0.38);
        background: linear-gradient(135deg, rgba(255, 215, 106, 0.95), rgba(223, 147, 34, 0.92));
        font-size: 0.82rem;
        justify-content: center;
    }

    .bottom-nav a {
        transition: transform 0.18s, background 0.18s, box-shadow 0.18s;
    }

    .bottom-nav a:active {
        transform: scale(0.95);
    }

    .visit-form .quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .visit-form .quick-btn {
        min-height: 64px;
        border-radius: 18px;
        white-space: normal;
        line-height: 1.15;
        font-size: 0.86rem;
    }

    .visit-form .quick-btn.active {
        box-shadow: 0 14px 30px rgba(223, 147, 34, 0.22);
        transform: translateY(-1px);
    }

    .visit-note-tools {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        margin: 0 0 10px;
    }

    .voice-note-btn.active {
        color: #211706;
        border-color: rgba(244, 183, 63, 0.4);
        background: linear-gradient(135deg, #ffd76a, var(--amber-500));
    }

    .voice-note-btn.unsupported {
        opacity: 0.85;
    }

    .photo-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 12px;
    }

    .photo-preview-item {
        position: relative;
        overflow: hidden;
        border-radius: 18px;
        border: 1px solid var(--glass-border);
        background: var(--bg-card);
        animation: mobileCardIn 0.28s ease both;
    }

    .photo-preview-item img {
        border: none;
        border-radius: 0;
    }

    .photo-preview-remove {
        position: absolute;
        left: 8px;
        right: 8px;
        bottom: 8px;
        min-height: 34px;
        border: 1px solid rgba(242, 127, 115, 0.28);
        border-radius: 12px;
        background: rgba(20, 13, 12, 0.78);
        color: #fff;
        font-family: 'Inter', sans-serif;
        font-size: 0.74rem;
        font-weight: 900;
        cursor: pointer;
    }

    .visit-sticky-actions {
        position: sticky;
        bottom: calc(86px + env(safe-area-inset-bottom));
        z-index: 900;
        margin: 20px -2px 0;
        padding: 10px;
        border-radius: 20px;
        border: 1px solid var(--glass-border);
        background: rgba(8, 15, 12, 0.9);
        backdrop-filter: blur(18px) saturate(1.4);
        -webkit-backdrop-filter: blur(18px) saturate(1.4);
        box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
    }

    :root[data-theme="light"] .visit-sticky-actions {
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 18px 44px rgba(35, 50, 40, 0.14);
    }

    .visit-sticky-actions .db-btn-main,
    .visit-sticky-actions .db-btn-ghost {
        flex: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-today-card,
    .photo-preview-item,
    .mobile-action,
    .mobile-action-primary,
    .mobile-hive-card,
    .bottom-nav a {
        animation: none;
        transition: none;
    }
}

/* ═════════════════════════════════════════════
   iOS MOBILE SHELL FIX v21
   De-overlap header/menu/tabbar/sticky form controls
   ═════════════════════════════════════════════ */

@media (max-width: 860px) {
    #particle-container,
    .particle {
        display: none !important;
    }

    nav {
        z-index: 1500;
        min-height: calc(58px + env(safe-area-inset-top));
        padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    body.mobile-menu-open::before {
        z-index: 1230;
        background: rgba(2, 6, 5, 0.46);
        opacity: 1;
        animation: none;
    }

    :root[data-theme="light"] body.mobile-menu-open::before {
        background: rgba(234, 240, 232, 0.68);
    }

    .mobile-menu-toggle {
        position: relative;
        z-index: 1510;
        flex-shrink: 0;
    }

    .nav-links {
        left: 12px;
        right: 12px;
        top: calc(66px + env(safe-area-inset-top));
        z-index: 1400;
        max-height: calc(100dvh - 156px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 12px;
    }

    body.mobile-menu-open .bottom-nav {
        opacity: 0;
        pointer-events: none;
        transform: translateY(14px);
    }

    .nav-links a {
        min-width: 0;
        min-height: 46px;
        align-items: center;
        white-space: normal;
        line-height: 1.15;
    }

    .bottom-nav {
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        left: 12px;
        right: 12px;
        bottom: calc(8px + env(safe-area-inset-bottom));
        z-index: 1300;
        height: 64px;
        padding: 5px;
        border-radius: 22px;
        transition: opacity 0.18s, transform 0.18s;
    }

    .bottom-nav a,
    .bottom-nav button {
        display: flex !important;
        min-width: 0;
        width: 100%;
        height: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 4px 2px;
        border: 0;
        border-radius: 17px;
        background: transparent;
        color: var(--text-muted);
        font-family: 'Inter', -apple-system, sans-serif;
        font-size: 0.66rem;
        font-weight: 850;
        line-height: 1;
        text-decoration: none;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
    }

    .bottom-nav a .icon,
    .bottom-nav button .icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 25px;
        height: 25px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.06);
        color: var(--text-secondary);
        font-size: 0.72rem;
        font-weight: 900;
        line-height: 1;
    }

    :root[data-theme="light"] .bottom-nav a .icon,
    :root[data-theme="light"] .bottom-nav button .icon {
        background: rgba(18, 29, 24, 0.06);
    }

    .bottom-nav a.active,
    .bottom-nav button.active {
        color: #201606;
        background: linear-gradient(135deg, #ffd76a, var(--amber-500));
        box-shadow: 0 10px 22px rgba(223, 147, 34, 0.2);
    }

    .bottom-nav a.active .icon,
    .bottom-nav button.active .icon {
        color: #201606;
        background: rgba(255, 255, 255, 0.34);
    }

    .container {
        padding: 12px 14px calc(96px + env(safe-area-inset-bottom));
    }

    .mobile-app-home {
        margin-top: 4px;
    }

    .mobile-today-card {
        padding: 18px;
        border-radius: 24px;
    }

    .mobile-today-grid {
        gap: 7px;
        margin-top: 18px;
    }

    .mobile-metric-card {
        min-height: 78px;
        padding: 10px 8px;
        border-radius: 16px;
    }

    .mobile-metric-card strong {
        font-size: 1.62rem;
        margin-bottom: 6px;
    }

    .mobile-quick-actions {
        display: flex;
        grid-template-columns: none;
        gap: 9px;
        margin: 12px -2px 20px;
        padding: 0 2px 6px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
    }

    .mobile-action,
    .mobile-action-primary {
        flex: 0 0 92px;
        min-width: 0;
        min-height: 52px;
        scroll-snap-align: start;
    }

    .mobile-action-primary {
        flex-basis: 132px;
    }

    .mobile-sheet {
        margin-bottom: 8px;
    }

    .visit-form {
        padding-bottom: calc(172px + env(safe-area-inset-bottom));
    }

    .visit-sticky-actions {
        position: fixed;
        left: 14px;
        right: 14px;
        bottom: calc(82px + env(safe-area-inset-bottom));
        z-index: 1250;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
        margin: 0;
        padding: 9px;
        border-radius: 18px;
    }

    body.mobile-menu-open .visit-sticky-actions {
        display: none;
    }

    .visit-sticky-actions .db-btn-main,
    .visit-sticky-actions .db-btn-ghost {
        width: 100%;
        min-width: 0;
        padding-left: 10px;
        padding-right: 10px;
        white-space: nowrap;
    }

    .offline-status {
        left: 14px;
        right: 14px;
        bottom: calc(84px + env(safe-area-inset-bottom));
        z-index: 1290;
        justify-content: space-between;
    }
}

@media (max-width: 420px) {
    .nav-links {
        left: 10px;
        right: 10px;
        top: calc(62px + env(safe-area-inset-top));
        grid-template-columns: 1fr;
        max-height: calc(100dvh - 148px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    }

    .mobile-menu-quick {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bottom-nav {
        left: 8px;
        right: 8px;
        height: 62px;
        border-radius: 21px;
    }

    .bottom-nav a,
    .bottom-nav button {
        font-size: 0.61rem;
    }

    .bottom-nav a .icon,
    .bottom-nav button .icon {
        width: 23px;
        height: 23px;
        border-radius: 9px;
        font-size: 0.68rem;
    }

    .mobile-today-head {
        display: block;
    }

    .mobile-live-pill {
        display: inline-flex;
        margin-top: 4px;
    }

    .mobile-today-head p {
        max-width: none;
    }

    .mobile-metric-card span {
        font-size: 0.68rem;
    }

    .mobile-action,
    .mobile-action-primary {
        flex-basis: 86px;
        min-height: 50px;
        font-size: 0.72rem;
    }

    .mobile-action-primary {
        flex-basis: 122px;
    }

    .visit-sticky-actions {
        left: 10px;
        right: 10px;
        bottom: calc(78px + env(safe-area-inset-bottom));
    }
}

/* ═════════════════════════════════════════════
   RESPONSIVE IMKER WORKFLOW v22
   Cards, quick controls, locations, tablet split
   ═════════════════════════════════════════════ */

.workflow-kpi-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.workflow-kpi-card,
.workflow-hive-card,
.workflow-location-card,
.workflow-save-panel,
.workflow-preview {
    border: 1px solid var(--glass-border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 58%),
        var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.workflow-kpi-card {
    min-height: 112px;
    border-radius: 22px;
    padding: 16px;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.18s, box-shadow 0.18s;
}

.workflow-kpi-card:hover,
.workflow-hive-card:hover,
.workflow-location-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.workflow-kpi-card span {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 850;
    line-height: 1.2;
}

.workflow-kpi-card strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    line-height: 1;
    color: var(--amber-400);
}

.workflow-kpi-card.is-warning strong {
    color: var(--amber-500);
}

.workflow-kpi-card.is-danger strong {
    color: var(--red-400);
}

.workflow-filterbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.workflow-filterbar .form-input,
.workflow-search {
    min-width: 180px;
}

.workflow-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.workflow-card-grid-list {
    align-content: start;
}

.workflow-hive-card {
    border-radius: 22px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.workflow-card-main {
    color: var(--text);
    text-decoration: none;
    display: grid;
    gap: 12px;
}

.workflow-card-main p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.35;
}

.workflow-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.workflow-card-head h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    line-height: 1.1;
}

.workflow-status-dot {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    border: 1px solid var(--glass-border);
    white-space: nowrap;
}

.workflow-status-red {
    color: var(--red-400);
    background: var(--red-100);
    border-color: rgba(239, 68, 68, 0.24);
}

.workflow-status-yellow {
    color: var(--amber-400);
    background: var(--amber-100);
    border-color: rgba(251, 191, 36, 0.24);
}

.workflow-status-green {
    color: var(--green-400);
    background: var(--green-100);
    border-color: rgba(34, 197, 94, 0.24);
}

.workflow-status-blue {
    color: var(--blue-400);
    background: var(--blue-100);
    border-color: rgba(59, 130, 246, 0.24);
}

.workflow-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

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

.workflow-card-actions .db-btn-main,
.workflow-card-actions .db-btn-ghost {
    flex: 1 1 120px;
}

.workflow-split {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 16px;
}

.workflow-preview {
    position: sticky;
    top: 96px;
    border-radius: 22px;
    padding: 18px;
    align-self: start;
}

.workflow-location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.workflow-location-card {
    border-radius: 22px;
    padding: 18px;
    display: grid;
    gap: 16px;
}

.workflow-location-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.workflow-location-stats div {
    min-height: 76px;
    border-radius: 16px;
    padding: 10px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
}

.workflow-location-stats strong,
.workflow-location-stats span {
    display: block;
}

.workflow-location-stats strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    line-height: 1.15;
}

.workflow-location-stats span {
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 800;
}

.workflow-location-list {
    display: grid;
    gap: 6px;
}

.workflow-location-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
    padding: 9px 0;
    color: var(--text);
    text-decoration: none;
    border-top: 1px solid var(--glass-border);
}

.workflow-location-row small {
    color: var(--text-secondary);
    font-weight: 750;
    text-align: right;
}

.workflow-alert-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.workflow-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 16px;
}

.workflow-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.workflow-status-grid div {
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 12px;
    background: var(--glass);
}

.workflow-status-grid span,
.workflow-status-grid strong {
    display: block;
}

.workflow-status-grid span {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 850;
    margin-bottom: 6px;
}

.workflow-status-grid strong {
    font-size: 0.95rem;
    line-height: 1.2;
}

.workflow-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.workflow-section-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 12px;
    margin-bottom: 4px;
    scrollbar-width: none;
}

.workflow-section-tabs::-webkit-scrollbar {
    display: none;
}

.workflow-section-tabs a {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    color: var(--text);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 850;
}

.workflow-change-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.workflow-change-list span {
    border-radius: 999px;
    padding: 6px 10px;
    background: var(--blue-100);
    color: var(--blue-400);
    font-size: 0.74rem;
    font-weight: 850;
}

.workflow-save-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-radius: 22px;
    padding: 18px;
    margin-bottom: 16px;
}

.quick-control-hero {
    margin-bottom: 16px;
}

.quick-context-card {
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 12px 14px;
    margin: 10px 0 14px;
    background: var(--glass);
    color: var(--text-secondary);
    font-weight: 750;
}

.quick-control-panel {
    display: grid;
    gap: 18px;
}

.quick-control-group > label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.control-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.control-choice-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.control-choice {
    min-width: 0;
}

.control-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.control-choice span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 10px 8px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    color: var(--text);
    text-align: center;
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1.1;
    cursor: pointer;
    transition: transform 0.16s, border-color 0.16s, background 0.16s;
}

.control-choice input:checked + span {
    color: #211706;
    border-color: rgba(244, 183, 63, 0.42);
    background: linear-gradient(135deg, #ffd76a, var(--amber-500));
    box-shadow: 0 12px 26px rgba(223, 147, 34, 0.2);
}

.control-choice span:active {
    transform: scale(0.96);
}

.is-hidden {
    display: none !important;
}

@media (min-width: 861px) and (max-width: 1180px) {
    .workflow-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .workflow-split,
    .workflow-detail-grid {
        grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
    }

    .workflow-card-grid {
        grid-template-columns: 1fr;
    }

    .workflow-preview {
        display: block !important;
    }
}

@media (max-width: 860px) {
    .workflow-kpi-grid,
    .dashboard-desktop-only {
        display: none !important;
    }

    .workflow-filterbar {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

    .workflow-filterbar .form-input,
    .workflow-search {
        width: 100%;
        min-width: 0;
    }

    .workflow-card-grid,
    .workflow-location-grid,
    .workflow-detail-grid,
    .workflow-split {
        grid-template-columns: 1fr;
    }

    .workflow-hive-card,
    .workflow-location-card,
    .workflow-save-panel {
        border-radius: 20px;
        padding: 14px;
    }

    .workflow-save-panel {
        display: grid;
    }

    .workflow-card-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .workflow-card-actions .db-btn-main,
    .workflow-card-actions .db-btn-ghost {
        min-width: 0;
        padding-left: 8px;
        padding-right: 8px;
        font-size: 0.76rem;
    }

    .workflow-location-stats,
    .workflow-status-grid {
        grid-template-columns: 1fr;
    }

    .workflow-action-grid {
        grid-template-columns: 1fr;
    }

    .control-choice-grid,
    .control-choice-grid-2 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .control-choice span {
        min-height: 58px;
    }

    .visit-sticky-actions {
        grid-template-columns: 0.9fr 1fr 0.9fr;
    }

    .visit-sticky-actions .db-btn-main,
    .visit-sticky-actions .db-btn-ghost {
        min-height: 48px;
        font-size: 0.72rem;
        white-space: normal;
        line-height: 1.05;
    }
}

@media (max-width: 420px) {
    .control-choice-grid,
    .control-choice-grid-2 {
        grid-template-columns: 1fr;
    }

    .workflow-card-actions {
        grid-template-columns: 1fr;
    }

    .visit-sticky-actions {
        grid-template-columns: 1fr 1fr;
    }

    .visit-sticky-actions .db-btn-ghost:first-child {
        display: none;
    }
}

/* Liquid Glass Bottom Navigation v23 */
@media (max-width: 860px) {
    .bottom-nav {
        left: max(12px, env(safe-area-inset-left));
        right: max(12px, env(safe-area-inset-right));
        bottom: calc(10px + env(safe-area-inset-bottom));
        height: 66px;
        padding: 6px;
        overflow: visible;
        isolation: isolate;
        border-radius: 26px;
        border: 1px solid rgba(255, 255, 255, 0.38);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.28)),
            rgba(246, 250, 247, 0.58);
        -webkit-backdrop-filter: blur(24px) saturate(1.55);
        backdrop-filter: blur(24px) saturate(1.55);
        box-shadow:
            0 22px 48px rgba(20, 32, 26, 0.18),
            0 5px 14px rgba(20, 32, 26, 0.10),
            inset 0 1px 0 rgba(255, 255, 255, 0.78),
            inset 0 -1px 0 rgba(255, 255, 255, 0.22);
        transition: opacity 0.18s ease, transform 0.18s ease, background 0.2s ease;
    }

    :root[data-theme="dark"] .bottom-nav {
        border-color: rgba(255, 255, 255, 0.16);
        background:
            linear-gradient(180deg, rgba(36, 52, 44, 0.58), rgba(9, 18, 14, 0.50)),
            rgba(7, 15, 12, 0.58);
        box-shadow:
            0 24px 54px rgba(0, 0, 0, 0.42),
            0 7px 18px rgba(0, 0, 0, 0.26),
            inset 0 1px 0 rgba(255, 255, 255, 0.16),
            inset 0 -1px 0 rgba(255, 255, 255, 0.06);
    }

    .bottom-nav::before,
    .bottom-nav::after {
        content: "";
        position: absolute;
        pointer-events: none;
    }

    .bottom-nav::before {
        inset: 1px;
        z-index: -1;
        border-radius: 25px;
        background:
            radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.48), transparent 32%),
            radial-gradient(circle at 78% 100%, rgba(244, 183, 63, 0.18), transparent 38%);
    }

    .bottom-nav::after {
        left: 20%;
        right: 20%;
        top: 4px;
        height: 1px;
        border-radius: 999px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.86), transparent);
        opacity: 0.82;
    }

    .bottom-nav a,
    .bottom-nav button {
        position: relative;
        border-radius: 20px;
        color: rgba(32, 47, 39, 0.70);
        transition:
            transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1),
            color 0.16s ease,
            background 0.16s ease,
            box-shadow 0.16s ease;
        -webkit-tap-highlight-color: transparent;
    }

    :root[data-theme="dark"] .bottom-nav a,
    :root[data-theme="dark"] .bottom-nav button {
        color: rgba(220, 231, 224, 0.70);
    }

    .bottom-nav a .icon,
    .bottom-nav button .icon {
        width: 27px;
        height: 27px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.32);
        background: rgba(255, 255, 255, 0.34);
        color: currentColor;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44);
    }

    :root[data-theme="dark"] .bottom-nav a .icon,
    :root[data-theme="dark"] .bottom-nav button .icon {
        border-color: rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.08);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
    }

    .bottom-nav .icon svg {
        width: 17px;
        height: 17px;
        display: block;
        stroke: currentColor;
        stroke-width: 2.2;
        stroke-linecap: round;
        stroke-linejoin: round;
        fill: none;
    }

    .bottom-nav a.active:not(:nth-child(3)),
    .bottom-nav button.active {
        color: #123823;
        background: rgba(255, 255, 255, 0.50);
        box-shadow:
            0 8px 20px rgba(35, 50, 40, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.62);
    }

    :root[data-theme="dark"] .bottom-nav a.active:not(:nth-child(3)),
    :root[data-theme="dark"] .bottom-nav button.active {
        color: #f7ffe9;
        background: rgba(255, 255, 255, 0.12);
        box-shadow:
            0 10px 24px rgba(0, 0, 0, 0.26),
            inset 0 1px 0 rgba(255, 255, 255, 0.12);
    }

    .bottom-nav a.active:not(:nth-child(3)) .icon,
    .bottom-nav button.active .icon {
        color: #1e7a3d;
        background: rgba(213, 247, 221, 0.78);
        border-color: rgba(69, 170, 91, 0.22);
    }

    .bottom-nav a:nth-child(3) {
        transform: translateY(-13px);
        color: #251806;
        background: transparent;
        box-shadow: none;
    }

    .bottom-nav a:nth-child(3) .icon {
        width: 52px;
        height: 52px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.56);
        color: #211504;
        background:
            radial-gradient(circle at 32% 24%, #fff1ad, transparent 34%),
            linear-gradient(145deg, #ffd76a, #f4b73f 56%, #de931f);
        box-shadow:
            0 16px 30px rgba(223, 147, 34, 0.34),
            0 5px 12px rgba(120, 77, 12, 0.18),
            inset 0 1px 0 rgba(255, 255, 255, 0.60);
    }

    .bottom-nav a:nth-child(3) .icon svg {
        width: 25px;
        height: 25px;
        stroke-width: 2.6;
    }

    .bottom-nav a:nth-child(3).active {
        color: #1f1404;
        background: transparent;
        box-shadow: none;
    }

    .bottom-nav a:active,
    .bottom-nav button:active {
        transform: scale(0.96);
    }

    .bottom-nav a:nth-child(3):active {
        transform: translateY(-10px) scale(0.98);
    }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    @media (max-width: 860px) {
        .bottom-nav {
            background: rgba(246, 250, 247, 0.96);
        }

        :root[data-theme="dark"] .bottom-nav {
            background: rgba(10, 20, 16, 0.96);
        }
    }
}

@media (max-width: 420px) {
    .bottom-nav {
        left: max(8px, env(safe-area-inset-left));
        right: max(8px, env(safe-area-inset-right));
        height: 64px;
        border-radius: 25px;
    }

    .bottom-nav a,
    .bottom-nav button {
        font-size: 0.58rem;
    }

    .bottom-nav a .icon,
    .bottom-nav button .icon {
        width: 25px;
        height: 25px;
        border-radius: 11px;
    }

    .bottom-nav a:nth-child(3) .icon {
        width: 50px;
        height: 50px;
    }
}

/* Liquid Glass Bottom Navigation v23.1 viewport fit */
@media (max-width: 860px) {
    .bottom-nav {
        box-sizing: border-box;
        left: 12px;
        right: auto;
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        grid-template-columns: repeat(5, minmax(0, 1fr));
        column-gap: 0;
    }

    .bottom-nav a,
    .bottom-nav button {
        min-width: 0;
        overflow: visible;
    }
}

@media (max-width: 420px) {
    .bottom-nav {
        left: 8px;
        right: auto;
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
    }
}

/* Workflow Upgrade v24: locations, NFC/QR, desktop workbench */
.workflow-command-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 22px;
}

.workflow-command-card,
.workflow-mini-tag,
.tag-source-card,
.form-subpanel,
.workflow-scan-panel,
.workflow-tag-card {
    border: 1px solid var(--glass-border);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.06), transparent 58%),
        var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.workflow-command-card {
    min-height: 132px;
    border-radius: 22px;
    padding: 18px;
    color: var(--text);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.workflow-command-card:hover {
    transform: translateY(-2px);
    border-color: rgba(244, 183, 63, 0.28);
    box-shadow: var(--shadow-md);
}

.workflow-command-card.is-primary {
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 215, 106, 0.22), transparent 44%),
        linear-gradient(180deg, rgba(255,255,255,0.07), transparent 58%),
        var(--bg-card);
}

.workflow-command-card span,
.workflow-mini-tag span,
.tag-source-card span,
.workflow-location-meta {
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.workflow-command-card strong,
.workflow-mini-tag strong,
.tag-source-card strong {
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.1;
}

.workflow-command-card strong {
    font-size: 1.25rem;
}

.workflow-command-card small {
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.35;
}

.workflow-tag-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
}

.workflow-mini-tag {
    border-radius: 18px;
    padding: 14px;
    text-decoration: none;
    display: grid;
    gap: 6px;
}

.workflow-location-shell,
.workflow-tag-workbench {
    display: grid;
    grid-template-columns: minmax(300px, 0.38fr) minmax(0, 0.62fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 22px;
}

.workflow-location-create,
.workflow-scan-panel {
    position: sticky;
    top: 92px;
}

.workflow-inline-form {
    display: grid;
    gap: 14px;
}

.workflow-assign-form {
    display: grid;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
}

.workflow-assign-form label {
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.workflow-assign-form > div:not(.form-row) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.workflow-card-actions form,
.workflow-card-actions form button {
    min-width: 0;
}

.workflow-card-actions form {
    flex: 1 1 120px;
    display: flex;
}

.workflow-card-actions form button {
    width: 100%;
}

.workflow-location-meta {
    text-transform: none;
    letter-spacing: 0;
}

.workflow-location-meta.is-warning {
    color: var(--amber-400);
}

.workflow-location-row.is-muted {
    color: var(--text-secondary);
}

.form-subpanel {
    border-radius: 18px;
    padding: 16px;
    margin: 18px 0;
}

.tag-source-card {
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 14px;
    display: grid;
    gap: 4px;
}

.workflow-tag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.workflow-tag-card {
    border-radius: 22px;
    padding: 16px;
    display: grid;
    gap: 14px;
}

.tag-qr-frame {
    width: min(100%, 220px);
    aspect-ratio: 1;
    margin: 0 auto;
    padding: 12px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.34);
    box-shadow: var(--shadow-sm);
    display: grid;
    place-items: center;
}

.tag-qr-frame-small {
    width: min(100%, 180px);
    margin-bottom: 18px;
}

.tag-qr-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.tag-url-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.tag-url-row input {
    min-width: 0;
}

.nfc-scan-orb {
    width: 154px;
    aspect-ratio: 1;
    margin: 4px auto 18px;
    border-radius: 999px;
    background:
        radial-gradient(circle at 38% 30%, rgba(255, 239, 176, 0.92), transparent 22%),
        radial-gradient(circle at 52% 58%, rgba(244, 183, 63, 0.42), transparent 44%),
        linear-gradient(145deg, rgba(98, 211, 140, 0.30), rgba(126, 182, 216, 0.18));
    border: 1px solid rgba(255,255,255,0.24);
    box-shadow:
        0 20px 50px rgba(244, 183, 63, 0.20),
        inset 0 1px 0 rgba(255,255,255,0.48);
    position: relative;
}

.nfc-scan-orb::before,
.nfc-scan-orb::after {
    content: "";
    position: absolute;
    inset: 22%;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.52);
}

.nfc-scan-orb::after {
    inset: 36%;
    border-color: rgba(255,255,255,0.72);
}

.mobile-quick-actions button.mobile-action,
.mobile-quick-actions button.mobile-action-primary {
    border: 0;
    font-family: inherit;
}

@media (min-width: 1480px) {
    .workflow-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }

    .workflow-location-grid,
    .workflow-tag-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }
}

@media (max-width: 1180px) {
    .workflow-command-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workflow-location-shell,
    .workflow-tag-workbench {
        grid-template-columns: 1fr;
    }

    .workflow-location-create,
    .workflow-scan-panel {
        position: static;
    }
}

@media (max-width: 860px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .mobile-today-head {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 10px;
    }

    .mobile-live-pill {
        max-width: 100%;
        white-space: normal;
    }

    .mobile-today-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .mobile-metric-card {
        min-width: 0;
    }

    .workflow-command-panel {
        display: none;
    }

    .workflow-location-shell,
    .workflow-tag-workbench {
        gap: 14px;
    }

    .workflow-tag-grid {
        grid-template-columns: 1fr;
    }

    .workflow-assign-form > div:not(.form-row),
    .tag-url-row {
        grid-template-columns: 1fr;
    }

    .form-subpanel {
        padding: 14px;
        border-radius: 18px;
    }

    .tag-qr-frame {
        width: min(76vw, 230px);
    }
}

@media (max-width: 430px) {
    .mobile-today-card {
        padding-left: 18px;
        padding-right: 18px;
    }

    .mobile-today-head h1 {
        font-size: clamp(2.7rem, 14vw, 3.7rem);
        line-height: 0.95;
    }

    .mobile-metric-card {
        padding: 10px 8px;
        min-height: 78px;
    }

    .mobile-metric-card strong {
        font-size: 1.75rem;
    }

    .mobile-metric-card span {
        font-size: 0.68rem;
        line-height: 1.15;
    }
}

/* v24.2 hard mobile overflow guard */
@media (max-width: 860px) {
    .mobile-app-home,
    .mobile-today-card,
    .mobile-today-grid {
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .mobile-today-head {
        display: block !important;
    }

    .mobile-live-pill {
        display: inline-flex !important;
        width: max-content !important;
        max-width: 100% !important;
        margin-top: 4px !important;
    }

    .mobile-today-grid {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 7px !important;
        overflow: visible !important;
    }

    .mobile-metric-card {
        width: auto !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
}

@media (max-width: 430px) {
    .mobile-today-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .mobile-metric-card {
        padding: 10px 7px !important;
    }

    .mobile-metric-card:nth-child(3) {
        grid-column: 1 / -1 !important;
    }
}

/* v25 iPhone Liquid Dock: compact, integrated center action */
@media (max-width: 860px) {
    body {
        padding-bottom: calc(82px + env(safe-area-inset-bottom)) !important;
    }

    .bottom-nav {
        left: max(10px, env(safe-area-inset-left)) !important;
        right: auto !important;
        bottom: calc(8px + env(safe-area-inset-bottom)) !important;
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        height: 60px !important;
        padding: 5px !important;
        border-radius: 22px !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 0 !important;
        align-items: center !important;
        overflow: visible !important;
    }

    .bottom-nav a,
    .bottom-nav button {
        height: 50px !important;
        min-height: 50px !important;
        min-width: 0 !important;
        padding: 4px 2px 5px !important;
        border-radius: 17px !important;
        font-size: 0.58rem !important;
        line-height: 1 !important;
        font-weight: 850 !important;
        white-space: nowrap !important;
        gap: 2px !important;
        transform: none !important;
        overflow: hidden !important;
    }

    .bottom-nav a .icon,
    .bottom-nav button .icon {
        width: 26px !important;
        height: 26px !important;
        border-radius: 11px !important;
        margin: 0 auto 2px !important;
        flex: 0 0 auto !important;
    }

    .bottom-nav .icon svg {
        width: 16px !important;
        height: 16px !important;
        stroke-width: 2.2 !important;
    }

    .bottom-nav a:nth-child(3) {
        transform: none !important;
        color: #251806 !important;
        background: rgba(255, 255, 255, 0.42) !important;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.58), 0 8px 20px rgba(223,147,34,0.12) !important;
    }

    .bottom-nav a:nth-child(3) .icon {
        width: 34px !important;
        height: 34px !important;
        border-radius: 15px !important;
        margin-bottom: 1px !important;
        background:
            radial-gradient(circle at 34% 24%, #fff2b8, transparent 34%),
            linear-gradient(145deg, #ffd76a, #f4b73f 60%, #de931f) !important;
        box-shadow:
            0 8px 18px rgba(223,147,34,0.22),
            inset 0 1px 0 rgba(255,255,255,0.62) !important;
    }

    .bottom-nav a:nth-child(3) .icon svg {
        width: 20px !important;
        height: 20px !important;
        stroke-width: 2.5 !important;
    }

    .bottom-nav a:nth-child(3):active {
        transform: scale(0.97) !important;
    }

    :root[data-theme="dark"] .bottom-nav a:nth-child(3) {
        color: #261805 !important;
        background: rgba(244, 183, 63, 0.16) !important;
    }
}

@media (max-width: 390px) {
    .bottom-nav {
        left: 8px !important;
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
    }

    .bottom-nav a,
    .bottom-nav button {
        font-size: 0.54rem !important;
        letter-spacing: 0 !important;
    }
}

/* ═════════════════════════════════════════════
   Responsive Premium Cockpit v27
   Mobile stand workflow + desktop cockpit
   ═════════════════════════════════════════════ */

.container-wide {
    max-width: 1520px;
    margin-left: auto;
    margin-right: auto;
}

.nav-more,
.mobile-menu-group,
.mobile-menu-secondary {
    display: none;
}

@media (min-width: 861px) {
    .nav-links {
        align-items: center;
    }

    .nav-more {
        display: block;
        position: relative;
    }

    .nav-more summary {
        list-style: none;
        cursor: pointer;
        color: var(--text-secondary);
        padding: 8px 16px;
        border-radius: var(--radius-sm);
        font-weight: 700;
        transition: all 0.2s ease;
    }

    .nav-more summary::-webkit-details-marker {
        display: none;
    }

    .nav-more summary:hover,
    .nav-more.active summary,
    .nav-more[open] summary {
        color: var(--amber-400);
        background: var(--amber-100);
    }

    .nav-more-menu {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        min-width: 210px;
        display: grid;
        gap: 6px;
        padding: 10px;
        border-radius: 18px;
        border: 1px solid var(--glass-border);
        background: rgba(8, 16, 13, 0.94);
        box-shadow: var(--shadow-lg);
        backdrop-filter: blur(18px) saturate(1.4);
        -webkit-backdrop-filter: blur(18px) saturate(1.4);
        z-index: 1200;
    }

    :root[data-theme="light"] .nav-more-menu {
        background: rgba(255, 255, 255, 0.96);
    }

    .nav-more:not([open]) .nav-more-menu {
        display: none;
    }
}

.desktop-cockpit,
.desktop-cockpit-head {
    margin-bottom: 22px;
}

.desktop-cockpit-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 0 4px;
}

.desktop-cockpit-head h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    line-height: 0.95;
    color: var(--text);
}

.desktop-cockpit-head p {
    margin-top: 10px;
    color: var(--text-secondary);
    max-width: 680px;
    font-size: 1rem;
}

.workflow-kpi-grid-v27 {
    grid-template-columns: repeat(7, minmax(130px, 1fr));
}

.desktop-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.72fr) minmax(320px, 0.72fr);
    gap: 18px;
    align-items: start;
}

.cockpit-hive-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.cockpit-hive-card {
    min-height: 238px;
}

.cockpit-tasks,
.cockpit-map,
.detail-action-panel-v27,
.location-sidebar-v27 {
    position: sticky;
    top: 92px;
}

.cockpit-alerts {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
    display: grid;
    gap: 8px;
}

.cockpit-alert-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    padding: 9px 0;
    border-bottom: 1px solid var(--glass-border);
}

.cockpit-map-preview {
    min-height: 190px;
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--glass-border);
    margin-bottom: 14px;
    background:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
        radial-gradient(circle at 24% 42%, rgba(244, 183, 63, 0.26), transparent 9%),
        radial-gradient(circle at 72% 32%, rgba(74, 222, 128, 0.18), transparent 12%),
        rgba(255,255,255,0.035);
    background-size: 34px 34px, 34px 34px, auto, auto, auto;
}

.cockpit-map-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd76a, var(--amber-500));
    border: 2px solid rgba(255, 255, 255, 0.68);
    box-shadow: 0 0 0 10px rgba(244, 183, 63, 0.12);
}

.cockpit-map-dot-1 { left: 22%; top: 36%; }
.cockpit-map-dot-2 { left: 58%; top: 26%; }
.cockpit-map-dot-3 { left: 72%; top: 62%; }
.cockpit-map-dot-4 { left: 38%; top: 70%; }
.cockpit-map-dot-5 { left: 82%; top: 42%; }

.view-toggle {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 4px;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
}

.view-toggle button {
    min-height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 900;
    cursor: pointer;
}

.view-toggle button.active {
    color: #211706;
    background: linear-gradient(135deg, #ffd76a, var(--amber-500));
}

.workflow-view-table {
    display: none;
}

.beuten-workbench-v27.is-table-view .workflow-card-grid-list,
.beuten-workbench-v27.is-table-view .workflow-preview {
    display: none;
}

.beuten-workbench-v27.is-table-view .workflow-split {
    grid-template-columns: 1fr;
}

.beuten-workbench-v27.is-table-view .workflow-view-table {
    display: block;
}

.workflow-table-wrap {
    overflow-x: auto;
}

.workflow-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

.workflow-table th,
.workflow-table td {
    padding: 13px 12px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}

.workflow-table th {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.workflow-table td {
    color: var(--text);
    font-size: 0.88rem;
}

.table-main-link {
    color: var(--text);
    font-weight: 900;
    text-decoration: none;
}

.table-actions {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}

.location-split-v27 {
    display: grid;
    grid-template-columns: minmax(280px, 0.32fr) minmax(0, 0.68fr);
    gap: 18px;
    align-items: start;
}

.location-sidebar-v27 {
    display: grid;
    gap: 14px;
}

.location-nav-list,
.location-detail-stack {
    display: grid;
    gap: 12px;
}

.location-nav-row {
    display: grid;
    gap: 4px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--text);
    text-decoration: none;
}

.location-nav-row:hover {
    border-color: rgba(244, 183, 63, 0.28);
}

.location-nav-row span {
    font-weight: 900;
}

.location-nav-row small {
    color: var(--text-secondary);
}

.location-main-v27 {
    display: grid;
    gap: 18px;
}

.location-detail-card-v27 {
    scroll-margin-top: 102px;
}

.location-batch-form {
    display: grid;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
}

.location-batch-form > label {
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.location-batch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}

.quick-standort-detect,
.mobile-location-detect {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 12px;
    background: var(--glass);
    margin: 10px 0 14px;
}

.quick-standort-detect.is-detected,
.mobile-location-detect:has([data-location-title]:not(:empty)) {
    border-color: rgba(74, 222, 128, 0.24);
}

.quick-standort-detect span,
.mobile-location-detect span {
    display: block;
    color: var(--amber-500);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.quick-standort-detect strong,
.mobile-location-detect strong {
    display: block;
    margin-top: 2px;
    color: var(--text);
    line-height: 1.2;
}

.quick-standort-detect small,
.mobile-location-detect small {
    display: block;
    margin-top: 3px;
    color: var(--text-secondary);
    font-weight: 750;
    line-height: 1.25;
}

.tag-assistant-v27 {
    margin-bottom: 18px;
}

.tag-assistant-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.tag-step-card {
    min-height: 132px;
    display: grid;
    gap: 7px;
    align-content: start;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--text);
    text-align: left;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
}

.tag-step-card span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #211706;
    background: linear-gradient(135deg, #ffd76a, var(--amber-500));
    font-weight: 900;
}

.tag-step-card strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.08rem;
}

.tag-step-card small {
    color: var(--text-secondary);
    line-height: 1.35;
}

.tag-label-sheet {
    display: none;
}

@media (max-width: 1260px) {
    .desktop-workbench {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 0.58fr);
    }

    .cockpit-map {
        grid-column: 1 / -1;
        position: static;
    }

    .cockpit-hive-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 1080px) {
    .workflow-kpi-grid-v27 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .location-split-v27 {
        grid-template-columns: 1fr;
    }

    .location-sidebar-v27 {
        position: static;
    }
}

@media (max-width: 860px) {
    .nav-more {
        display: none !important;
    }

    .mobile-menu-group {
        display: block;
        grid-column: 1 / -1;
        color: var(--amber-500);
        font-size: 0.68rem;
        font-weight: 900;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        padding: 8px 4px 0;
    }

    .mobile-menu-secondary {
        display: inline-flex;
    }

    .nav-links {
        top: auto !important;
        bottom: calc(12px + env(safe-area-inset-bottom)) !important;
        max-height: calc(100dvh - 102px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
        border-radius: 28px !important;
        padding: 14px !important;
        box-shadow: 0 24px 70px rgba(0, 0, 0, 0.44) !important;
    }

    .mobile-today-card-v27 {
        color: #172017;
        background:
            radial-gradient(circle at 96% 0%, rgba(74, 222, 128, 0.28), transparent 42%),
            radial-gradient(circle at 0% 100%, rgba(251, 191, 36, 0.24), transparent 46%),
            rgba(255, 255, 255, 0.94) !important;
        box-shadow: 0 20px 48px rgba(40, 54, 44, 0.14) !important;
    }

    :root[data-theme="dark"] .mobile-today-card-v27 {
        color: #172017;
        background:
            radial-gradient(circle at 96% 0%, rgba(74, 222, 128, 0.24), transparent 42%),
            radial-gradient(circle at 0% 100%, rgba(251, 191, 36, 0.22), transparent 46%),
            rgba(255, 255, 255, 0.92) !important;
    }

    .mobile-home-v27 .mobile-today-head h1,
    .mobile-today-card-v27 .mobile-today-head h1 {
        font-size: clamp(2.18rem, 11vw, 3rem);
        color: inherit;
    }

    .mobile-today-card-v27 .mobile-today-head p,
    .mobile-today-card-v27 .mobile-location-detect small,
    .mobile-today-card-v27 .mobile-metric-card span {
        color: rgba(23, 32, 23, 0.68) !important;
    }

    .mobile-today-card-v27 .mobile-live-pill {
        background: rgba(34, 197, 94, 0.12);
    }

    .mobile-today-card-v27 .mobile-today-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 7px !important;
        margin-top: 12px !important;
    }

    .mobile-today-card-v27 .mobile-metric-card,
    .mobile-today-card-v27 .mobile-metric-card:nth-child(3) {
        grid-column: auto !important;
        min-height: 66px !important;
        background: rgba(255, 255, 255, 0.62) !important;
        color: #172017 !important;
    }

    .mobile-today-card-v27 .mobile-metric-card strong {
        font-size: 1.42rem !important;
        margin-bottom: 4px !important;
    }

    .mobile-quick-grid {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 9px !important;
        overflow: visible !important;
        margin: 14px 0 22px !important;
        padding: 0 !important;
    }

    .mobile-quick-grid .mobile-action,
    .mobile-quick-grid .mobile-action-primary {
        flex: initial !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 56px !important;
        padding: 10px 8px !important;
    }

    .mobile-location-detect {
        align-items: center;
        margin: 10px 0 10px;
        padding: 10px;
    }

    .mobile-location-detect .db-btn-main {
        width: auto;
        min-width: 92px;
        padding-left: 12px;
        padding-right: 12px;
        white-space: nowrap;
    }

    .mobile-hive-rail-v27 {
        padding-bottom: 12px;
        scroll-padding-left: 14px;
    }

    .mobile-hive-rail-v27::after {
        content: "";
        flex: 0 0 18px;
    }

    .mobile-hive-card.is-priority {
        order: -1;
        border-color: rgba(74, 222, 128, 0.42);
        box-shadow: 0 16px 36px rgba(34, 197, 94, 0.16);
    }

    .bottom-nav {
        height: 58px !important;
        border-radius: 21px !important;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.24)),
            rgba(246, 250, 247, 0.52) !important;
    }

    .bottom-nav a,
    .bottom-nav button {
        height: 48px !important;
        min-height: 48px !important;
    }

    .bottom-nav a .icon,
    .bottom-nav button .icon {
        width: 24px !important;
        height: 24px !important;
    }

    .bottom-nav a:nth-child(3) .icon {
        width: 31px !important;
        height: 31px !important;
    }

    .visit-form {
        padding-bottom: calc(160px + env(safe-area-inset-bottom)) !important;
    }

    .visit-sticky-actions {
        bottom: calc(74px + env(safe-area-inset-bottom)) !important;
        grid-template-columns: 1fr 1fr !important;
    }

    .visit-sticky-actions .db-btn-ghost:first-child {
        display: none;
    }

    .quick-standort-detect {
        display: grid;
    }

    .quick-standort-detect .db-btn-ghost {
        width: 100%;
    }

    .location-split-v27,
    .desktop-workbench,
    .tag-assistant-steps {
        grid-template-columns: 1fr;
    }

    .location-sidebar-v27,
    .cockpit-tasks,
    .cockpit-map,
    .detail-action-panel-v27 {
        position: static;
    }

    .location-batch-grid {
        grid-template-columns: 1fr;
    }

    .tag-step-card {
        min-height: 112px;
    }
}

@media (max-width: 430px) {
    .mobile-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .mobile-location-detect {
        display: flex;
    }

    .mobile-location-detect .db-btn-main {
        width: auto;
    }
}

/* v27.1 - iPhone clarity pass */
@media (max-width: 768px) {
    .mobile-home-v27 {
        padding-bottom: calc(132px + env(safe-area-inset-bottom)) !important;
    }

    .mobile-today-card-v27 {
        padding: 17px 18px 15px !important;
        border-radius: 25px !important;
        border-color: rgba(255, 255, 255, 0.7) !important;
        background:
            radial-gradient(circle at 96% 0%, rgba(74, 222, 128, 0.18), transparent 38%),
            radial-gradient(circle at 0% 100%, rgba(251, 191, 36, 0.17), transparent 42%),
            #fbfff8 !important;
        box-shadow: 0 18px 42px rgba(18, 29, 20, 0.16) !important;
    }

    :root[data-theme="dark"] .mobile-today-card-v27 {
        background:
            radial-gradient(circle at 96% 0%, rgba(74, 222, 128, 0.16), transparent 38%),
            radial-gradient(circle at 0% 100%, rgba(251, 191, 36, 0.16), transparent 42%),
            #fbfff8 !important;
    }

    .mobile-home-v27 .mobile-today-head h1,
    .mobile-today-card-v27 .mobile-today-head h1 {
        font-size: clamp(1.95rem, 9.4vw, 2.62rem) !important;
        line-height: 0.95 !important;
    }

    .mobile-today-card-v27 .mobile-today-head p {
        margin-top: 4px !important;
        font-size: 0.91rem !important;
    }

    .mobile-location-detect {
        gap: 8px !important;
        margin: 9px 0 !important;
        padding: 9px 10px !important;
        border-color: rgba(39, 76, 46, 0.1) !important;
        background: rgba(255, 255, 255, 0.68) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76) !important;
    }

    .mobile-location-detect strong {
        color: #172017 !important;
        font-size: 0.9rem !important;
    }

    .mobile-location-detect small {
        display: none !important;
    }

    .mobile-location-detect .db-btn-main {
        min-height: 42px !important;
        min-width: 84px !important;
        padding: 9px 12px !important;
        border-radius: 14px !important;
    }

    .mobile-today-card-v27 .mobile-today-grid {
        gap: 6px !important;
        margin-top: 9px !important;
    }

    .mobile-today-card-v27 .mobile-metric-card,
    .mobile-today-card-v27 .mobile-metric-card:nth-child(3) {
        min-height: 55px !important;
        padding: 8px 7px !important;
        border-color: rgba(37, 65, 42, 0.09) !important;
        background: rgba(255, 255, 255, 0.76) !important;
    }

    .mobile-today-card-v27 .mobile-metric-card strong {
        font-size: 1.18rem !important;
        margin-bottom: 2px !important;
    }

    .mobile-today-card-v27 .mobile-metric-card span {
        font-size: 0.68rem !important;
        line-height: 1.1 !important;
    }

    .mobile-quick-grid {
        gap: 7px !important;
        margin: 10px 0 17px !important;
    }

    .mobile-quick-grid .mobile-action,
    .mobile-quick-grid .mobile-action-primary {
        min-height: 50px !important;
        padding: 8px 6px !important;
        border-radius: 16px !important;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.11) !important;
    }

    .mobile-quick-grid .mobile-action {
        color: #142016 !important;
        border-color: rgba(37, 65, 42, 0.12) !important;
        background: rgba(255, 255, 255, 0.93) !important;
    }

    :root[data-theme="dark"] .mobile-quick-grid .mobile-action {
        color: #142016 !important;
        background: rgba(255, 255, 255, 0.93) !important;
    }

    .mobile-quick-grid .mobile-action-primary {
        color: #1f1606 !important;
        background: linear-gradient(135deg, #ffe68a, #f4a621) !important;
    }

    .mobile-hive-rail-v27 {
        padding-bottom: calc(88px + env(safe-area-inset-bottom)) !important;
    }

    .mobile-hive-card {
        min-height: 144px !important;
        padding: 13px 14px !important;
        border-radius: 20px !important;
    }

    .mobile-hive-card p {
        min-height: 0 !important;
        margin-bottom: 8px !important;
        font-size: 0.82rem !important;
        line-height: 1.25 !important;
    }

    .mobile-hive-card .workflow-chip-row {
        gap: 5px !important;
        margin-bottom: 8px !important;
    }

    .mobile-hive-card .db-badge {
        padding: 5px 8px !important;
        font-size: 0.68rem !important;
    }

    .mobile-hive-card small {
        font-size: 0.72rem !important;
        line-height: 1.15 !important;
    }

    .mobile-hive-top {
        margin-bottom: 8px !important;
    }

    .mobile-hive-top strong {
        font-size: 1.08rem !important;
    }

    .mobile-hive-top span {
        padding: 5px 8px !important;
        font-size: 0.66rem !important;
    }

    .mobile-section-head {
        margin-top: 10px !important;
        margin-bottom: 8px !important;
    }

    .bottom-nav {
        bottom: calc(7px + env(safe-area-inset-bottom)) !important;
        height: 56px !important;
        border-radius: 20px !important;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.44)),
            rgba(246, 250, 247, 0.72) !important;
        box-shadow:
            0 16px 36px rgba(13, 27, 16, 0.22),
            inset 0 1px 0 rgba(255, 255, 255, 0.74) !important;
    }
}

@media (max-width: 430px) {
    .mobile-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media print {
    nav,
    .bottom-nav,
    .mobile-app-home,
    .db-hero,
    .workflow-tag-workbench,
    .tag-assistant-v27,
    #tag-liste > .db-panel-head,
    .workflow-tag-grid,
    .offline-status {
        display: none !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
    }

    .container {
        padding: 0 !important;
        max-width: none !important;
    }

    .db-panel {
        border: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .tag-label-sheet {
        display: grid !important;
        grid-template-columns: repeat(3, 58mm);
        gap: 6mm;
    }

    .tag-print-label {
        break-inside: avoid;
        display: grid;
        gap: 2mm;
        padding: 4mm;
        border: 1px solid #111;
        border-radius: 3mm;
        color: #111;
        font-family: Inter, Arial, sans-serif;
    }

    .tag-print-label strong {
        font-size: 13pt;
    }

    .tag-print-label span,
    .tag-print-label small {
        font-size: 7pt;
    }

    .tag-print-label img {
        width: 28mm;
        height: 28mm;
    }
}

/* v28 - mobile nav rescue: readable app tabbar, no milky overlay */
@media (min-width: 768px) {
    .bottom-nav {
        display: none !important;
    }

    body {
        padding-bottom: 0 !important;
    }
}

@media (max-width: 767px) {
    body {
        padding-bottom: calc(132px + env(safe-area-inset-bottom)) !important;
    }

    .container,
    .mobile-app-home,
    .mobile-home-v27,
    .visit-form {
        padding-bottom: calc(158px + env(safe-area-inset-bottom)) !important;
    }

    .mobile-hive-rail,
    .mobile-hive-rail-v27 {
        margin-bottom: calc(112px + env(safe-area-inset-bottom)) !important;
        padding-bottom: 18px !important;
    }

    .bottom-nav {
        display: grid !important;
        position: fixed !important;
        z-index: 5000 !important;
        left: max(10px, env(safe-area-inset-left)) !important;
        right: auto !important;
        bottom: calc(12px + env(safe-area-inset-bottom)) !important;
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        height: 68px !important;
        padding: 6px !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 3px !important;
        align-items: center !important;
        overflow: visible !important;
        border-radius: 24px !important;
        border: 1px solid rgba(21, 42, 27, 0.12) !important;
        background: #f7fbf4 !important;
        box-shadow:
            0 18px 38px rgba(3, 13, 7, 0.28),
            0 0 0 1px rgba(255, 255, 255, 0.8),
            inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        isolation: isolate !important;
    }

    :root[data-theme="dark"] .bottom-nav {
        border-color: rgba(21, 42, 27, 0.12) !important;
        background: #f7fbf4 !important;
        box-shadow:
            0 18px 42px rgba(0, 0, 0, 0.42),
            0 0 0 1px rgba(255, 255, 255, 0.76),
            inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
    }

    .bottom-nav::before,
    .bottom-nav::after {
        display: none !important;
    }

    .bottom-nav a,
    .bottom-nav button,
    :root[data-theme="dark"] .bottom-nav a,
    :root[data-theme="dark"] .bottom-nav button {
        height: 56px !important;
        min-height: 56px !important;
        min-width: 0 !important;
        padding: 5px 2px 4px !important;
        border: 0 !important;
        border-radius: 18px !important;
        color: #162117 !important;
        background: transparent !important;
        box-shadow: none !important;
        opacity: 1 !important;
        text-shadow: none !important;
        font-size: 0.65rem !important;
        line-height: 1 !important;
        font-weight: 900 !important;
        letter-spacing: 0 !important;
        white-space: nowrap !important;
        transform: none !important;
        text-decoration: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 3px !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }

    .bottom-nav a .icon,
    .bottom-nav button .icon,
    :root[data-theme="dark"] .bottom-nav a .icon,
    :root[data-theme="dark"] .bottom-nav button .icon {
        width: 27px !important;
        height: 27px !important;
        min-width: 27px !important;
        min-height: 27px !important;
        margin: 0 !important;
        border-radius: 12px !important;
        color: #17311f !important;
        background: #e6efe6 !important;
        border: 1px solid rgba(25, 54, 31, 0.1) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
        display: grid !important;
        place-items: center !important;
    }

    .bottom-nav .icon svg {
        width: 17px !important;
        height: 17px !important;
        stroke: currentColor !important;
        stroke-width: 2.35 !important;
        stroke-linecap: round !important;
        stroke-linejoin: round !important;
        fill: none !important;
        opacity: 1 !important;
    }

    .bottom-nav a.active:not(:nth-child(3)),
    .bottom-nav button.active,
    :root[data-theme="dark"] .bottom-nav a.active:not(:nth-child(3)),
    :root[data-theme="dark"] .bottom-nav button.active {
        color: #0b5a2c !important;
        background: #e6f7e8 !important;
        box-shadow: inset 0 0 0 1px rgba(12, 116, 54, 0.12) !important;
    }

    .bottom-nav a.active:not(:nth-child(3)) .icon,
    .bottom-nav button.active .icon,
    :root[data-theme="dark"] .bottom-nav a.active:not(:nth-child(3)) .icon,
    :root[data-theme="dark"] .bottom-nav button.active .icon {
        color: #ffffff !important;
        background: linear-gradient(145deg, #2fbd63, #087537) !important;
        border-color: rgba(8, 117, 55, 0.2) !important;
        box-shadow: 0 7px 14px rgba(8, 117, 55, 0.2) !important;
    }

    .bottom-nav a:nth-child(3),
    .bottom-nav a:nth-child(3).active,
    :root[data-theme="dark"] .bottom-nav a:nth-child(3),
    :root[data-theme="dark"] .bottom-nav a:nth-child(3).active {
        color: #2b1a03 !important;
        background: #fff2c6 !important;
        transform: none !important;
        box-shadow: inset 0 0 0 1px rgba(194, 124, 18, 0.12) !important;
    }

    .bottom-nav a:nth-child(3) .icon,
    .bottom-nav a:nth-child(3).active .icon,
    :root[data-theme="dark"] .bottom-nav a:nth-child(3) .icon,
    :root[data-theme="dark"] .bottom-nav a:nth-child(3).active .icon {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
        color: #251603 !important;
        border-radius: 15px !important;
        border-color: rgba(194, 124, 18, 0.18) !important;
        background:
            radial-gradient(circle at 34% 24%, #fff7ce, transparent 34%),
            linear-gradient(145deg, #ffe270, #f3aa25 68%, #cf8015) !important;
        box-shadow:
            0 9px 18px rgba(212, 135, 22, 0.28),
            inset 0 1px 0 rgba(255, 255, 255, 0.74) !important;
    }

    .bottom-nav a:nth-child(3) .icon svg {
        width: 21px !important;
        height: 21px !important;
        stroke-width: 2.65 !important;
    }

    .bottom-nav a:active,
    .bottom-nav button:active,
    .bottom-nav a:nth-child(3):active {
        transform: scale(0.97) !important;
    }

    body.mobile-menu-open .nav-links {
        top: auto !important;
        bottom: calc(92px + env(safe-area-inset-bottom)) !important;
        left: 12px !important;
        right: 12px !important;
        max-height: calc(100dvh - 128px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
        padding: 16px !important;
        overflow-y: auto !important;
        color: #162117 !important;
        border-radius: 26px !important;
        border: 1px solid rgba(21, 42, 27, 0.12) !important;
        background: #fbfef8 !important;
        box-shadow:
            0 24px 70px rgba(3, 13, 7, 0.34),
            inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }

    body.mobile-menu-open .nav-links a,
    body.mobile-menu-open .nav-links button,
    body.mobile-menu-open .mobile-menu-group-title {
        color: #162117 !important;
        opacity: 1 !important;
    }

    body.mobile-menu-open .bottom-nav {
        display: none !important;
    }

    .visit-sticky-actions {
        bottom: calc(94px + env(safe-area-inset-bottom)) !important;
    }
}

@media (max-width: 390px) {
    .bottom-nav a,
    .bottom-nav button,
    :root[data-theme="dark"] .bottom-nav a,
    :root[data-theme="dark"] .bottom-nav button {
        font-size: 0.6rem !important;
    }
}

/* v28.1 - prevent first hive card from sitting under the app tabbar */
@media (max-width: 767px) {
    .bottom-nav {
        bottom: calc(8px + env(safe-area-inset-bottom)) !important;
        height: 60px !important;
        padding: 4px !important;
        border-radius: 22px !important;
    }

    .bottom-nav a,
    .bottom-nav button,
    :root[data-theme="dark"] .bottom-nav a,
    :root[data-theme="dark"] .bottom-nav button {
        height: 52px !important;
        min-height: 52px !important;
        padding: 4px 2px 3px !important;
        border-radius: 16px !important;
        font-size: 0.62rem !important;
        gap: 2px !important;
    }

    .bottom-nav a .icon,
    .bottom-nav button .icon,
    :root[data-theme="dark"] .bottom-nav a .icon,
    :root[data-theme="dark"] .bottom-nav button .icon {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
        border-radius: 10px !important;
    }

    .bottom-nav .icon svg {
        width: 15px !important;
        height: 15px !important;
    }

    .bottom-nav a:nth-child(3) .icon,
    .bottom-nav a:nth-child(3).active .icon,
    :root[data-theme="dark"] .bottom-nav a:nth-child(3) .icon,
    :root[data-theme="dark"] .bottom-nav a:nth-child(3).active .icon {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
        border-radius: 13px !important;
    }

    .bottom-nav a:nth-child(3) .icon svg {
        width: 19px !important;
        height: 19px !important;
    }

    .mobile-hive-card {
        min-height: 128px !important;
        padding: 10px 12px !important;
    }

    .mobile-hive-top {
        margin-bottom: 6px !important;
    }

    .mobile-hive-card p {
        margin-bottom: 6px !important;
        font-size: 0.78rem !important;
    }

    .mobile-hive-card .workflow-chip-row {
        margin-bottom: 6px !important;
    }

    .mobile-hive-card .db-badge {
        padding: 4px 7px !important;
        font-size: 0.64rem !important;
    }

    .mobile-hive-card small {
        font-size: 0.68rem !important;
    }

    body.mobile-menu-open .nav-links {
        bottom: calc(78px + env(safe-area-inset-bottom)) !important;
    }
}

@media (max-width: 390px) {
    .bottom-nav a,
    .bottom-nav button,
    :root[data-theme="dark"] .bottom-nav a,
    :root[data-theme="dark"] .bottom-nav button {
        font-size: 0.58rem !important;
    }
}

/* v28.2 - real Leaflet map in desktop cockpit */
.cockpit-leaflet-map {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04) !important;
}

.cockpit-leaflet-map .leaflet-container,
.cockpit-leaflet-map.leaflet-container {
    width: 100%;
    min-height: 190px;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.04);
    font-family: Inter, system-ui, sans-serif;
}

.cockpit-leaflet-map .leaflet-pane,
.cockpit-leaflet-map .leaflet-tile,
.cockpit-leaflet-map .leaflet-marker-icon,
.cockpit-leaflet-map .leaflet-marker-shadow,
.cockpit-leaflet-map .leaflet-tile-pane,
.cockpit-leaflet-map .leaflet-overlay-pane,
.cockpit-leaflet-map .leaflet-shadow-pane,
.cockpit-leaflet-map .leaflet-marker-pane,
.cockpit-leaflet-map .leaflet-tooltip-pane,
.cockpit-leaflet-map .leaflet-popup-pane {
    border-radius: inherit;
}

.cockpit-map-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 2;
    color: var(--text-secondary);
    font-weight: 900;
    text-align: center;
    padding: 18px;
    background:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
        rgba(255,255,255,0.035);
    background-size: 34px 34px, 34px 34px, auto;
}

.cockpit-leaflet-map:not(.is-empty) .cockpit-map-empty {
    display: none;
}

.cockpit-leaflet-map .leaflet-tooltip {
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(8, 16, 13, 0.92);
    color: #fff;
    box-shadow: var(--shadow-sm);
    font-weight: 800;
}

/* v28.3 - locations page: stop sticky create panel from covering cards */
.location-main-v27 .workflow-location-create {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
}

.location-coord-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.location-detail-stack {
    gap: 20px;
    align-items: start;
}

.location-detail-card-v27 {
    display: grid;
    gap: 16px;
    overflow: hidden;
}

.location-detail-card-v27 > * {
    min-width: 0;
}

.location-detail-card-v27 .workflow-card-head,
.location-detail-card-v27 .workflow-location-stats,
.location-detail-card-v27 .workflow-location-meta,
.location-detail-card-v27 .workflow-location-list,
.location-detail-card-v27 .location-batch-form,
.location-detail-card-v27 .db-inline-form {
    position: relative;
    z-index: 0;
}

.location-detail-card-v27 .workflow-location-stats {
    margin-top: 2px;
}

.location-detail-card-v27 .workflow-location-meta {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.location-detail-card-v27 .workflow-location-list {
    margin-top: -6px;
}

.location-batch-form {
    margin-top: 4px;
    padding-top: 16px;
}

.location-batch-grid .checkbox-item {
    min-height: 62px;
    align-items: center;
}

.location-detail-card-v27 .workflow-card-actions {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) repeat(2, minmax(120px, 0.55fr));
    gap: 8px;
}

.location-detail-card-v27 .workflow-card-actions .db-btn-main,
.location-detail-card-v27 .workflow-card-actions .db-btn-ghost {
    width: 100%;
}

.location-detail-card-v27 .db-inline-form {
    margin-top: -4px;
}

@media (max-width: 980px) {
    .location-coord-row {
        grid-template-columns: 1fr;
    }

    .location-detail-card-v27 .workflow-card-actions {
        grid-template-columns: 1fr;
    }
}

/* v28.4 - keep the mobile app sheet anchored to the viewport after scrolling */
@media (max-width: 767px) {
    body.mobile-menu-open #main-nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 2300 !important;
    }

    body.mobile-menu-open .nav-links {
        position: fixed !important;
        top: calc(76px + env(safe-area-inset-top)) !important;
        bottom: auto !important;
        left: 12px !important;
        right: 12px !important;
        z-index: 2310 !important;
        max-height: calc(100dvh - 104px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
        overflow-y: auto !important;
    }
}

/* v29 - Beuten cockpit polish */
.beuten-hero-v29 {
    min-height: auto;
    margin-bottom: 20px;
}

.beuten-hero-v29 .db-hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    align-items: center;
    gap: 28px;
}

.beuten-hero-v29 .db-title {
    font-size: clamp(3rem, 6vw, 5.4rem);
}

.beuten-hero-v29 .db-subtitle {
    max-width: 620px;
}

.beuten-hero-card-v29 {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 16px;
    padding: 20px;
    border-radius: 28px;
    border: 1px solid rgba(244, 183, 63, 0.24);
    background:
        radial-gradient(circle at 88% 10%, rgba(244, 183, 63, 0.24), transparent 34%),
        radial-gradient(circle at 8% 100%, rgba(74, 222, 128, 0.14), transparent 42%),
        rgba(255, 255, 255, 0.055);
    box-shadow: var(--shadow-sm);
}

.beuten-hero-card-v29 > span,
.beuten-hero-focus-v29 span {
    color: var(--amber-400);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.beuten-hero-card-v29 > strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.15rem;
    line-height: 1;
    color: var(--text);
}

.beuten-hero-metrics-v29 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.beuten-hero-metrics-v29 div {
    display: grid;
    gap: 4px;
    min-height: 72px;
    padding: 12px 10px;
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.045);
}

.beuten-hero-metrics-v29 b {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.45rem;
    line-height: 1;
    color: var(--amber-400);
}

.beuten-hero-metrics-v29 small,
.beuten-hero-focus-v29 small {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
}

.beuten-hero-focus-v29 {
    display: grid;
    gap: 5px;
    padding: 14px 15px;
    color: var(--text);
    text-decoration: none;
    border-radius: 20px;
    border: 1px solid rgba(244, 183, 63, 0.22);
    background: rgba(244, 183, 63, 0.09);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.beuten-hero-focus-v29:hover {
    transform: translateY(-1px);
    border-color: rgba(244, 183, 63, 0.42);
}

.beuten-hero-focus-v29 strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    line-height: 1.05;
}

.beuten-workbench-v27 {
    padding: 22px;
}

.beuten-workbench-v27 > .db-panel-head {
    align-items: flex-end;
    margin-bottom: 16px;
}

.beuten-workbench-summary-v29 {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.beuten-workbench-summary-v29 span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 850;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
}

.beuten-toolbar-v29 {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 10px;
    border-radius: 22px;
    border: 1px solid var(--glass-border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent),
        rgba(255, 255, 255, 0.035);
}

.beuten-filterbar-v29 {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(190px, 0.42fr) minmax(170px, 0.32fr);
    gap: 10px;
}

.beuten-filterbar-v29 .form-input {
    width: 100%;
    min-width: 0;
}

.beuten-workbench-v27 .workflow-split {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.42fr);
    gap: 18px;
}

.beuten-workbench-v27 .workflow-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px;
}

.beuten-card-v29 {
    position: relative;
    min-height: 244px;
    padding: 17px;
    border-radius: 24px;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.07), transparent 46%),
        radial-gradient(circle at 94% 12%, rgba(244, 183, 63, 0.09), transparent 32%),
        var(--bg-card);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.beuten-card-v29::before {
    content: "";
    position: absolute;
    inset: 12px auto 12px 0;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--amber-400), rgba(74, 222, 128, 0.62));
    opacity: 0;
    transition: opacity 0.18s ease;
}

.beuten-card-v29.is-active,
.beuten-card-v29:hover,
.beuten-card-v29:focus-within {
    border-color: rgba(244, 183, 63, 0.38);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.beuten-card-v29.is-active::before,
.beuten-card-v29:hover::before,
.beuten-card-v29:focus-within::before {
    opacity: 1;
}

.beuten-card-v29 .workflow-card-main {
    gap: 11px;
}

.beuten-card-v29 .workflow-card-head h3 {
    font-size: 1.35rem;
}

.beuten-card-signal-v29 {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.5fr;
    gap: 6px;
    height: 8px;
}

.beuten-card-signal-v29 span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.beuten-card-signal-v29 .workflow-status-red {
    background: linear-gradient(90deg, var(--red-400), rgba(248, 113, 113, 0.35));
}

.beuten-card-signal-v29 .workflow-status-yellow {
    background: linear-gradient(90deg, var(--amber-400), rgba(251, 191, 36, 0.28));
}

.beuten-card-signal-v29 .workflow-status-green {
    background: linear-gradient(90deg, var(--green-400), rgba(74, 222, 128, 0.26));
}

.beuten-card-signal-v29 .workflow-status-blue {
    background: linear-gradient(90deg, var(--blue-400), rgba(96, 165, 250, 0.28));
}

.beuten-workbench-v27 .workflow-preview {
    display: grid;
    gap: 15px;
    padding: 20px;
    border-radius: 24px;
    border-color: rgba(244, 183, 63, 0.24);
    background:
        radial-gradient(circle at 92% 0%, rgba(244, 183, 63, 0.16), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 58%),
        var(--bg-card);
}

.beuten-workbench-v27 .workflow-preview .db-h2 {
    margin: 0;
}

.beuten-preview-reason-v29 {
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.4;
}

.beuten-preview-grid-v29 {
    grid-template-columns: 1fr;
    gap: 10px;
}

.beuten-preview-grid-v29 div {
    padding: 12px 13px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
}

.beuten-workbench-v27 .db-action-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.beuten-mobile-metrics-v29 {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 13px;
}

.beuten-mobile-metrics-v29 span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #172017;
    font-size: 0.74rem;
    font-weight: 900;
    border: 1px solid rgba(33, 68, 39, 0.1);
    background: rgba(255, 255, 255, 0.68);
}

@media (max-width: 1180px) {
    .beuten-hero-v29 .db-hero-content,
    .beuten-workbench-v27 .workflow-split {
        grid-template-columns: 1fr;
    }

    .beuten-workbench-v27 .workflow-preview {
        position: static;
    }
}

@media (max-width: 860px) {
    .mobile-app-home:has(+ .beuten-workbench-v27) {
        margin-bottom: 10px !important;
        padding-bottom: 0 !important;
    }

    .mobile-app-home:has(+ .beuten-workbench-v27) .mobile-quick-actions {
        margin-bottom: 12px !important;
    }

    .mobile-app-home:has(+ .beuten-workbench-v27) + .beuten-workbench-v27 {
        margin-top: 0 !important;
    }

    .beuten-workbench-v27 {
        padding: 14px;
        border-radius: 24px;
    }

    .beuten-workbench-v27 > .db-panel-head {
        align-items: flex-start;
    }

    .beuten-toolbar-v29 {
        grid-template-columns: 1fr;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .beuten-filterbar-v29 {
        grid-template-columns: 1fr;
    }

    .beuten-workbench-v27 .workflow-card-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .beuten-card-v29 {
        min-height: 0;
        padding: 14px;
        border-radius: 22px;
    }

    .beuten-card-v29 .workflow-card-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .beuten-card-v29 .workflow-card-actions .db-btn-ghost:last-child {
        grid-column: 1 / -1;
    }
}

/* v30 - nav IA + faster control workflow */
.quick-progress-v30 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: -4px 0 18px;
}

.quick-progress-step-v30 {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 10px;
    align-items: center;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
        var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.quick-progress-step-v30 span {
    display: grid;
    place-items: center;
    grid-row: span 2;
    width: 34px;
    height: 34px;
    border-radius: 13px;
    color: #251603;
    font-size: 0.86rem;
    font-weight: 950;
    background: linear-gradient(145deg, #ffe270, #f3aa25);
    box-shadow: 0 10px 20px rgba(223, 147, 34, 0.18);
}

.quick-progress-step-v30 strong,
.quick-progress-step-v30 small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-progress-step-v30 strong {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 950;
}

.quick-progress-step-v30 small {
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 800;
}

.quick-progress-step-v30.is-active {
    border-color: rgba(244, 183, 63, 0.36);
    background:
        linear-gradient(145deg, rgba(244, 183, 63, 0.16), rgba(34, 197, 94, 0.06)),
        var(--bg-card);
}

.quick-control-form {
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(330px, 0.72fr);
    gap: 16px;
    align-items: start;
}

.quick-control-form > input[type="hidden"] {
    display: none;
}

.quick-pick-panel-v30,
.quick-notes-panel-v30,
.quick-control-form .visit-sticky-actions {
    grid-column: 1 / -1;
}

.quick-status-panel-v30 {
    grid-column: 1;
    grid-row: span 2;
}

.quick-meta-panel-v30,
.quick-alert-panel-v30 {
    grid-column: 2;
}

.quick-pick-panel-v30 {
    border-color: rgba(244, 183, 63, 0.2);
}

.quick-pick-panel-v30 .quick-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quick-pick-panel-v30 .quick-btn,
.quick-status-panel-v30 .control-choice span {
    min-height: 60px;
    border-radius: 18px;
}

.quick-pick-panel-v30 .quick-btn {
    justify-content: center;
    white-space: normal;
    line-height: 1.08;
}

.quick-pick-panel-v30 .quick-btn.active {
    color: #211706;
    border-color: rgba(244, 183, 63, 0.46);
    background: linear-gradient(135deg, #ffe27a, var(--amber-500));
    box-shadow: 0 14px 28px rgba(223, 147, 34, 0.18);
}

.quick-status-panel-v30 {
    background:
        radial-gradient(circle at 96% 12%, rgba(244, 183, 63, 0.14), transparent 30%),
        var(--bg-card);
}

.quick-status-panel-v30 .quick-control-group {
    padding: 12px;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.035);
}

.quick-status-panel-v30 .control-choice-grid {
    gap: 10px;
}

.quick-meta-panel-v30 .gps-btn {
    width: 100%;
    min-height: 52px;
}

.quick-alert-panel-v30 .checkbox-group {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.quick-notes-panel-v30 {
    background:
        linear-gradient(145deg, rgba(59, 130, 246, 0.055), transparent 45%),
        var(--bg-card);
}

.quick-notes-panel-v30 textarea {
    min-height: 150px;
}

@media (max-width: 1120px) {
    .quick-control-form {
        grid-template-columns: 1fr;
    }

    .quick-status-panel-v30,
    .quick-meta-panel-v30,
    .quick-alert-panel-v30 {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .quick-control-hero {
        margin-bottom: 12px;
    }

    .quick-progress-v30 {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding: 0 2px 8px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .quick-progress-step-v30 {
        flex: 0 0 168px;
        scroll-snap-align: start;
        padding: 10px 12px;
        border-radius: 18px;
    }

    .quick-control-form {
        display: block;
    }

    .quick-control-form .db-panel {
        margin-bottom: 12px;
        border-radius: 22px;
        padding: 14px;
    }

    .quick-pick-panel-v30 .quick-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .quick-pick-panel-v30 .quick-btn,
    .quick-status-panel-v30 .control-choice span {
        min-height: 54px;
    }

    .quick-status-panel-v30 .quick-control-group {
        padding: 10px;
        border-radius: 18px;
    }

    .quick-meta-panel-v30 .form-row {
        grid-template-columns: 1fr;
    }

    .quick-notes-panel-v30 textarea {
        min-height: 130px;
    }

    .quick-control-form .visit-sticky-actions {
        position: sticky !important;
        left: auto !important;
        right: auto !important;
        bottom: calc(74px + env(safe-area-inset-bottom)) !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 12px 0 0 !important;
        z-index: 950 !important;
    }
}

@media (max-width: 390px) {
    .quick-pick-panel-v30 .quick-grid {
        grid-template-columns: 1fr;
    }
}
