/* ================================================================
   RenovixPRO v2.0 — Glassmorphism Dark Theme (Mobile-First)
   ================================================================ */

/* === RESET & BASE === */
body {
    font-family: 'Inter', sans-serif;
    background-color: #05060a;
    color: #f1f5f9;
    position: relative;
    transition: background-color 0.3s, color 0.3s;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* === CSS VARIABLES === */
:root {
    --neon-emerald: #10b981;
    --neon-blue: #3b82f6;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(25px) saturate(180%);
}

/* === AURORA BACKGROUND — subtelna, wolna zorza polarna === */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 150vmax;
    height: 150vmax;
    background-image: conic-gradient(from 0deg,
            transparent 0deg,
            rgba(16, 185, 129, 0.5) 60deg,
            transparent 120deg,
            rgba(59, 130, 246, 0.4) 200deg,
            transparent 280deg,
            rgba(16, 185, 129, 0.3) 340deg,
            transparent 360deg);
    transform: translate(-50%, -50%);
    animation: auroraSpin 90s linear infinite;
    opacity: 0.06;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
}

@keyframes auroraSpin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* === GLASSMORPHISM CARD === */
.glass-card {
    background: rgba(13, 16, 23, 0.82);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}


/* === GLOW BUTTON === */
.btn-glow {
    background: linear-gradient(45deg, var(--neon-emerald), var(--neon-blue));
    position: relative;
    z-index: 1;
    border: none;
    color: white;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: inherit;
    background: linear-gradient(45deg, var(--neon-emerald), var(--neon-blue));
    z-index: -1;
    filter: blur(12px);
    opacity: 0.5;
    transition: opacity 0.3s;
}

.btn-glow:hover::before {
    opacity: 0.8;
}


/* === ACCORDION === */
.accordion-content {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    transition: grid-template-rows 0.3s ease-out;
}

.accordion-content.open {
    grid-template-rows: 1fr;
}

.accordion-inner {
    overflow: hidden;
}

.accordion-content.overflow-visible .accordion-inner {
    overflow: visible !important;
}

.accordion-content.overflow-visible {
    overflow: visible !important;
}

.rotate-icon {
    transition: transform 0.3s;
}

.rotate-icon.open {
    transform: rotate(180deg);
}


/* === GLASS INPUT (Feature 4: High Contrast) === */
.glass-input {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
    transition: all 0.25s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.glass-input:focus {
    border-color: var(--neon-emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2), inset 0 1px 3px rgba(0, 0, 0, 0.3);
    outline: none;
    background: rgba(30, 41, 59, 0.9);
}

.glass-input::placeholder {
    color: #6b7280;
}


/* === CHECKBOX (Glassmorphism Override) === */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    accent-color: var(--neon-emerald);
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: grid;
    place-content: center;
    transition: all 0.2s;
}

.custom-checkbox:checked {
    background-color: var(--neon-emerald);
    border-color: var(--neon-emerald);
}

.custom-checkbox::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.7em;
    color: white;
    transform: scale(0);
    transition: 0.2s transform ease-in-out;
}

.custom-checkbox:checked::before {
    transform: scale(1);
}


/* === TEMPLATE CARDS === */
.tmpl-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tmpl-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
}

.tmpl-card .tmpl-icon {
    transition: transform 0.3s ease;
}

.tmpl-card:hover .tmpl-icon {
    transform: scale(1.15) rotate(-3deg);
}


/* === SMART ISLAND HUB (Mobile-First) === */
.smart-island-hub {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 94%;
    max-width: 450px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.island-nav-inner {
    background: rgba(10, 10, 10, 0.88);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    display: flex;
    justify-content: space-around;
    padding: 10px 5px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

.island-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888c99;
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    width: 65px;
    cursor: pointer;
}

.island-item i {
    font-size: 20px;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.island-item:hover {
    color: #ffffff;
}

.island-item:hover i {
    transform: translateY(-2px);
}

/* Active / Glow state */
.island-item.active {
    color: #fff;
    background: linear-gradient(45deg, var(--neon-emerald), var(--neon-blue));
    border-radius: 16px;
    padding: 5px 0;
    margin: -5px 0;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.island-item.active i {
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Pulsating Generuj button */
@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.4), 0 0 20px rgba(59, 130, 246, 0.2);
    }

    50% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.7), 0 0 40px rgba(59, 130, 246, 0.4);
    }
}

