:root {
            /* Catppuccin Latte - Warm coffee/cream theme */
            --bg-primary: #eff1f5;
            --bg-secondary: #e6e9ef;
            --bg-tertiary: #dce0e8;
            --bg-card: #f4f5fa;
            --text-primary: #4c4f69;
            --text-secondary: #6c6f85;
            --text-tertiary: #9ca0b0;
            --border-color: #ccd0da;
            --shadow-sm: 0 2px 8px rgba(76, 79, 105, 0.08);
            --shadow-md: 0 4px 16px rgba(76, 79, 105, 0.12);
            --shadow-lg: 0 8px 24px rgba(76, 79, 105, 0.16);
            --accent-blue: #1e66f5;
            --accent-blue-hover: #04a5e5;
            --accent-green: #40a02b;
            --accent-red: #d20f39;
            --accent-gray: #7c7f93;
            --accent-lavender: #7287fd;
        }

        [data-theme="dark"] {
            /* Catppuccin Mocha - Elegant dark theme */
            --bg-primary: #1e1e2e;
            --bg-secondary: #181825;
            --bg-tertiary: #11111b;
            --bg-card: #181825;
            --text-primary: #cdd6f4;
            --text-secondary: #bac2de;
            --text-tertiary: #a6adc8;
            --border-color: #313244;
            --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
            --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
            --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
            --accent-blue: #89b4fa;
            --accent-blue-hover: #b4befe;
            --accent-green: #a6e3a1;
            --accent-red: #f38ba8;
            --accent-gray: #9399b2;
            --accent-lavender: #b4befe;
        }

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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            padding: 20px;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        .header-wrap {
            position: fixed;
            top: 20px;
            left: 20px;
            right: 20px;
            z-index: 200;
        }

        .header-wrap::before {
            content: '';
            position: absolute;
            top: 0;
            left: 20px;
            right: 20px;
            height: 4px;
            border-radius: 0 0 6px 6px;
            background: var(--accent-blue);
            opacity: 0.2;
            transition: opacity 0.2s ease;
        }

        .header-wrap:hover::before {
            opacity: 0;
        }

        .header {
            background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
            padding: 16px 20px;
            border-radius: 16px;
            margin-bottom: 0;
            box-shadow: var(--shadow-sm);
            backdrop-filter: blur(20px);
            border: 1px solid var(--border-color);
            transform: translateY(-110%);
            transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0.7s;
        }

        .header-wrap:hover .header,
        .header-wrap.pinned .header {
            transform: translateY(0);
            transition-delay: 0s;
        }

        .controls {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            align-items: center;
        }

        .search-box {
            flex: 1;
            min-width: 200px;
            padding: 10px 14px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            font-size: 14px;
            color: var(--text-primary);
            transition: all 0.2s ease;
        }

        .search-box:focus {
            outline: none;
            border-color: var(--accent-blue);
            background: var(--bg-card);
        }

        button {
            padding: 10px 18px;
            background: var(--accent-blue);
            color: white;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        button:hover {
            background: var(--accent-blue-hover);
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
        }

        button:active {
            transform: translateY(0);
        }

        button.secondary {
            background: var(--bg-tertiary);
            color: var(--text-primary);
            border: 1px solid var(--border-color);
        }

        button.secondary:hover {
            background: var(--bg-card);
        }

        button.danger {
            background: var(--accent-red);
        }

        button.danger:hover {
            opacity: 0.9;
        }

        .theme-toggle {
            background: var(--bg-tertiary);
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            padding: 0;
            border: 1px solid var(--border-color);
        }

        .theme-select {
            padding: 10px 14px;
            background: var(--bg-tertiary);
            color: var(--text-primary);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            font-size: 14px;
            cursor: pointer;
        }

        .theme-select:focus {
            outline: none;
            border-color: var(--accent-blue);
        }

        .board-shell {
            background: transparent;
            margin-top: 0;
            transition: margin-top 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0.7s;
        }

        .header-wrap:hover ~ .board-shell,
        .header-wrap.pinned ~ .board-shell {
            margin-top: 80px;
            transition-delay: 0s;
        }

        .board {
            display: flex;
            gap: 16px;
            overflow-x: auto;
            padding-bottom: 20px;
        }

        .board::-webkit-scrollbar {
            height: 10px;
        }

        .board::-webkit-scrollbar-thumb {
            background: var(--border-color);
            border-radius: 999px;
        }

        .board::-webkit-scrollbar-thumb:hover {
            background: var(--accent-gray);
        }

        .column {
            width: 340px;
            min-width: 340px;
            max-width: 340px;
            background: var(--bg-tertiary);
            border-radius: 16px;
            padding: 16px;
            flex-shrink: 0;
            border: 1px solid var(--border-color);
            box-shadow: var(--shadow-sm);
            transition: all 0.2s ease;
            cursor: grab;
        }

        .column:active {
            cursor: grabbing;
        }

        .column.drag-over-column {
            border-color: var(--accent-blue);
            box-shadow: var(--shadow-md);
            transform: translateX(4px);
        }

        .column-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--border-color);
            cursor: grab;
        }

        .column-header:active {
            cursor: grabbing;
        }

        .column-title {
            font-size: 15px;
            font-weight: 600;
            flex: 1;
            color: var(--text-primary);
            letter-spacing: -0.2px;
        }

        .column-meta {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 28px;
            height: 28px;
            margin-right: 10px;
            border-radius: 8px;
            background: var(--bg-card);
            color: var(--text-secondary);
            font-size: 11px;
            font-weight: 700;
        }

        .column-title[contenteditable="true"] {
            background: var(--bg-card);
            padding: 6px 10px;
            border-radius: 8px;
            outline: 2px solid var(--accent-blue);
        }

        .column-actions {
            display: flex;
            gap: 5px;
            opacity: 0;
            transition: opacity 0.2s ease;
        }

        .column:hover .column-actions {
            opacity: 1;
        }

        .icon-btn {
            padding: 6px 10px;
            font-size: 12px;
            min-width: auto;
            border-radius: 8px;
        }

        .cards-container {
            min-height: 100px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .card {
            background: var(--bg-card);
            border-radius: 12px;
            padding: 14px;
            box-shadow: var(--shadow-sm);
            cursor: move;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            border: 1px solid var(--border-color);
            word-wrap: break-word;
            overflow-wrap: break-word;
            word-break: break-word;
        }

        .card:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
            border-color: var(--accent-blue);
            background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
        }

        .card.dragging {
            opacity: 0.6;
            transform: rotate(2deg) scale(1.02);
            box-shadow: var(--shadow-lg);
        }

        .card.hidden {
            display: none;
        }

        .card-refs {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 4px;
        }

        .card-parent, .card-sdo {
            font-size: 10px;
            color: var(--text-tertiary);
            opacity: 0.8;
        }

        .card-parent a, .card-sdo a {
            color: var(--text-tertiary);
            text-decoration: none;
        }

        .card-parent a:hover, .card-sdo a:hover {
            color: var(--accent-blue);
        }

        .card-number {
            font-size: 11px;
            margin-bottom: 6px;
            font-weight: 500;
        }

        .card-number a {
            color: var(--text-secondary);
            text-decoration: none;
            transition: color 0.2s ease;
        }

        .card-number a:hover {
            color: var(--accent-blue);
        }

        .card-due-date {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 11px;
            padding: 4px 8px;
            border-radius: 6px;
            margin-bottom: 8px;
            font-weight: 500;
            background: var(--bg-tertiary);
            color: var(--text-secondary);
            border: 1px solid var(--border-color);
        }

        .card-due-date.overdue {
            background: rgba(210, 15, 57, 0.12);
            color: var(--accent-red);
            border-color: rgba(210, 15, 57, 0.25);
        }

        .card-due-date.soon {
            background: rgba(254, 100, 11, 0.12);
            color: #fe640b;
            border-color: rgba(254, 100, 11, 0.25);
        }

        [data-theme="dark"] .card-due-date.overdue {
            background: rgba(243, 139, 168, 0.12);
            border-color: rgba(243, 139, 168, 0.25);
        }

        [data-theme="dark"] .card-due-date.soon {
            background: rgba(250, 179, 135, 0.12);
            color: #fab387;
            border-color: rgba(250, 179, 135, 0.25);
        }

        .card-title {
            font-size: 14px;
            font-weight: 500;
            margin-bottom: 10px;
            word-wrap: break-word;
            color: var(--text-primary);
            line-height: 1.4;
        }

        .card-title-row {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 10px;
        }

        .card-title a {
            color: var(--accent-blue);
            text-decoration: none;
        }

        .card-title a:hover {
            text-decoration: underline;
        }

        .card-repositories {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 10px;
        }

        .repo-tag {
            display: inline-block;
            background: rgba(64, 160, 43, 0.15);
            color: var(--accent-green);
            font-weight: 600;
            font-size: 10px;
            padding: 4px 10px;
            border-radius: 8px;
            border: 1px solid rgba(64, 160, 43, 0.25);
            letter-spacing: 0.2px;
            transition: all 0.2s ease;
        }

        .repo-tag:hover {
            background: rgba(64, 160, 43, 0.25);
            transform: translateY(-1px);
        }

        [data-theme="dark"] .repo-tag {
            background: rgba(166, 227, 161, 0.15);
            border-color: rgba(166, 227, 161, 0.25);
        }

        [data-theme="dark"] .repo-tag:hover {
            background: rgba(166, 227, 161, 0.25);
        }

        .repo-preset-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 8px;
        }

        .repo-chip {
            padding: 5px 12px;
            font-size: 12px;
            font-weight: 500;
            border-radius: 20px;
            background: var(--bg-tertiary);
            color: var(--text-secondary);
            border: 1px solid var(--border-color);
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .repo-chip:hover {
            border-color: var(--accent-green);
            color: var(--accent-green);
        }

        .repo-chip.active {
            background: rgba(64, 160, 43, 0.15);
            color: var(--accent-green);
            border-color: rgba(64, 160, 43, 0.4);
        }

        [data-theme="dark"] .repo-chip.active {
            background: rgba(166, 227, 161, 0.15);
            color: var(--accent-green);
            border-color: rgba(166, 227, 161, 0.35);
        }

        .repo-custom-input {
            display: flex;
            gap: 6px;
            margin-bottom: 8px;
        }

        .repo-custom-input input {
            flex: 1;
        }

        .repo-selected-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-top: 4px;
        }

        .repo-selected-tag {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            background: rgba(64, 160, 43, 0.15);
            color: var(--accent-green);
            font-size: 11px;
            font-weight: 600;
            padding: 3px 8px 3px 10px;
            border-radius: 20px;
            border: 1px solid rgba(64, 160, 43, 0.3);
        }

        .repo-selected-tag button {
            background: none;
            border: none;
            color: inherit;
            padding: 0;
            font-size: 14px;
            line-height: 1;
            cursor: pointer;
            opacity: 0.6;
            box-shadow: none;
        }

        .repo-selected-tag button:hover {
            opacity: 1;
            transform: none;
        }

        [data-theme="dark"] .repo-selected-tag {
            background: rgba(166, 227, 161, 0.12);
            border-color: rgba(166, 227, 161, 0.25);
        }

        .card-details {
            font-size: 12px;
            color: var(--text-secondary);
            line-height: 1.6;
            word-wrap: break-word;
        }

        .card-updated-at {
            font-size: 10px;
            color: var(--text-tertiary);
            margin-top: 8px;
            letter-spacing: 0.1px;
        }

        .card-di-list {
            margin-bottom: 10px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .di-item {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            padding: 8px;
            background: var(--bg-tertiary);
            border-radius: 8px;
            border: 1px solid var(--border-color);
            font-size: 11px;
        }

        .di-number {
            font-weight: 600;
            color: var(--accent-lavender);
            white-space: nowrap;
        }

        .di-number a {
            color: var(--accent-lavender);
            text-decoration: none;
        }

        .di-number a:hover {
            text-decoration: underline;
        }

        .di-comment {
            color: var(--text-secondary);
            flex: 1;
            line-height: 1.4;
        }

        .di-manager {
            margin-top: 10px;
        }

        .di-input-group {
            display: flex;
            gap: 8px;
            margin-bottom: 8px;
        }

        .di-input-group input {
            flex: 1;
        }

        .di-input-group input:first-child {
            max-width: 120px;
        }

        .di-list-item {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            padding: 8px;
            background: var(--bg-tertiary);
            border-radius: 8px;
            margin-bottom: 6px;
            font-size: 12px;
        }

        .di-list-item-content {
            flex: 1;
        }

        .di-list-item-number {
            font-weight: 600;
            color: var(--accent-lavender);
            margin-bottom: 2px;
        }

        .di-list-item-comment {
            color: var(--text-secondary);
            font-size: 11px;
        }

        .card-actions {
            display: flex;
            gap: 6px;
            justify-content: flex-end;
            max-height: 0;
            overflow: hidden;
            opacity: 0;
            margin-top: 0;
            padding-top: 0;
            border-top: 1px solid transparent;
            transition: all 0.2s ease;
        }

        .card:hover .card-actions {
            opacity: 1;
            max-height: 40px;
            margin-top: 12px;
            padding-top: 12px;
            border-top-color: var(--border-color);
        }

        .add-card-btn {
            width: 100%;
            margin-top: 12px;
            background: transparent;
            color: var(--text-tertiary);
            border: 2px dashed var(--border-color);
            border-radius: 10px;
        }

        .add-card-btn:hover {
            background: rgba(0, 122, 255, 0.08);
            color: var(--accent-blue);
            border-color: var(--accent-blue);
            transform: none;
            box-shadow: none;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.4);
            backdrop-filter: blur(10px);
            z-index: 1000;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.2s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .modal.active {
            display: flex;
        }

        .modal-content {
            background: var(--bg-secondary);
            border-radius: 20px;
            padding: 28px;
            max-width: 750px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: var(--shadow-lg);
            border: 1px solid var(--border-color);
            animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

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

        .modal-header {
            font-size: 20px;
            font-weight: 600;
            margin-bottom: 24px;
            color: var(--text-primary);
            letter-spacing: -0.3px;
        }

        .form-group {
            margin-bottom: 18px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            font-size: 14px;
            color: var(--text-primary);
        }

        .form-group input,
        .form-group textarea,
        .form-group select {
            width: 100%;
            padding: 12px 14px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            font-size: 14px;
            font-family: inherit;
            color: var(--text-primary);
            transition: all 0.2s ease;
        }

        .form-group input:focus,
        .form-group textarea:focus,
        .form-group select:focus {
            outline: none;
            border-color: var(--accent-blue);
            background: var(--bg-card);
        }

        .form-group textarea {
            min-height: 90px;
            resize: vertical;
        }

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

        .archive-section {
            margin-top: 30px;
            background: var(--bg-secondary);
            padding: 24px;
            border-radius: 16px;
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border-color);
        }

        .archive-section h2 {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 20px;
            color: var(--text-primary);
            letter-spacing: -0.3px;
        }

        .archive-cards {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 10px;
        }

        .archive-card {
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 14px;
            transition: all 0.2s ease;
        }

        .archive-card:hover {
            box-shadow: var(--shadow-sm);
            border-color: var(--accent-blue);
        }

        .archive-card .card-actions {
            opacity: 1;
            max-height: 40px;
            margin-top: 12px;
            padding-top: 12px;
            border-top-color: var(--border-color);
        }

        .toggle-archive-btn {
            background: var(--accent-gray);
            margin-bottom: 15px;
        }

        .cards-container.drag-over {
            background: rgba(30, 102, 245, 0.08);
            border: 2px dashed var(--accent-blue);
            border-radius: 8px;
        }

        .help-text {
            font-size: 11px;
            color: var(--text-tertiary);
            margin-top: 5px;
            line-height: 1.4;
        }

        .login-container {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            background: var(--bg-primary);
        }

        .login-box {
            background: var(--bg-secondary);
            padding: 40px;
            border-radius: 20px;
            box-shadow: var(--shadow-lg);
            border: 1px solid var(--border-color);
            width: 100%;
            max-width: 400px;
        }

        .login-box h1 {
            font-size: 24px;
            margin-bottom: 24px;
            text-align: center;
            color: var(--text-primary);
        }

        .login-error {
            background: rgba(210, 15, 57, 0.12);
            color: var(--accent-red);
            padding: 12px;
            border-radius: 10px;
            margin-bottom: 20px;
            font-size: 14px;
            text-align: center;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
            color: var(--text-secondary);
        }

        .readonly-badge {
            background: rgba(254, 100, 11, 0.12);
            color: #fe640b;
            padding: 4px 10px;
            border-radius: 8px;
            font-size: 11px;
            font-weight: 600;
        }

        /* Hide edit controls in readonly mode */
        .readonly-mode .card-actions,
        .readonly-mode .column-actions,
        .readonly-mode .add-card-btn,
        .readonly-mode button[onclick*="addColumn"],
        .readonly-mode button[onclick*="importData"],
        .readonly-mode #undoBtn,
        .readonly-mode #userManagementBtn {
            display: none !important;
        }

        .readonly-mode .card,
        .readonly-mode .column {
            cursor: default !important;
        }

        .readonly-mode .card[draggable],
        .readonly-mode .column[draggable] {
            pointer-events: none;
        }

        /* User Management Modal */
        .user-table {
            width: 100%;
            border-collapse: collapse;
            margin: 16px 0;
        }

        .user-table th,
        .user-table td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid var(--border-color);
        }

        .user-table th {
            font-weight: 600;
            font-size: 12px;
            text-transform: uppercase;
            color: var(--text-tertiary);
            letter-spacing: 0.5px;
        }

        .user-table td {
            font-size: 14px;
            color: var(--text-primary);
        }

        .user-table tr:hover {
            background: var(--bg-tertiary);
        }

        .role-badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 600;
        }

        .role-badge.admin {
            background: rgba(30, 102, 245, 0.12);
            color: var(--accent-blue);
        }

        .role-badge.readonly {
            background: rgba(124, 127, 147, 0.12);
            color: var(--accent-gray);
        }

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

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

        .icon-btn-small:hover {
            background: var(--bg-tertiary);
        }

        .user-form-section {
            background: var(--bg-tertiary);
            padding: 20px;
            border-radius: 12px;
            margin-bottom: 20px;
        }

        .user-form-section h3 {
            margin: 0 0 16px 0;
            font-size: 16px;
            color: var(--text-primary);
        }

        .form-row {
            display: flex;
            gap: 10px;
            align-items: flex-end;
        }

        .form-row .form-group {
            flex: 1;
        }

        .modal-content.wide {
            max-width: 700px;
        }

        .sync-status {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            padding: 8px 12px;
            border-radius: 10px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            font-weight: 500;
        }

        .sync-status.synced {
            background: rgba(64, 160, 43, 0.12);
            color: var(--accent-green);
            border-color: rgba(64, 160, 43, 0.25);
        }

        .sync-status.syncing {
            background: rgba(254, 100, 11, 0.12);
            color: #fe640b;
            border-color: rgba(254, 100, 11, 0.25);
        }

        .sync-status.error {
            background: rgba(210, 15, 57, 0.12);
            color: var(--accent-red);
            border-color: rgba(210, 15, 57, 0.25);
        }

        [data-theme="dark"] .sync-status.synced {
            background: rgba(166, 227, 161, 0.12);
            border-color: rgba(166, 227, 161, 0.25);
        }

        [data-theme="dark"] .sync-status.syncing {
            background: rgba(250, 179, 135, 0.12);
            color: #fab387;
            border-color: rgba(250, 179, 135, 0.25);
        }

        [data-theme="dark"] .sync-status.error {
            background: rgba(243, 139, 168, 0.12);
            border-color: rgba(243, 139, 168, 0.25);
        }

        .sync-indicator {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: currentColor;
            box-shadow: 0 0 6px currentColor;
        }

        .card-memo-badge {
            display: inline-flex;
            align-items: center;
            gap: 3px;
            font-size: 10px;
            color: var(--accent-lavender);
            opacity: 0.75;
            cursor: pointer;
            padding: 2px 6px;
            border-radius: 6px;
            border: 1px solid transparent;
            transition: all 0.2s ease;
            float: right;
            margin-left: 6px;
            margin-top: 1px;
        }

        .card-memo-badge:hover {
            opacity: 1;
            background: rgba(114, 135, 253, 0.12);
            border-color: rgba(114, 135, 253, 0.25);
        }

        [data-theme="dark"] .card-memo-badge {
            color: var(--accent-lavender);
        }

        .card-attachments {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin-bottom: 8px;
        }

        .attachment-chip {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 8px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 11px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
            max-width: 200px;
            text-decoration: none;
        }

        .attachment-chip:hover {
            background: rgba(30, 102, 245, 0.08);
            border-color: rgba(30, 102, 245, 0.3);
            color: var(--accent-blue);
        }

        [data-theme="dark"] .attachment-chip:hover {
            background: rgba(137, 180, 250, 0.1);
        }

        .attachment-chip-name {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .attachment-chip-size {
            color: var(--text-tertiary);
            white-space: nowrap;
            flex-shrink: 0;
        }

        .attachment-manager {
            margin-top: 10px;
        }

        .attachment-list-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px;
            background: var(--bg-tertiary);
            border-radius: 8px;
            margin-bottom: 6px;
            font-size: 12px;
        }

        .attachment-list-item-info {
            flex: 1;
            overflow: hidden;
            margin-right: 8px;
        }

        .attachment-list-item-name {
            font-weight: 500;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .attachment-list-item-size {
            color: var(--text-tertiary);
            font-size: 11px;
            margin-top: 2px;
        }

        .memo-modal-content {
            max-width: 640px;
            width: 90%;
        }

        .memo-textarea {
            width: 100%;
            min-height: 320px;
            padding: 14px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            font-size: 14px;
            font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, monospace, sans-serif;
            color: var(--text-primary);
            line-height: 1.6;
            resize: vertical;
            transition: all 0.2s ease;
        }

        .memo-textarea:focus {
            outline: none;
            border-color: var(--accent-lavender);
            background: var(--bg-card);
        }

        .memo-card-ref {
            font-size: 12px;
            color: var(--text-tertiary);
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .memo-char-count {
            font-size: 11px;
            color: var(--text-tertiary);
            text-align: right;
            margin-top: 6px;
        }
