html, body { height: 100%; touch-action: manipulation; }
        body { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
        .main-card { background: rgba(255,255,255,0.97); height: 100vh; width: 100vw; display: flex; flex-direction: column; overflow: hidden; }
        .tab-content { flex: 1; min-height: 0; overflow: hidden; }
        .tab-pane { height: 100%; padding: 1rem; overflow: auto; }
        .chat-pane { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
        .chat-box { flex: 1; min-height: 0; overflow-y: auto; background: #f8f9fa; border-radius: 8px; padding: 1rem; margin-bottom: 0.75rem; }
        .chat-input-row { position: sticky; bottom: 0; background: rgba(255,255,255,0.97); padding-top: 0.5rem; }
        .bubble { max-width: 80%; padding: 10px 14px; border-radius: 16px; display: inline-block; word-break: break-word; }
        .user-msg { text-align: right; }
        .user-msg .bubble { background: #0d6efd; color: #fff; border-bottom-right-radius: 4px; }
        .bot-msg .bubble { background: #e9ecef; color: #212529; border-bottom-left-radius: 4px; }
        .login-center { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
        .archive-preview { background: #f8f9fa; border-radius: 8px; padding: 1rem; max-height: 50vh; overflow-y: auto; }

        .item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
        .item-card {
            aspect-ratio: 1 / 1;
            border: 1px solid #dee2e6;
            border-radius: 12px;
            background: #fff;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 10px;
            position: relative;
            transition: transform 0.1s, box-shadow 0.1s;
            cursor: pointer;
            text-decoration: none;
            color: inherit;
        }
        .item-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
        .item-card.folder { background: #fff3cd; border-color: #ffecb5; }
        .item-card.link-group { background: #e7f1ff; border-color: #b6d4fe; }
        .item-card .icon { font-size: 2rem; margin-bottom: 6px; color: #0d6efd; }
        .item-card.folder .icon { color: #fd7e14; }
        .item-card .name { font-size: 0.85rem; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
        .item-card.add-card { border-style: dashed; background: #f8f9fa; color: #6c757d; }
        .item-card.add-card:hover { background: #e9ecef; }
        .back-btn { cursor: pointer; }

        /* Przycisk edycji - mała ikonka w prawym dolnym rogu */
        .item-card .edit-btn {
            position: absolute;
            bottom: 8px;
            right: 8px;
            width: 24px;
            height: 24px;
            border: none;
            background: rgba(13, 110, 253, 0.1);
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.2s, background 0.2s, transform 0.2s;
            z-index: 2;
            padding: 0;
        }
        .item-card:hover .edit-btn { opacity: 1; }
        .item-card .edit-btn:hover { background: rgba(13, 110, 253, 0.3); transform: scale(1.1); }
        .item-card .edit-btn i { font-size: 12px; color: #0d6efd; }

        /* Mobile - większy touch target */
        @media (hover: none) and (pointer: coarse) {
            .item-card .edit-btn { opacity: 1; width: 44px; height: 44px; bottom: 4px; right: 4px; }
            .item-card .edit-btn i { font-size: 16px; }
        }

        /* SortableJS - wizualna informacja zwrotna */
        .sortable-ghost { opacity: 0.4; background: #c8ebfb !important; }
        .sortable-drag { box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
        .sortable-chosen { border: 2px dashed #0d6efd; }

        /* Ikona z obrazka uploadowanego */
        .item-card .icon img {
            width: 32px;
            height: 32px;
            object-fit: contain;
            border-radius: 4px;
        }

        input, textarea, select { font-size: 16px !important; }