    :root { --bg-dark: #121212; --bg-panel: #1E1E1E; --bg-input: #2C2C2C; --border: #333333; --accent: #7C3AED; --accent-hover: #6D28D9; --text-main: #FFFFFF; --text-muted: #A3A3A3; --danger: #EF4444; --danger-hover: #DC2626; --success: #10B981; --warning: #F59E0B; --grid-dot: #333; --shadow: rgba(0,0,0,0.6); --item-hover: #2A2A2A; --font-family: 'Inter', sans-serif; --tooltip-bg: #000; --overlay-bg: rgba(0,0,0,0.8); }
    [data-theme="light"] { --bg-dark: #F3F4F6; --bg-panel: #FFFFFF; --bg-input: #F9FAFB; --border: #E5E7EB; --accent: #7C3AED; --text-main: #1F2937; --text-muted: #6B7280; --danger: #DC2626; --danger-hover: #B91C1C; --success: #059669; --warning: #D97706; --grid-dot: #CBD5E1; --shadow: rgba(0,0,0,0.1); --item-hover: #F3F4F6; --tooltip-bg: #333; --overlay-bg: rgba(0,0,0,0.4); }
    [dir="rtl"] { --font-family: 'Vazirmatn', sans-serif; }
    body { margin: 0; background-color: var(--bg-dark); color: var(--text-main); font-family: var(--font-family); height: 100vh; overflow: hidden; user-select: none; font-size: 13px; transition: background 0.3s, color 0.3s; }
    * { box-sizing: border-box; outline: none; }
    ::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; }
    .view-section { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: none; flex-direction: column; } .view-active { display: flex; }
    .btn { padding: 0 20px; height: 40px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 8px; transition: 0.2s; white-space: nowrap; font-family: inherit; justify-content: center; }
    .btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
    .btn-primary { background: var(--accent); color: white; box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3); } .btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
    .btn-danger { background: var(--danger); color: white; box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3); } .btn-danger:hover { background: var(--danger-hover); }
    .btn-secondary { background: transparent; color: var(--text-muted); border: 1px solid var(--border); } .btn-secondary:hover { color: var(--text-main); border-color: var(--text-muted); background: var(--item-hover); }
    .btn-icon { width: 36px; height: 36px; padding: 0; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-main); display: flex; align-items: center; justify-content: center; border-radius: 8px; cursor: pointer; transition: 0.2s; } .btn-icon:hover { border-color: var(--accent); color: var(--accent); }
    .dashboard-container { width: 100%; height: 100vh; display: flex; flex-direction: column; background: var(--bg-dark); }
    .dashboard-header { padding: 15px 30px; border-bottom: 1px solid var(--border); background: var(--bg-panel); display: flex; justify-content: space-between; align-items: center; }
    .header-left h1 { font-size: 20px; font-weight: 700; margin: 0; background: linear-gradient(45deg, #7C3AED, #0D99FF); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: flex; align-items: center; gap: 10px; }
    .header-right { display: flex; align-items: center; gap: 15px; }
    .theme-switch { position: relative; display: inline-block; width: 36px; height: 20px; } .theme-switch input { opacity: 0; width: 0; height: 0; } .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #444; transition: .3s; border-radius: 20px; } .slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; } input:checked + .slider { background-color: var(--accent); } input:checked + .slider:before { transform: translateX(16px); }
    .dashboard-main { flex: 1; padding: 30px; overflow-y: auto; }
    .dashboard-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 20px; }
    .search-box { position: relative; width: 300px; transition: all 0.3s; } .search-input { width: 100%; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-main); padding: 10px 40px 10px 15px; border-radius: 8px; font-family: inherit; font-size: 13px; transition: 0.2s; } .search-input:focus { border-color: var(--accent); outline: none; } .search-icon { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: var(--text-muted); pointer-events: none; } [dir="rtl"] .search-input { padding: 10px 15px 10px 40px; } [dir="rtl"] .search-icon { right: auto; left: 15px; }
    .view-controls { display: flex; align-items: center; gap: 15px; } .view-toggles { display: flex; background: var(--bg-input); padding: 3px; border-radius: 8px; border: 1px solid var(--border); } .view-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 6px; color: var(--text-muted); border: none; background: transparent; transition: 0.2s; } .view-btn:hover { color: var(--text-main); } .view-btn.active { background: var(--bg-panel); color: var(--accent); box-shadow: 0 2px 5px rgba(0,0,0,0.1); } .view-btn svg { width: 20px; height: 20px; fill: currentColor; }
    .projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 25px; } .projects-list { display: flex; flex-direction: column; gap: 12px; }
    .project-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: all 0.3s ease; overflow: hidden; position: relative; box-shadow: 0 4px 6px rgba(0,0,0,0.05); } .project-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 10px 25px var(--shadow); }
    .project-card.grid-view .card-thumb::before { content: ''; position: absolute; inset: 0; background: linear-gradient( 135deg, rgba(124, 58, 237, 0.1), transparent ); opacity: 0; transition: opacity 0.3s; } .project-card.grid-view:hover .card-thumb::before { opacity: 1; }
    .card-actions { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; opacity: 0; transition: opacity 0.2s, transform 0.2s; z-index: 2; transform: translateY(-10px); } [dir="rtl"] .card-actions { right: auto; left: 12px; } .project-card:hover .card-actions { opacity: 1; transform: translateY(0); }
    .card-action-btn { width: 32px; height: 32px; border-radius: 8px; border: none; display: flex; align-items: center; justify-content: center; background: var(--bg-panel); color: var(--text-muted); cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 6px var(--shadow); backdrop-filter: blur(10px); } .card-action-btn:hover { transform: scale(1.1); } .card-action-btn.edit:hover { color: var(--accent); background: rgba(124, 58, 237, 0.15); border: 1px solid rgba(124, 58, 237, 0.3); } .card-action-btn.delete:hover { color: var(--danger); background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); } .card-action-btn svg { width: 16px; height: 16px; fill: currentColor; }
    .project-card.grid-view .card-thumb { height: 160px; background: var(--bg-input); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 28px; font-weight: bold; border-bottom: 1px solid var(--border); overflow: hidden; } .project-card.grid-view .card-body { padding: 18px; position: relative; } .project-card.grid-view .card-title { font-size: 16px; font-weight: 600; color: var(--text-main); margin: 0 0 8px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .project-card.grid-view .card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
    .project-card.list-view { display: flex; align-items: center; height: 70px; padding: 0 20px; flex-direction: row; } .project-card.list-view:hover { transform: none; background: var(--item-hover); } .project-card.list-view .card-thumb { width: 48px; height: 48px; border-radius: 8px; background: var(--bg-input); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 16px; font-weight: bold; margin-right: 16px; border: 1px solid var(--border); flex-shrink: 0; overflow: hidden; } [dir="rtl"] .project-card.list-view .card-thumb { margin-right: 0; margin-left: 16px; } .project-card.list-view .card-body { padding: 0; flex: 1; display: flex; justify-content: space-between; align-items: center; } .project-card.list-view .card-title { font-size: 14px; font-weight: 600; color: var(--text-main); margin: 0; }
    .project-status { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 15px; display: inline-block; } .status-draft { background: rgba(124, 58, 237, 0.1); color: var(--accent); border: 1px solid rgba(124, 58, 237, 0.3); } .status-published { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
    .card-date { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; } .card-date svg { width: 12px; height: 12px; fill: currentColor; }
    .project-card.selected { border-color: var(--accent); background: rgba(124, 58, 237, 0.05); position: relative; } .project-card.selected::after { content: '✓'; position: absolute; top: 12px; left: 12px; width: 20px; height: 20px; background: var(--accent); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; z-index: 3; box-shadow: 0 2px 4px rgba(0,0,0,0.2); } [dir="rtl"] .project-card.selected::after { left: auto; right: 12px; }
    .project-card.locked { border-color: rgba(239, 68, 68, 0.5); } .project-card.locked:hover { transform: translateY(-5px); border-color: var(--danger) !important; box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4) !important; } .project-card.locked .card-thumb::before { background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), transparent); } .project-card.locked .card-actions { display: none !important; }
    .project-card.locked-timer { border-color: rgba(245, 158, 11, 0.5); }
    .project-card.locked-timer:hover { 
        transform: translateY(-5px); 
        border-color: var(--warning) !important; 
        box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4) !important; 
    }
    .project-card.locked-timer .card-thumb::before { 
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), transparent); 
    }
    .project-card.locked-timer .card-actions { display: none !important; }
    .lock-badge { position: absolute; top: 10px; left: 10px; width: 24px; height: 24px; background: var(--bg-panel); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--danger); box-shadow: 0 2px 5px rgba(0,0,0,0.3); z-index: 5; } [dir="rtl"] .lock-badge { left: auto; right: 10px; }
    .project-card.list-view.locked { border-left: 3px solid var(--danger); } [dir="rtl"] .project-card.list-view.locked { border-left: 1px solid var(--border); border-right: 3px solid var(--danger); }
    .selection-toolbar { display: none; align-items: center; gap: 10px; background: var(--bg-panel); padding: 4px 10px; border-radius: 8px; border: 1px solid var(--accent); animation: fadeIn 0.2s ease; } @keyframes fadeIn { from{opacity:0; transform:translateY(5px)} to{opacity:1; transform:translateY(0)} }
    .page-item.selected { background: rgba(124, 58, 237, 0.1); border: 1px solid var(--accent); color: var(--text-main); }
    .editor-topbar { height: 50px; background: var(--bg-panel); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 16px; z-index: 100; } .editor-body { flex: 1; display: flex; overflow: hidden; position: relative; }
    .sidebar-left { width: 240px; background: var(--bg-panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 10; } [dir="rtl"] .sidebar-left { border-right: none; border-left: 1px solid var(--border); } .sidebar-header { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-weight: 600; color: var(--text-muted); font-size: 11px; } 
		.pages-list {
		flex: 1;
		overflow-y: auto;
		padding: 10px;
		scroll-behavior: smooth;
		}
			.page-item {
		display: flex;
		align-items: center;
		padding: 10px;
		margin-bottom: 8px;
		cursor: pointer;
		border-radius: 8px;
		background-color: var(--bg-input);
		border: 1px solid transparent;
		transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
		position: relative;
		user-select: none;
		overflow: hidden;
		}
	.page-item:hover {
		background-color: var(--item-hover);
		transform: translateY(-1px);
		box-shadow: 0 2px 5px rgba(0,0,0,0.1);
	}
		.page-item.active {
		border-left: 4px solid var(--accent); 
	}
	.page-item.selected {
		background-color: rgba(124, 58, 237, 0.1); 
		border-color: var(--accent);
		box-shadow: 0 0 0 1px var(--accent); 
	}
	.drag-handle {
		cursor: grab;
		color: var(--text-muted);
		margin-right: 12px;
		display: flex;
		align-items: center;
		opacity: 0.3;
		transition: opacity 0.2s;
	}
	.page-item:hover .drag-handle { opacity: 1; }
	.drag-handle:active { cursor: grabbing; }
	[dir="rtl"] .drag-handle { margin-right: 0; margin-left: 12px; }
	.page-thumb-img {
		width: 36px;
		height: 48px;
		background: #000;
		margin-right: 12px;
		object-fit: contain;
		border-radius: 4px;
		border: 1px solid var(--border);
	}
	[dir="rtl"] .page-thumb-img { margin-right: 0; margin-left: 12px; }
	.page-label {
		font-size: 13px;
		font-weight: 500;
		color: var(--text-main);
		flex: 1;
	}
	.check-icon {
		width: 20px;
		height: 20px;
		background: var(--accent);
		color: white;
		border-radius: 50%;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 12px;
		opacity: 0;
		transform: scale(0);
		transition: all 0.2s ease;
	}
	.page-item.selected .check-icon {
		opacity: 1;
		transform: scale(1);
	}
	.page-item.dragging {
		opacity: 0.4;
		background: var(--bg-panel);
		border: 1px solid var(--border); 
		transform: scale(0.95);
	}
	.page-item.drag-over {
		border-top: 2px solid var(--warning) !important; 
		transform: translateY(2px); 
	}
		.sidebar-right { width: 280px; background: var(--bg-panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; z-index: 10; position: absolute; right: 0; top: 0; bottom: 0; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); } [dir="rtl"] .sidebar-right { right: auto; left: 0; border-left: none; border-right: 1px solid var(--border); transform: translateX(-100%); } .sidebar-right.open { transform: translateX(0); }
		.tabs-header { display: flex; border-bottom: 1px solid var(--border); background: var(--bg-panel); } .tab-btn { flex: 1; padding: 12px; text-align: center; cursor: pointer; color: var(--text-muted); font-weight: 600; font-size: 11px; background: transparent; border: none; border-bottom: 2px solid transparent; transition: 0.2s; } .tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); } .tab-content { display: none; flex: 1; overflow-y: auto; padding: 16px; } .tab-content.active { display: block; }
		.prop-section { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); } .prop-title { font-size: 11px; font-weight: 700; color: var(--text-main); margin-bottom: 12px; display: block; letter-spacing: 0.5px; } .row-inputs { display: flex; gap: 8px; margin-bottom: 10px; } .input-group { flex: 1; display: flex; align-items: center; background: var(--bg-input); border-radius: 4px; padding: 2px 6px; border: 1px solid transparent; } .input-group:focus-within { border-color: var(--accent); } .input-icon { color: var(--text-muted); font-size: 10px; margin-inline-end: 6px; } .clean-input { width: 100%; background: transparent; border: none; color: var(--text-main); padding: 4px 0; font-size: 11px; font-family: inherit; } select.clean-input option { background-color: var(--bg-panel); color: var(--text-main); }
		.color-wrapper { position: relative; display: flex; align-items: center; gap: 8px; background: var(--bg-input); padding: 4px 8px; border-radius: 4px; border: 1px solid transparent; cursor: pointer; overflow: hidden; } .color-wrapper:hover { border-color: var(--border); } .color-swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border); pointer-events: none; } .color-picker-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; margin: 0; border: none; } .color-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
		.layer-item { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; margin-bottom: 2px; border-radius: 4px; cursor: pointer; border: 1px solid transparent; } .layer-item:hover { background: var(--item-hover); } .layer-item.active { background: rgba(124, 58, 237, 0.15); color: var(--accent); font-weight: 600; } .layer-actions { opacity: 0; transition: opacity 0.2s; } .layer-item:hover .layer-actions { opacity: 1; } .layer-actions svg { width: 14px; height: 14px; fill: var(--text-muted); } .layer-actions svg:hover { fill: var(--danger); }
		.canvas-area { flex: 1; background-color: var(--bg-dark); background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px); background-size: 20px 20px; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; transition: background 0.3s; }
		.bottom-bar { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); background: var(--bg-panel); padding: 6px; border-radius: 14px; display: flex; gap: 6px; box-shadow: 0 10px 40px var(--shadow); border: 1px solid var(--border); z-index: 100; } .tool-btn { width: 40px; height: 40px; border-radius: 10px; border: none; background: transparent; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; position: relative; transition: 0.2s; } .tool-btn:hover { background: var(--item-hover); color: var(--text-main); } .tool-btn.active { background: var(--accent); color: white; } .tool-btn svg { width: 20px; height: 20px; fill: currentColor; } .separator { width: 1px; background: var(--border); height: 24px; margin: 8px 2px; }
		#shapes-popup, #brush-popup { display: none; position: absolute; bottom: 60px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px; padding: 6px; box-shadow: 0 10px 30px var(--shadow); z-index: 101; } .shape-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 6px; cursor: pointer; color: var(--text-main); font-size: 12px; } .shape-item:hover { background: var(--accent); color: white; } .shape-item svg { width: 16px; height: 16px; fill: currentColor; }
	.brush-cursor {
    position: fixed; 
    top: 0;
    left: 0;
    width: 20px; 
    height: 20px;
    border: 2px solid #fff; 
    box-shadow: 0 0 4px rgba(0,0,0,0.8), inset 0 0 4px rgba(0,0,0,0.5); 
    border-radius: 50%;
    pointer-events: none; 
    z-index: 100000; 
    display: none;
    transform: translate(-50%, -50%); 
    transition: width 0.1s, height 0.1s; 
}
.canvas-area.brush-mode {
    cursor: none !important;
}
.canvas-area.brush-mode canvas {
    cursor: none !important;
}
	.modal-overlay { position: fixed; inset: 0; background: var(--overlay-bg); z-index: 10000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(10px); } .modal-box { background: var(--bg-panel); padding: 30px; border-radius: 20px; width: 400px; border: 1px solid var(--border); box-shadow: 0 30px 60px var(--shadow); position: relative; animation: modalAppear 0.3s ease; } @keyframes modalAppear { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } } .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; } .modal-title { font-size: 20px; font-weight: 700; color: var(--text-main); } .modal-close { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 6px; border-radius: 6px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; } .modal-close:hover { color: var(--text-main); background: var(--item-hover); } .modal-input { width: 100%; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-main); padding: 12px 16px; border-radius: 10px; font-family: inherit; font-size: 14px; margin-bottom: 25px; transition: border-color 0.2s; } .modal-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1); } .modal-actions { display: flex; justify-content: flex-end; gap: 12px; }
    .confirmation-icon { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 25px; font-size: 28px; } .warning-icon { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 2px solid rgba(239, 68, 68, 0.2); } .edit-icon { background: rgba(124, 58, 237, 0.1); color: var(--accent); border: 2px solid rgba(124, 58, 237, 0.2); }
    .context-menu { position: fixed; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px; padding: 8px 0; box-shadow: 0 15px 40px var(--shadow); z-index: 1000; min-width: 180px; display: none; backdrop-filter: blur(20px); } .context-menu-item { padding: 10px 16px; cursor: pointer; color: var(--text-main); display: flex; align-items: center; gap: 10px; font-size: 13px; transition: 0.2s; border-radius: 4px; margin: 0 8px; } .context-menu-item:hover { background: var(--accent); color: white; } .context-menu-item svg { width: 16px; height: 16px; fill: currentColor; } .context-menu-divider { height: 1px; background: var(--border); margin: 6px 0; }
    .notification { position: fixed; top: 25px; right: 25px; padding: 14px 22px; border-radius: 10px; font-weight: 600; font-size: 13px; z-index: 20000; box-shadow: 0 10px 30px var(--shadow); transform: translateX(150%); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); backdrop-filter: blur(10px); } .notification.success { background: rgba(16, 185, 129, 0.9); color: white; border: 1px solid rgba(16, 185, 129, 0.3); } .notification.error { background: rgba(239, 68, 68, 0.9); color: white; border: 1px solid rgba(239, 68, 68, 0.3); }
    .empty-state { grid-column: 1/-1; text-align: center; padding: 80px 20px; color: var(--text-muted); } .empty-icon { font-size: 64px; margin-bottom: 25px; opacity: 0.2; } .loading { text-align: center; padding: 60px; color: var(--text-muted); } .loading-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 15px; } @keyframes spin { to { transform: rotate(360deg); } }
    [data-tooltip] { position: relative; } [data-tooltip]::after { content: attr(data-tooltip); position: absolute; bottom: -35px; left: 50%; transform: translateX(-50%) scale(0.8); background: var(--tooltip-bg); color: #fff; padding: 6px 12px; border-radius: 6px; font-size: 11px; white-space: nowrap; opacity: 0; pointer-events: none; transition: 0.2s; z-index: 1000; visibility: hidden; box-shadow: 0 8px 20px rgba(0,0,0,0.3); } [data-tooltip]:hover::after { opacity: 1; transform: translateX(-50%) scale(1); visibility: visible; bottom: -40px; }
    .chart-container { width: 100%; height: 250px; margin-bottom: 20px; position: relative; } .activity-filters { display: flex; gap: 10px; margin-bottom: 15px; justify-content: center; } .filter-chip { background: var(--bg-input); border: 1px solid var(--border); color: var(--text-muted); padding: 6px 14px; border-radius: 20px; font-size: 12px; cursor: pointer; transition: all 0.2s; } .filter-chip.active { background: rgba(124, 58, 237, 0.2); border-color: var(--accent); color: var(--accent); font-weight: 600; } .activity-details { max-height: 200px; overflow-y: auto; border-top: 1px solid var(--border); padding-top: 15px; } .activity-item { display: flex; align-items: center; justify-content: space-between; padding: 10px; border-bottom: 1px solid var(--border); transition: 0.2s; } .activity-item:last-child { border-bottom: none; } .activity-item:hover { background: var(--item-hover); border-radius: 8px; } .activity-name { font-weight: 600; color: var(--text-main); } .activity-time { font-size: 11px; color: var(--text-muted); }
.lock-tabs { display: flex; background: var(--bg-input); padding: 4px; border-radius: 8px; margin-bottom: 20px; }
    .lock-tab { flex: 1; padding: 8px; text-align: center; cursor: pointer; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--text-muted); transition: 0.2s; }
    .lock-tab.active { background: var(--bg-panel); color: var(--warning); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
    .timer-picker-container { 
        display: flex; 
        justify-content: center; 
        align-items: center; 
        height: 150px; 
        position: relative; 
        margin-bottom: 20px; 
        background: var(--bg-input); 
        border-radius: 12px; 
        overflow: hidden; 
        mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent); 
        -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent); 
        gap: 20px; 
    }
    .timer-wrapper {
        height: 100%; 
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        position: relative;
        z-index: 2; 
    }
    .timer-col { 
        height: 100%; 
        width: 50px; 
        overflow-y: auto; 
        scroll-snap-type: y mandatory; 
        text-align: center; 
        padding: 60px 0; 
        box-sizing: border-box; 
        -ms-overflow-style: none;  
        scrollbar-width: none; 
        cursor: grab;
    }
    .timer-col::-webkit-scrollbar { display: none; }
    .timer-col:active { cursor: grabbing; }
    .timer-item { 
        height: 30px; 
        line-height: 30px; 
        font-size: 18px; 
        color: var(--text-muted); 
        scroll-snap-align: center; 
        transition: 0.2s; 
        cursor: pointer; 
        user-select: none;
    }
    .timer-item.active { 
        color: var(--warning); 
        font-size: 22px; 
        font-weight: bold; 
        transform: scale(1.1); 
    }
    .timer-label { 
        font-size: 12px; 
        color: var(--text-muted); 
        font-weight: 600;
        margin-top: 2px; 
        user-select: none;
    }
    .timer-overlay-highlight { 
        position: absolute; 
        top: 50%; 
        left: 10px; 
        right: 10px; 
        height: 32px; 
        transform: translateY(-50%); 
        border-top: 1px solid var(--border); 
        border-bottom: 1px solid var(--border); 
        pointer-events: none; 
        z-index: 1;
    }
    .timer-badge {
        position: absolute;
        top: 10px;
        left: 10px; 
        background: rgba(245, 158, 11, 0.9);
        color: #000;
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 11px;
        font-weight: bold;
        display: flex;
        align-items: center;
        gap: 4px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.3);
        z-index: 5;
        animation: pulseTimer 2s infinite;
    }
    [dir="rtl"] .timer-badge { right: 10px; left: auto; }
    .timer-badge svg { width: 12px; height: 12px; fill: currentColor; }
    @keyframes pulseTimer {
        0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
        70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
        100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
    }
    .countdown-text {
        font-size: 9px;
        color: #fff;
        font-weight: 700;
        line-height: 1;
    }
    .timer-badge::before {
        content: '';
        position: absolute;
        top: -2px; left: -2px; right: -2px; bottom: -2px;
        border-radius: 50%;
        border: 2px solid transparent;
        border-top-color: #fff;
        animation: spin-wick 2s linear infinite;
        pointer-events: none;
    }
    @keyframes spin-wick { from{transform:rotate(0deg);} to{transform:rotate(360deg);} }
    @keyframes shockwave {
        0% { transform: scale(1); opacity: 0.8; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
        50% { transform: scale(1.05); opacity: 1; box-shadow: 0 0 0 50px rgba(245, 158, 11, 0); }
        100% { transform: scale(1); opacity: 0.8; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
    }
    .pulse-animation {
        animation: shockwave 1s ease-out infinite;
        z-index: 100 !important; 
        border-color: var(--warning) !important;
    }
    .screen-flash-overlay {
        position: fixed;
        inset: 0;
        background: rgba(245, 158, 11, 0.1);
        z-index: 99999;
        pointer-events: none;
        animation: screenFlash 2s ease-out forwards;
        display: none;
    }
    @keyframes screenFlash {
        0% { background: rgba(245, 158, 11, 0.4); }
        100% { background: transparent; }
    }
.header-right { display: flex; align-items: center; gap: 15px; height: 100%; }
.theme-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.theme-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #4b5563; transition: .3s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
input:checked + .slider { background-color: #7C3AED; }
input:checked + .slider:before { transform: translateX(20px); }
.user-menu-wrap { position: relative; display: flex; align-items: center; }
.user-avatar-btn {
    width: 42px; height: 42px; border-radius: 50%;
    background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
    border: 2px solid #3f3f46; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease; overflow: hidden;
}
.user-avatar-btn:hover { border-color: #7C3AED; box-shadow: 0 0 10px rgba(124, 58, 237, 0.4); }
.user-avatar-btn svg { width: 20px; height: 20px; fill: #9ca3af; transition: 0.3s; }
.user-avatar-btn:hover svg { fill: white; }
.user-dropdown {
    position: absolute; top: 55px; right: 0; width: 260px;
    background: rgba(30, 30, 40, 0.95); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    display: none; z-index: 5000; overflow: hidden; transform-origin: top right;
    animation: menuScale 0.2s ease;
}
@keyframes menuScale { from{opacity:0; transform:scale(0.95);} to{opacity:1; transform:scale(1);} }
.ud-header { padding: 16px; background: linear-gradient(to right, rgba(124, 58, 237, 0.1), transparent); border-bottom: 1px solid rgba(255,255,255,0.05); }
.ud-name { color: white; font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.ud-email { color: #9ca3af; font-size: 11px; }
.ud-item { padding: 12px 16px; display: flex; align-items: center; gap: 10px; color: #e5e7eb; cursor: pointer; transition: 0.2s; font-size: 13px; }
.ud-item:hover { background: rgba(255,255,255,0.05); color: #7C3AED; }
.ud-item svg { width: 18px; fill: currentColor; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); z-index: 99999; display: none; align-items: center; justify-content: center; }
.auth-container {
    background: #1e1e24; border-radius: 20px;
    box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
    position: relative; overflow: hidden;
    width: 850px; max-width: 100%; min-height: 550px;
    border: 1px solid rgba(255,255,255,0.05);
}
.form-container {
    position: absolute; top: 0; height: 100%; transition: all 0.6s ease-in-out;
    background: #1e1e24; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 50px; text-align: center;
}
.sign-in-container { left: 0; width: 50%; z-index: 2; }
.sign-up-container { left: 0; width: 50%; opacity: 0; z-index: 1; }
.auth-container.right-panel-active .sign-in-container { transform: translateX(100%); }
.auth-container.right-panel-active .sign-up-container {
    transform: translateX(100%); opacity: 1; z-index: 5;
    animation: show 0.6s;
}
@keyframes show { 0%, 49.99% { opacity: 0; z-index: 1; } 50%, 100% { opacity: 1; z-index: 5; } }
.overlay-container {
    position: absolute; top: 0; left: 50%; width: 50%; height: 100%;
    overflow: hidden; transition: transform 0.6s ease-in-out; z-index: 100;
}
.auth-container.right-panel-active .overlay-container { transform: translateX(-100%); }
.overlay {
    background: linear-gradient(135deg, #121212 0%, #3b0764 100%); 
    background-repeat: no-repeat; background-size: cover; background-position: 0 0;
    color: #FFFFFF; position: relative; left: -100%; height: 100%; width: 200%;
    transform: translateX(0); transition: transform 0.6s ease-in-out;
}
.auth-container.right-panel-active .overlay { transform: translateX(50%); }
.overlay-panel {
    position: absolute; display: flex; align-items: center; justify-content: center;
    flex-direction: column; padding: 0 40px; text-align: center;
    top: 0; height: 100%; width: 50%; transform: translateX(0); transition: transform 0.6s ease-in-out;
}
.overlay-left { transform: translateX(-20%); }
.auth-container.right-panel-active .overlay-left { transform: translateX(0); }
.overlay-right { right: 0; transform: translateX(0); }
.auth-container.right-panel-active .overlay-right { transform: translateX(20%); }
.auth-title { font-weight: bold; margin: 0 0 15px; color: #fff; font-size: 28px; }
.auth-desc { font-size: 14px; font-weight: 300; line-height: 20px; letter-spacing: 0.5px; margin: 20px 0 30px; }
.auth-input {
    background-color: #2b2b36; border: 1px solid #3f3f46; padding: 12px 15px;
    margin: 8px 0; width: 100%; border-radius: 8px; color: white; outline: none; transition: 0.3s;
}
.auth-input:focus { border-color: #7C3AED; background: #333; }
.btn-auth {
    border-radius: 20px; border: none; background: #7C3AED;
    color: #FFFFFF; font-size: 12px; font-weight: bold; padding: 12px 45px;
    letter-spacing: 1px; text-transform: uppercase; transition: transform 80ms ease-in; cursor: pointer; margin-top: 15px;
}
.btn-auth:active { transform: scale(0.95); }
.btn-auth:focus { outline: none; }
.btn-ghost { background-color: transparent; border: 1px solid #FFFFFF; margin-top: 15px; }
.premium-box { 
    width: 420px; 
    padding: 40px; 
    background: linear-gradient(145deg, #1a1a1a, #252525); 
    border: 1px solid #FFD700; 
    border-radius: 24px; 
    text-align: center; 
    position: relative; 
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.15), inset 0 0 20px rgba(255, 215, 0, 0.05); 
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.premium-icon-anim { 
    font-size: 60px; 
    margin-bottom: 20px; 
    display: inline-block;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
    animation: floatIcon 3s ease-in-out infinite;
}
@keyframes floatIcon { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.premium-title { 
    font-size: 24px; 
    font-weight: 800; 
    margin-bottom: 10px; 
    background: linear-gradient(90deg, #FFD700, #FDB931, #FFD700); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    text-transform: uppercase; letter-spacing: 1px;
}
.premium-desc { color: #ccc; margin-bottom: 30px; line-height: 1.6; font-size: 14px; }
.btn-upgrade-cta {
    width: 100%; 
    padding: 15px; 
    background: linear-gradient(90deg, #FFD700, #FFA500); 
    color: black; 
    border: none; 
    border-radius: 12px; 
    font-weight: 900; 
    font-size: 16px; 
    cursor: pointer; 
    text-transform: uppercase; 
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    position: relative; overflow: hidden;
}
.btn-upgrade-cta:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 15px 30px rgba(255, 215, 0, 0.5); 
}
.btn-upgrade-cta::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shine 3s infinite;
}
@keyframes shine { 100% { left: 100%; } }
.btn-later { background: transparent; border: none; color: #666; margin-top: 15px; cursor: pointer; font-size: 12px; }
.btn-later:hover { color: #999; }
[dir="rtl"] .auth-container {
    direction: rtl; 
}
[dir="rtl"] .sign-in-container {
    left: auto; 
    right: 0; 
}
[dir="rtl"] .sign-up-container {
    left: auto; 
    right: 0;
}
[dir="rtl"] .overlay-container {
    left: 0; 
    right: auto;
}
[dir="rtl"] .auth-container.right-panel-active .sign-in-container {
    transform: translateX(-100%); 
}
[dir="rtl"] .auth-container.right-panel-active .sign-up-container {
    transform: translateX(-100%); 
}
[dir="rtl"] .auth-container.right-panel-active .overlay-container {
    transform: translateX(100%); 
}
[dir="rtl"] .auth-container.right-panel-active .overlay {
    transform: translateX(-50%); 
}
[dir="rtl"] .overlay-left {
    transform: translateX(20%); 
}
[dir="rtl"] .auth-container.right-panel-active .overlay-left {
    transform: translateX(0);
}
[dir="rtl"] .overlay-right {
    right: auto; left: 0;
    transform: translateX(0);
}
[dir="rtl"] .auth-container.right-panel-active .overlay-right {
    transform: translateX(-20%);
}
[dir="rtl"] .auth-input {
    text-align: right;
    direction: rtl;
}
.agent-btn {
    background: linear-gradient(135deg, #7C3AED, #4C1D95);
    border: 1px solid rgba(255,255,255,0.2);
    color: white; padding: 0 15px; height: 36px; border-radius: 20px;
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    font-weight: bold; font-size: 12px; transition: 0.3s;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.4);
    animation: pulseGlow 3s infinite;
}
.agent-btn:hover { transform: scale(1.05); box-shadow: 0 0 25px rgba(124, 58, 237, 0.8); }
@keyframes pulseGlow {
    0% { box-shadow: 0 0 10px rgba(124, 58, 237, 0.2); }
    50% { box-shadow: 0 0 20px rgba(124, 58, 237, 0.6); }
    100% { box-shadow: 0 0 10px rgba(124, 58, 237, 0.2); }
}
.agent-overlay {
    position: fixed; inset: 0;
    background: rgba(5, 5, 10, 0.9); 
    backdrop-filter: blur(20px);
    z-index: 100000;
    display: none;
    flex-direction: column; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.5s ease;
}
.agent-overlay.active { display: flex; opacity: 1; }
.agent-canvas {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 800px; height: 800px; 
    pointer-events: none;
    filter: drop-shadow(0 0 10px #7C3AED) drop-shadow(0 0 30px rgba(124, 58, 237, 0.4));
}
.agent-logo-container {
    position: absolute; width: 140px; height: 140px;
    border-radius: 50%; background: #000;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #7C3AED;
    box-shadow: 0 0 50px #7C3AED inset, 0 0 20px #7C3AED;
    z-index: 10;
}
.agent-logo-container img { width: 70px; filter: drop-shadow(0 0 10px #7C3AED); }
.agent-status {
    position: absolute; bottom: 100px;
    font-family: 'Courier New', monospace;
    color: #fff; font-size: 16px; letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 0 0 10px #7C3AED;
    opacity: 0.8;
}
.close-agent {
    position: absolute; top: 40px; right: 40px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    color: white; width: 50px; height: 50px; border-radius: 50%;
    font-size: 24px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: 0.3s; z-index: 20;
}
.close-agent:hover { background: #EF4444; border-color: #EF4444; transform: rotate(90deg); }
.agent-input-wrapper {
    position: absolute;
    bottom: 30px;
    width: 500px;
    max-width: 90%;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 200; 
}
.agent-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(124, 58, 237, 0.5);
    color: #fff;
    padding: 12px 20px;
    border-radius: 30px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    outline: none;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.1);
    transition: 0.3s;
}
.agent-input:focus {
    border-color: #7C3AED;
    box-shadow: 0 0 25px rgba(124, 58, 237, 0.4);
    background: rgba(0, 0, 0, 0.8);
}
.agent-send-btn {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: #7C3AED;
    border: none;
    color: white;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.4);
    transition: 0.3s;
}
.agent-send-btn:hover {
    transform: scale(1.1);
    background: #6D28D9;
}
.agent-send-btn svg { width: 20px; fill: white; margin-left: 3px; }
#ai-pointer {
    position: fixed; z-index: 200000; pointer-events: none;
    display: none; transition: top 0.8s cubic-bezier(0.22, 1, 0.36, 1), left 1.5s cubic-bezier(0.22, 1, 0.36, 1);
    background: transparent !important; border: none !important; box-shadow: none !important; width: auto !important; height: auto !important;
}
#ai-pointer svg {
    width: 32px; height: 32px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
    transform-origin: top left;
}
.agent-overlay {
    transition: all 1.0s cubic-bezier(0.68, -0.55, 0.27, 1.55); 
}
.agent-overlay.minimized {
    opacity: 1 !important; 
    transform: scale(0.15) translate(45%, 45%); 
    top: auto; bottom: 20px; left: auto; right: 20px; 
    border-radius: 50%; 
    background: rgba(0,0,0,0.8);
    pointer-events: none; 
    inset: auto; width: 800px; height: 800px; 
}
.agent-overlay.minimized .agent-status,
.agent-overlay.minimized .agent-input-wrapper,
.agent-overlay.minimized .close-agent,
.agent-overlay.minimized .agent-logo-container {
    opacity: 0; pointer-events: none; transition: 0.2s;
}
.dock-container {
    position: fixed; 
    top: 70px; 
    left: 50%; 
    transform: translateX(-50%);
    background: rgba(30, 30, 35, 0.95); 
    backdrop-filter: blur(15px);
    padding: 8px 12px; 
    border-radius: 16px; 
    border: 1px solid rgba(255,255,255,0.15);
    display: none; 
    gap: 12px; 
    align-items: center; 
    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    user-select: none;
    transition: opacity 0.3s;
}
.dock-drag-handle {
    width: 6px; height: 24px; 
    background: rgba(255,255,255,0.2);
    border-radius: 4px; 
    margin-right: 5px; 
    cursor: grab;
}
.dock-drag-handle:active { cursor: grabbing; background: var(--accent); }
.dock-item {
    position: relative; width: 40px; height: 40px; border-radius: 10px;
    background: rgba(255,255,255,0.05); border: none; color: #ccc; cursor: pointer;
    transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.dock-item:hover, .dock-item.active { 
    background: var(--accent); color: #fff; transform: translateY(-3px); 
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.4);
}
.dock-item svg { width: 20px; height: 20px; fill: currentColor; }
.dock-tooltip {
    position: absolute; top: -35px; background: #000; color: #fff; padding: 4px 8px;
    border-radius: 4px; font-size: 10px; opacity: 0; pointer-events: none; transition: 0.2s;
    white-space: nowrap; font-weight: 600;
}
.dock-item:hover .dock-tooltip { opacity: 1; top: -45px; }
.sticky-note {
    position: absolute; 
    width: 220px; min-height: 180px;
    background: linear-gradient(135deg, #fef9c3, #fde047); 
    color: #333;
    box-shadow: 5px 10px 20px rgba(0,0,0,0.2);
    z-index: 2000;
    display: flex; flex-direction: column;
    animation: popInNote 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: 'Segoe UI', sans-serif;
}
@keyframes popInNote { from{transform:scale(0.8); opacity:0;} to{transform:scale(1); opacity:1;} }
.sticky-header {
    height: 30px; background: rgba(0,0,0,0.05);
    cursor: grab; display: flex; justify-content: space-between; align-items: center;
    padding: 0 8px; border-top: 2px solid rgba(255,255,255,0.5);
}
.sticky-header:active { cursor: grabbing; }
.sticky-close {
    cursor: pointer; font-size: 16px; font-weight: bold; color: #555; opacity: 0.6;
}
.sticky-close:hover { opacity: 1; color: #ef4444; }
.sticky-content {
    flex: 1; width: 100%; border: none; background: transparent;
    resize: none; padding: 12px; font-size: 14px; line-height: 1.5;
    outline: none; font-family: inherit; color: #222;
}
.sticky-content::placeholder { color: rgba(0,0,0,0.4); font-style: italic; }
#grid-nav-overlay {
    position: fixed; inset: 0; background: rgba(10, 10, 15, 0.95); z-index: 200000;
    backdrop-filter: blur(15px); display: none; padding: 80px 40px; overflow-y: auto;
}
.grid-header { 
    position: fixed; top: 0; left: 0; width: 100%; height: 60px; 
    display: flex; justify-content: center; align-items: center; 
    font-size: 20px; font-weight: bold; color: #fff; background: rgba(10,10,15,0.9);
    border-bottom: 1px solid rgba(255,255,255,0.1); z-index: 200001;
}
.grid-close { position: absolute; right: 30px; cursor: pointer; font-size: 24px; color: #777; }
.grid-close:hover { color: #fff; }
.grid-layout {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 25px;
    max-width: 1200px; margin: 0 auto;
}
.grid-page {
    cursor: pointer; transition: 0.3s; border-radius: 12px; overflow: hidden;
    border: 2px solid rgba(255,255,255,0.1); position: relative; aspect-ratio: 0.7; background: #222;
}
.grid-page:hover { transform: translateY(-8px); border-color: var(--accent); box-shadow: 0 15px 30px rgba(124, 58, 237, 0.3); }
.grid-page img { width: 100%; height: 100%; object-fit: cover; }
.grid-num {
    position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.8);
    color: white; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: bold;
}
.grid-page.active-page { border: 2px solid var(--success); }
.custom-modal-overlay {
    position: fixed; inset: 0; 
    background: rgba(0, 0, 0, 0.6); 
    backdrop-filter: blur(5px); 
    z-index: 200000;
    display: none; 
    align-items: center; justify-content: center;
    animation: fadeInModal 0.2s ease-out;
}
.custom-modal-box {
    background: rgba(30, 30, 35, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    padding: 25px;
    border-radius: 20px;
    width: 350px;
    text-align: center;
    transform: scale(0.9);
    animation: popInModal 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.custom-modal-title {
    color: white; font-size: 18px; margin-bottom: 20px; font-weight: bold;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.custom-input {
    width: 100%; padding: 12px 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: white; font-size: 14px; outline: none;
    transition: 0.3s;
}
.custom-input:focus { border-color: var(--accent); background: rgba(255,255,255,0.1); }
.modal-btns {
    display: flex; gap: 10px; margin-top: 20px;
}
.btn-modal {
    flex: 1; padding: 10px; border: none; border-radius: 10px; cursor: pointer;
    font-weight: bold; transition: 0.2s;
}
.btn-cancel { background: rgba(255,255,255,0.1); color: #ccc; }
.btn-cancel:hover { background: rgba(255,255,255,0.2); color: white; }
.btn-confirm { background: var(--accent); color: white; }
.btn-confirm:hover { filter: brightness(1.2); box-shadow: 0 5px 15px rgba(124, 58, 237, 0.4); }
@keyframes fadeInModal { from{opacity:0;} to{opacity:1;} }
@keyframes popInModal { to{transform:scale(1);} }
.palette-panel {
    position: fixed; top: 150px; right: 80px; width: 220px;
    background: rgba(30, 30, 35, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    z-index: 10000;
    display: none; 
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    overflow: hidden;
    transition: transform 0.2s;
}
.palette-header {
    padding: 10px 15px; background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 12px; font-weight: bold; color: #ddd;
    display: flex; justify-content: space-between; align-items: center;
    cursor: grab;
}
.palette-header:active { cursor: grabbing; }
.palette-body { padding: 15px; }
.palette-section-title {
    font-size: 10px; text-transform: uppercase; color: #888;
    margin-bottom: 8px; display: block; letter-spacing: 1px;
}
.swatch-grid {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 15px;
}
.color-swatch-item {
    width: 30px; height: 30px; border-radius: 50%;
    cursor: pointer; border: 2px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.color-swatch-item:hover { transform: scale(1.2); border-color: white; z-index: 2; }
.btn-extract {
    width: 100%; padding: 8px; background: var(--accent); color: white;
    border: none; border-radius: 6px; font-size: 11px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    transition: 0.2s;
}
.btn-extract:hover { filter: brightness(1.1); }
.btn-extract svg { width: 14px; fill: currentColor; }
.copied-tooltip {
    position: absolute; background: #000; color: #fff; padding: 4px 8px;
    border-radius: 4px; font-size: 10px; pointer-events: none;
    animation: fadeUp 0.8s forwards; z-index: 10001;
}
@keyframes fadeUp { 0%{opacity:1; transform:translateY(0);} 100%{opacity:0; transform:translateY(-20px);} }
#autosave-status {
    position: fixed; 
    top: 15px; right: 140px; 
    font-size: 11px; 
    color: rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 12px;
    pointer-events: none;
    z-index: 10000;
    display: none; 
    transition: color 0.3s;
    border: 1px solid rgba(255,255,255,0.05);
}
.status-saving { color: #F59E0B !important; } 
.status-saved { color: #10B981 !important; } 
#align-popup {
    position: absolute;
    bottom: 60px; 
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 35, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 8px;
    display: none; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 200;
    width: 140px;
}
.btn-popup {
    width: 100%; height: 36px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
}
.btn-popup:hover {
    background: var(--accent);
    color: white;
}
.btn-popup svg { width: 18px; height: 18px; }
#align-popup::after {
    content: ''; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
    border-left: 6px solid transparent; border-right: 6px solid transparent;
    border-top: 6px solid rgba(30, 30, 35, 0.95);
}
.tab-btn.active {
    color: white !important;
    border-bottom-color: var(--accent) !important;
    background: rgba(255,255,255,0.05) !important;
}
.layer-item {
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    padding: 8px 10px;
    background: #2A2A2F;
    border: 1px solid transparent;
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    position: relative;
}
.layer-item:hover { background: #35353A; }
.layer-item.active-layer {
    background: rgba(124, 58, 237, 0.2);
    border-color: var(--accent);
}
.layer-item.active-layer::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--accent); border-radius: 6px 0 0 6px;
}
.layer-info {
    display: flex; align-items: center; gap: 10px; flex: 1; overflow: hidden;
}
.layer-preview {
    width: 24px; height: 24px; 
    background: rgba(255,255,255,0.1); border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    color: #aaa;
}
.layer-preview svg { width: 14px; height: 14px; fill: currentColor; }
.layer-name { 
    font-size: 12px; color: #ddd; white-space: nowrap; 
    overflow: hidden; text-overflow: ellipsis; max-width: 110px;
}
.layer-actions {
    display: flex; gap: 4px; opacity: 0.2; transition: 0.2s;
}
.layer-item:hover .layer-actions, .layer-item.active-layer .layer-actions { opacity: 1; }
.btn-layer {
    width: 20px; height: 20px;
    background: transparent; border: none; color: #888; 
    cursor: pointer; border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
}
.btn-layer:hover { color: white; background: rgba(255,255,255,0.2); }
.btn-layer svg { width: 12px; height: 12px; fill: currentColor; }
.layer-locked-icon { color: #F59E0B !important; opacity: 1 !important; } 
.layer-hidden { opacity: 0.5; } 
.btn-layer.active-state { color: var(--accent); }
#editor-context-menu {
    position: fixed; 
    display: none; 
    z-index: 2147483647; 
    background: rgba(30, 30, 35, 0.98); 
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 6px;
    width: 220px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    flex-direction: column;
}
#editor-context-menu .ctx-item {
    display: flex; 
    align-items: center; 
    gap: 12px;
    padding: 10px 12px; 
    cursor: pointer; 
    color: #e0e0e0; 
    font-size: 13px;
    border-radius: 8px;
    transition: 0.1s;
}
#editor-context-menu .ctx-item:hover { 
    background: var(--accent); 
    color: white; 
    transform: translateX(2px);
}
#editor-context-menu .ctx-item svg { 
    width: 18px; 
    height: 18px; 
    fill: currentColor; 
    opacity: 0.8; 
}
#editor-context-menu .ctx-shortcut { 
    margin-left: auto; 
    font-size: 10px; 
    opacity: 0.5; 
    font-weight: bold;
    letter-spacing: 0.5px;
}
#editor-context-menu .ctx-divider { 
    height: 1px; 
    background: rgba(255,255,255,0.1); 
    margin: 6px 0; 
}
#editor-context-menu .ctx-item.delete:hover { 
    background: rgba(239, 68, 68, 0.2); 
    color: #ef4444; 
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.editor-popup-menu {
    display: none;
    position: absolute;
    top: 125%; 
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    background-color: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    z-index: 2000;
    padding: 6px;
    flex-direction: column;
    animation: fadeInMenu 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeInMenu {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.editor-popup-menu .popup-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-main);
    position: relative;
    overflow: hidden;
}


.editor-popup-menu .popup-item:hover {
    background-color: var(--item-hover);
    color: var(--accent);
    padding-left: 16px;
}

.editor-popup-menu .popup-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    opacity: 0.8;
}
.editor-popup-menu .popup-label {
    font-size: 13px;
    font-weight: 600;
}
.editor-popup-menu .popup-divider {
    height: 1px;
    background-color: var(--border);
    margin: 6px 0;
    opacity: 0.5;
}
.editor-popup-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; 
    height: 0; 
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--border);
}
.custom-popup-grid {
    position: absolute;
    bottom: 65px; 
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    display: none;
    gap: 8px;
    box-shadow: 0 10px 30px var(--shadow);
    z-index: 200;
    animation: slideUpFade 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes slideUpFade {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.custom-popup-grid::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; 
    height: 0; 
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--border);
}


.btn-popup {
    width: 100%;
    border-radius: 8px;
    background: var(--bg-input);
    border: 1px solid transparent;
    color: var(--text-muted);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-popup:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.3);
}
.publish-item-row:hover {
    border-color: var(--accent) !important;
    transform: translateX(5px);
    background: var(--item-hover) !important;
}
.card-action-btn.history:hover {
    color: var(--warning) !important;
    background: rgba(245, 158, 11, 0.15) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}
.custom-anim-wrapper[style*='cursor: pointer']:hover {
    background-color: rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2) !important;
    transform: scale(1.02);
    transition: all 0.2s ease-in-out;
    border-radius: 4px;
}
.upgrade-box {
    background: #1e1e24; 
    width: 400px;
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    animation: popUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popUp {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}


.btn-close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 30px; 
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}
.btn-close-modal:hover { background: rgba(255,255,255,0.2); }


.upgrade-icon-anim {
    font-size: 60px;
    margin-bottom: 15px;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.3));
    animation: floatIcon 3s ease-in-out infinite;
}
@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}


.upgrade-title {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px 0;
}
.upgrade-desc {
    font-size: 14px;
    color: #a1a1aa;
    line-height: 1.6;
    margin-bottom: 25px;
}
.upgrade-desc b { color: #fff; }




.box-pro {
    border-top: 4px solid #F59E0B;
}
.cta-pro {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}
.cta-pro:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
    transform: translateY(-2px);
}


.box-premium {
    border-top: 4px solid #7C3AED;
}
.cta-premium {
    background: linear-gradient(135deg, #7C3AED 0%, #DB2777 100%);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}
.cta-premium:hover {
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6);
    transform: translateY(-2px);
}


.btn-upgrade-cta {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}


.btn-later {
    background: none;
    border: none;
    color: #71717a;
    font-size: 13px;
    cursor: pointer;
    padding: 5px;
}
.btn-later:hover { color: #fff; }

.tool-btn, .action-btn, #btn-publish-project {
    position: relative !important;
    overflow: visible !important; 
}


.ui-badge {
    position: absolute;
    top: -8px;
    right: -5px;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 4px;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    line-height: 1;
    letter-spacing: 0.5px;
    animation: popBadge 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popBadge {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}


.ui-badge-pro {
    background: #F59E0B;
    color: #000;
    border: 1px solid #ffffff30;
}


.ui-badge-premium {
    background: linear-gradient(135deg, #7C3AED, #DB2777);
    color: #fff;
    border: 1px solid #ffffff30;
}
.ctx-disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(1);
}

.canvas-area.drag-active {
    border: 3px dashed #7C3AED !important;
    background-color: rgba(124, 58, 237, 0.05);
}

.segment-container {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 4px;
    gap: 5px;
    margin-top: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.segment-option {
    flex: 1;
    position: relative;
    cursor: pointer;
    text-align: center;
}

.segment-option input {
    display: none;
}

.segment-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: #aaa;
    transition: all 0.2s ease;
    font-weight: 500;
}


.segment-option:hover .segment-content {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}


.segment-option input:checked + .segment-content {
    background: #7C3AED;
    color: white;
    box-shadow: 0 2px 5px rgba(124, 58, 237, 0.4);
}


.segment-content svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    opacity: 0.8;
}


.range-inputs-row {
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.range-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    display: block;
}


.g-manager-header {
    background: linear-gradient(to right, #1e1e1e, #252525);
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 15px;
    align-items: center;
}

.g-preview-box {
    width: 50px;
    height: 50px;
    background: repeating-conic-gradient(#2a2a2a 0% 25%, #333 0% 50%) 50% / 10px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.g-stat-badge {
    background: rgba(124, 58, 237, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(124, 58, 237, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}


.g-list-container {
    background: #181818;
    max-height: 220px;
    overflow-y: auto;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.g-list-header {
    display: grid;
    grid-template-columns: 60px 1fr 1fr;
    padding: 10px 20px;
    background: #222;
    font-size: 10px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: sticky;
    top: 0;
}

.g-list-row {
    display: grid;
    grid-template-columns: 60px 1fr 1fr;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 13px;
    color: #ccc;
    transition: background 0.2s;
}

.g-list-row:hover {
    background: rgba(255,255,255,0.02);
}


.g-action-panel {
    background: #1e1e1e;
    padding: 20px;
}

.g-input-group {
    margin-bottom: 15px;
}

.g-label {
    display: block;
    font-size: 11px;
    color: #888;
    margin-bottom: 6px;
    font-weight: 500;
}

.g-input, .g-select {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    color: #eee;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s;
}

.g-input:focus, .g-select:focus {
    border-color: #7C3AED;
    background: #000;
    outline: none;
}


.shift-mode-active {
    border-color: #F59E0B !important;
    color: #F59E0B !important;
}

.has-submenu {
    position: relative;
    overflow: visible !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.has-submenu .submenu-arrow {
    width: 12px; 
    height: 12px; 
    opacity: 0.5; 
    margin-left: auto;
}


.ctx-submenu {
    display: none;
    position: absolute;
    
   
    left: 100%;
    top: -4px; 
    margin-left: -2px;
    
   
    min-width: 220px;
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    
   
    box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 2px 5px rgba(0,0,0,0.4);
    
    padding: 6px 0;
    z-index: 10000;
}


.has-submenu:hover > .ctx-submenu {
    display: block;
    animation: submenuSlideIn 0.15s cubic-bezier(0.2, 0, 0.2, 1);
}


@keyframes submenuSlideIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


.ctx-submenu .ctx-item {
    padding: 8px 16px;
    font-size: 13px;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.1s;
}

.ctx-submenu .ctx-item svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    opacity: 0.7;
}


.ctx-submenu .ctx-item:hover {
    background: #7C3AED;
    color: white;
}

.ctx-submenu .ctx-item:hover svg {
    opacity: 1;
}


.ctx-submenu .ctx-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 4px 0;
}

.ticket-item {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}
.ticket-item:hover, .ticket-item.active {
    background: rgba(124, 58, 237, 0.1);
    border-left: 3px solid #7C3AED;
}
.ticket-item.unread::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 8px;
    height: 8px;
    background: #EF4444;
    border-radius: 50%;
}


.chat-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}


.chat-bubble.me {
    align-self: flex-end;
    background: #7C3AED;
    color: white;
    border-bottom-right-radius: 2px;
}


.chat-bubble.other {
    align-self: flex-start;
    background: #333;
    color: #e0e0e0;
    border-bottom-left-radius: 2px;
}

.chat-meta {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 5px;
    display: block;
    text-align: right;
}

.chat-attachment {
    display: block;
    margin-top: 5px;
    max-width: 200px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.2);
}



#modal-ticketing .modal-box {
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    background: #121212;
    border: 1px solid rgba(255, 255, 255, 0.08);
}


.ticket-sidebar {
    background: #1a1a1a;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}


.btn-new-ticket {
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}
.btn-new-ticket:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
}
.ticket-item {
    padding: 15px;
    margin: 8px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s ease;
}

.ticket-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(3px);
}
.ticket-item.active {
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.3);
}
.ticket-item.unread::before {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: #EF4444;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}
.ticket-chat-area {
    background-color: #0f0f0f;
    background-image: radial-gradient(#222 1px, transparent 1px);
    background-size: 20px 20px; 
}
.chat-bubble {
    max-width: 75%;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.6;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.chat-bubble.me {
    align-self: flex-end;
    background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
    color: white;
    border-radius: 16px 16px 2px 16px;
}
.chat-bubble.other {
    align-self: flex-start;
    background: #2a2a2a;
    color: #e0e0e0;
    border-radius: 16px 16px 16px 2px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.chat-input-area {
    background: #1a1a1a;
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 10px;
    align-items: center;
}
.chat-input {
    background: #0f0f0f;
    border: 1px solid #333;
    border-radius: 24px;
    padding: 12px 20px;
    color: white;
    flex: 1;
    transition: border-color 0.2s;
}
.chat-input:focus {
    border-color: #7C3AED;
    outline: none;
}
.btn-send-chat {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #7C3AED;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}
.btn-send-chat:hover {
    transform: scale(1.1) rotate(-10deg);
}
.ticket-sidebar ::-webkit-scrollbar, 
#chat-messages::-webkit-scrollbar {
    width: 6px;
}
.ticket-sidebar ::-webkit-scrollbar-thumb,
#chat-messages::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}
.ticket-sidebar ::-webkit-scrollbar-track,
#chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #EF4444;
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #1e1e1e;
    z-index: 9999 !important;
    pointer-events: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
@keyframes pulse-red {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.pulse-animation {
    animation: pulse-red 2s infinite;
}
.gesture-box {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 200px;
    height: 150px;
    background: #000;
    border: 2px solid var(--accent);
    border-radius: 12px;
    overflow: hidden;
    z-index: 9999;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.input-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.gesture-status {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0,0,0,0.7);
    color: #00ff00;
    font-size: 10px;
    text-align: center;
    padding: 2px 0;
}
.top-icon-btn.active {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
}