.island-item.pulse-glow {
    color: #fff;
    background: linear-gradient(135deg, var(--neon-emerald), var(--neon-blue));
    border-radius: 16px;
    padding: 5px 0;
    margin: -5px 0;
    animation: pulseGlow 2s ease-in-out infinite;
}

.island-item.pulse-glow i {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* === AI GLOW BUTTON — Animated Border Gradient === */
@keyframes aiGlowSpin {
    0% { --angle: 0deg; }
    100% { --angle: 360deg; }
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.ai-glow-btn {
    position: relative;
    background: rgba(168, 85, 247, 0.12);
    border: none;
    border-radius: 12px;
    overflow: visible;
    z-index: 1;
    isolation: isolate;
}

.ai-glow-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    background: conic-gradient(
        from var(--angle),
        #a855f7,
        #6366f1,
        #ec4899,
        #f59e0b,
        #10b981,
        #3b82f6,
        #a855f7
    );
    z-index: -2;
    animation: aiGlowSpin 3s linear infinite;
}

.ai-glow-btn::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 11px;
    background: rgba(13, 16, 23, 0.92);
    z-index: -1;
}

.ai-glow-btn:hover::before {
    filter: blur(4px);
    inset: -3px;
}

/* AI Island Button (Mobile Nav) */
.island-item.ai-island-btn {
    color: #c084fc;
    position: relative;
    border-radius: 16px;
    padding: 5px 0;
    margin: -5px 0;
    overflow: visible;
    isolation: isolate;
    z-index: 1;
}

.island-item.ai-island-btn::before {
    content: '';
    position: absolute;
    inset: -1.5px;
    border-radius: 18px;
    background: conic-gradient(
        from var(--angle),
        #a855f7,
        #6366f1,
        #ec4899,
        #f59e0b,
        #10b981,
        #3b82f6,
        #a855f7
    );
    z-index: -2;
    animation: aiGlowSpin 3s linear infinite;
    opacity: 0.8;
}

.island-item.ai-island-btn::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 16px;
    background: rgba(10, 10, 10, 0.92);
    z-index: -1;
}

.island-item.ai-island-btn i {
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
}

/* Hide island on desktop */
@media (min-width: 1024px) {
    .smart-island-hub {
        display: none;
    }
}


/* === TOGGLE SWITCH === */
.toggle-switch {
    width: 44px;
    height: 24px;
    border-radius: 999px;
    position: relative;
    transition: background-color 0.3s;
    cursor: pointer;
}

.bg-toggle-off {
    background-color: rgba(255, 255, 255, 0.1);
}

.toggle-knob {
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.toggle-switch {
    background-color: var(--neon-emerald);
}

input:checked+.toggle-switch .toggle-knob {
    transform: translateX(20px);
}


/* === SCROLLBAR === */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}


/* === HELP LEGEND (Settings Modal) === */
.help-legend {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 16px;
    padding: 16px;
}

.help-legend .legend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
}

.help-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #9ca3af;
}

.help-legend .legend-item code {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 2px 8px;
    font-weight: 700;
    color: #e5e7eb;
    font-family: monospace;
    font-size: 11px;
    white-space: nowrap;
}


/* === MODALS === */
.modal {
    transition: opacity 0.3s ease, visibility 0.3s;
}

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

.visible-modal {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.add-form-anim {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* === READONLY MODE === */
.readonly-mode input,
.readonly-mode textarea,
.readonly-mode .custom-checkbox {
    pointer-events: none;
    opacity: 0.7;
}

.readonly-mode #add-btn-wrapper,
.readonly-mode .add-service-trigger {
    display: none !important;
}


/* === TOOLTIPS === */
.tooltip-container {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip-box {
    pointer-events: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    width: 140px;
    background: #1e293b;
    color: white;
    text-align: center;
    padding: 6px;
    border-radius: 6px;
    font-size: 10px;
    line-height: 1.2;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 9999;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3);
}

.tooltip-box::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}

.tooltip-container:hover .tooltip-box {
    opacity: 1;
}


/* === COLOR PICKER === */
input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

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

input[type="color"]::-webkit-color-swatch {
    border: none;
}


/* ================================================================
   FEATURE 1: STEPPER +/− (Mobile-First Big Touch Targets)
   ================================================================ */
.stepper-group {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    overflow: hidden;
    gap: 0;
}

.stepper-btn {
    width: 44px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.stepper-btn:active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: scale(0.92);
}

.stepper-btn-plus:active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--neon-emerald);
}

.stepper-input {
    width: 48px;
    height: 40px;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 800;
    text-align: center;
    font-size: 15px;
    outline: none;
    -moz-appearance: textfield;
}

.stepper-input:focus {
    background: rgba(16, 185, 129, 0.08);
}

.stepper-unit {
    padding: 0 10px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    min-width: 36px;
    text-align: center;
}


/* ================================================================
   FEATURE 2: COLOR-CODED PRICE TAGS  Rob. / Mat.
   ================================================================ */
.price-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Inter', monospace;
    border: 1px solid;
    line-height: 1.4;
}

.tag i {
    font-size: 9px;
    opacity: 0.7;
}

/* Robocizna — Blue */
.tag-labor {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
}

/* Materiał — Amber/Orange */
.tag-material {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.25);
    color: #fcd34d;
}

/* === INLINE EDITABLE TAGS === */
.tag-editable {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.tag-editable:hover {
    transform: scale(1.08);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
    filter: brightness(1.2);
}

.tag-editable:hover::after {
    content: '✎';
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    line-height: 1;
}

.tag-editing {
    transform: scale(1.05);
    padding: 2px 4px;
    min-width: 90px;
}

.tag-editing:hover {
    transform: scale(1.05);
}

.tag-editing:hover::after {
    display: none;
}

.tag-inline-input {
    width: 56px;
    height: 22px;
    border: 1px solid;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    outline: none;
    font-family: 'Inter', monospace;
    -moz-appearance: textfield;
    padding: 0 2px;
}

.tag-inline-input::-webkit-outer-spin-button,
.tag-inline-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tag-inline-input:focus {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.tag-edit-hint {
    font-size: 9px;
    opacity: 0.6;
    font-weight: 700;
    margin-left: 1px;
}

.tag-edit-label {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 4px;
}

.tag-edit-confirm {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
}

.tag-edit-confirm i {
    font-size: 10px;
}

.tag-edit-confirm:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* Success pulse after saving */
@keyframes tagSavedPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    }
    50% {
        box-shadow: 0 0 12px 4px rgba(16, 185, 129, 0.3);
        transform: scale(1.12);
    }
    100% {
        box-shadow: 0 0 0 0 transparent;
        transform: scale(1);
    }
}

.tag-saved {
    animation: tagSavedPulse 0.6s ease-out;
    border-color: rgba(16, 185, 129, 0.5) !important;
}


/* ================================================================
   FEATURE 3: VAT MODULE — Pill Toggle
   ================================================================ */
.vat-toggle {
    display: flex;
    gap: 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 3px;
    overflow: hidden;
}

.vat-pill {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.25s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    border: none;
    background: transparent;
}

.vat-pill:hover {
    color: #94a3b8;
}

.vat-pill.active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--neon-emerald);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.vat-info {
    font-size: 11px;
    color: #64748b;
    text-align: right;
    margin-top: 6px;
    font-weight: 600;
    font-family: monospace;
    transition: opacity 0.3s;
}

.vat-info span {
    color: #94a3b8;
}


/* ================================================================
   FEATURE 5: PROGRESS BAR — Completion Gauge
   ================================================================ */
.progress-strip-wrap {
    padding: 0 4px;
    margin-bottom: 12px;
}

.progress-strip {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 99px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--neon-emerald), var(--neon-blue));
    border-radius: 99px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.progress-label {
    font-size: 10px;
    color: #4b5563;
    text-align: right;
    margin-top: 4px;
    font-weight: 600;
    font-family: monospace;
    transition: color 0.3s;
}

.progress-label.complete {
    color: var(--neon-emerald);
}


/* ================================================================
   PRINT STYLES
   ================================================================ */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white;
        color: black;
        padding: 0;
        margin: 0;
    }

    body::before {
        display: none;
    }

    .print-break {
        page-break-inside: avoid;
    }

    .print-visible {
        display: block !important;
    }

    input::placeholder {
        color: transparent;
    }

    input,
    textarea {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        resize: none;
    }

    .border {
        border: none !important;
    }

    .border-b,
    .border-t {
        border-color: #e2e8f0 !important;
        border-style: solid !important;
    }

    .watermark-footer {
        position: fixed;
        bottom: 0;
        width: 100%;
        text-align: center;
        font-size: 10px;
        color: #94a3b8;
        padding: 10px;
        border-top: 1px solid #e2e8f0;
    }

    .is-premium .watermark-footer {
        display: none;
    }

    .stepper-btn {
        display: none;
    }

    .stepper-unit {
        border: none;
    }

    .stepper-input {
        border: none;
        text-align: left;
    }

    .stepper-group {
        background: transparent;
        border: none;
    }

    .progress-strip-wrap {
        display: none;
    }

    .vat-toggle {
        display: none;
    }
}

/* ================================================================
   SHARED COMPONENTS (used by app.php AND dashboard.php)
   ================================================================ */

/* === SMART ISLAND HUB (Mobile Bottom Nav) === */
.smart-island-hub {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 94%;
    max-width: 450px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.island-nav-inner {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    display: flex;
    justify-content: space-around;
    padding: 10px 5px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

.island-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888c99;
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    width: 65px;
    cursor: pointer;
}

.island-item i {
    font-size: 20px;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.island-item:hover {
    color: #ffffff;
}

.island-item:hover i {
    transform: translateY(-2px);
}

/* Active Island Item */
.island-item.active {
    color: #fff;
    background: linear-gradient(45deg, var(--neon-emerald), var(--neon-blue));
    border-radius: 16px;
    padding: 5px 0;
    margin: -5px 0;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.island-item.active i {
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* === PULSATING BUTTON (Generuj / Nowa) === */
@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.4), 0 0 20px rgba(59, 130, 246, 0.2);
    }

    50% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.7), 0 0 40px rgba(59, 130, 246, 0.4);
    }
}

.island-item.pulse-glow {
    color: #fff;
    background: linear-gradient(135deg, var(--neon-emerald), var(--neon-blue));
    border-radius: 16px;
    padding: 5px 0;
    margin: -5px 0;
    animation: pulseGlow 2s ease-in-out infinite;
}

.island-item.pulse-glow i {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* === TOGGLE SWITCH === */
.toggle-switch {
    width: 44px;
    height: 24px;
    border-radius: 999px;
    position: relative;
    transition: background-color 0.3s;
}

.bg-toggle-off {
    background-color: rgba(255, 255, 255, 0.1);
}

.toggle-knob {
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.toggle-switch {
    background-color: var(--neon-emerald);
}

input:checked+.toggle-switch .toggle-knob {
    transform: translateX(20px);
}

/* === HELP LEGEND (Settings modal) === */
.help-legend {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.help-legend .legend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
}

.help-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #9ca3af;
}

.help-legend .legend-item code {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 2px 8px;
    font-weight: 700;
    color: #e5e7eb;
    font-family: monospace;
    font-size: 11px;
    white-space: nowrap;
}

/* === CUSTOM SCROLLBAR === */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

/* === MODAL VISIBILITY (shared) === */
.hidden-modal {
    opacity: 0;
    pointer-events: none;
}

.visible-modal {
    opacity: 1;
    pointer-events: auto;
}

/* === HIDE ISLAND NAV ON DESKTOP === */
@media (min-width: 1024px) {
    .smart-island-hub {
        display: none;
    }
}