    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    * { touch-action: manipulation; }

    :root {
      --bg:        #16161e;
      --surface:   #1e1e28;
      --surface-2: #282834;
      --surface-3: #33333f;
      --border:    #3d3d4d;
      --border-lt: #30303c;
      --text:      #ededf0;
      --text-2:    #d8d8e4;
      --muted:     #a8a8bc;
      --accent:    #e4d3ff;
      --accent-dk: #c4a8f0;
      --accent-bg: rgba(228,211,255,0.18);
      --green:     #10b981;
      --green-lt:  rgba(16,185,129,0.18);
      --red:       #ef4444;
      --red-lt:    rgba(239,68,68,0.18);
      --amber:     #f59e0b;
      --amber-lt:  rgba(245,158,11,0.18);
      --blue:      #60a5fa;
      --blue-lt:   rgba(96,165,250,0.18);
      --sidebar-w: 260px;
      --topbar-h:  64px;
      --radius:    12px;
      --shadow:    0 1px 3px rgba(0,0,0,.2), 0 4px 16px rgba(0,0,0,.12);
      --shadow-lg: 0 8px 32px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.2);
    }

    html, body { height: 100%; overflow: hidden; }
    body {
      font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
      background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6;
    }

    /* ── LOGIN ─────────────────────────────────────────── */
    #login-page {
      position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
      padding-bottom: 8vh; overflow: hidden; z-index: 9999;
      background: linear-gradient(-45deg, #12121a, #1a1a26, #14141c, #181824);
      background-size: 400% 400%;
      animation: login-gradient 12s ease infinite;
    }
    @keyframes login-gradient {
      0% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }
    .login-wrap { position: relative; z-index: 1; width: 100%; max-width: 420px; padding: 24px; }
    .login-logo {
      text-align: center; margin-bottom: 24px;
      animation: login-logo-in .8s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
    @keyframes login-logo-in {
      from { opacity: 0; transform: scale(0.9) translateY(-10px); }
      to { opacity: 1; transform: scale(1) translateY(0); }
    }
    .login-logo .logo-text {
      font-size: 28px; font-weight: 800; color: var(--text); letter-spacing: -0.5px;
    }
    .login-logo .logo-text span { color: var(--accent); }
    .login-logo .sub {
      font-size: 11px; color: var(--muted); letter-spacing: 3px;
      text-transform: uppercase; margin-top: 6px;
    }
    .login-card {
      background: rgba(30,30,40,0.88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
      border-radius: 20px; padding: 36px 32px;
      box-shadow: 0 32px 80px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
      animation: login-card-in .6s cubic-bezier(0.16, 1, 0.3, 1) .15s both;
    }
    @keyframes login-card-in {
      from { opacity: 0; transform: translateY(20px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .login-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 24px; color: var(--text); }
    .login-field { position: relative; margin-bottom: 20px; }
    .login-field input {
      width: 100%; padding: 24px 14px 10px;
      border: 1.5px solid var(--border); border-radius: 10px;
      font-size: 15px; font-family: inherit; color: var(--text); background: var(--surface);
      transition: border-color .2s, box-shadow .2s; outline: none;
    }
    .login-field input:focus {
      border-color: var(--accent); box-shadow: 0 0 0 3px rgba(228,211,255,0.1);
    }
    .login-field label {
      position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
      font-size: 14px; color: var(--muted); pointer-events: none;
      transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .login-field input:focus ~ label,
    .login-field input:not(:placeholder-shown) ~ label,
    .login-field input:-webkit-autofill ~ label {
      top: 8px; transform: translateY(0); font-size: 10px; font-weight: 700;
      color: var(--accent); letter-spacing: 0.5px; text-transform: uppercase;
    }
    .login-btn {
      width: 100%; padding: 13px; border-radius: 10px; font-size: 14px; font-weight: 600;
      cursor: pointer; border: none; background: var(--accent); color: #16161e;
      font-family: inherit; transition: all .2s;
    }
    .login-btn:hover { background: var(--accent-dk); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(228,211,255,0.25); }
    .login-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
    .login-error { color: var(--red); font-size: 13px; margin-bottom: 12px; display: none; }

    /* ── FORMS ─────────────────────────────────────────── */
    .field { margin-bottom: 16px; }
    .field label {
      display: block; font-size: 11px; font-weight: 700; color: var(--muted);
      margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.8px;
    }
    .field input, .field select, .field textarea {
      width: 100%; padding: 10px 14px;
      border: 1.5px solid var(--border); border-radius: 10px;
      font-size: 14px; font-family: inherit; color: var(--text); background: var(--surface);
      transition: border-color .15s, box-shadow .15s; outline: none;
    }
    .field input:focus, .field select:focus, .field textarea:focus {
      border-color: var(--accent); box-shadow: 0 0 0 3px rgba(228,211,255,0.08);
    }
    .field select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23777'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
    .field select option { background: var(--surface); color: var(--text); }
    .field input[type="date"] { cursor: pointer; color-scheme: dark; }
    .field textarea { min-height: 100px; resize: vertical; }
    .field-hint { font-size: 11px; color: var(--muted); margin-top: 4px; }

    /* ── BUTTONS ───────────────────────────────────────── */
    .btn {
      display: inline-flex; align-items: center; justify-content: center; gap: 6px;
      padding: 9px 18px; border-radius: 9px; font-size: 13px; font-weight: 600;
      cursor: pointer; border: none; transition: all .15s; white-space: nowrap;
      font-family: inherit; letter-spacing: 0.1px;
    }
    .btn-primary { background: var(--accent); color: #16161e; }
    .btn-primary:hover { background: var(--accent-dk); }
    .btn-success { background: var(--green); color: #fff; }
    .btn-success:hover { opacity: .9; }
    .btn-danger { background: var(--red-lt); color: var(--red); }
    .btn-danger:hover { background: var(--red); color: #fff; }
    .btn-ghost { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
    .btn-ghost:hover { background: var(--surface-3); }
    .btn-sm { padding: 7px 14px; font-size: 12px; }
    .btn:disabled { opacity: .5; cursor: not-allowed; }
    .btn svg { width: 14px; height: 14px; flex-shrink: 0; }

    /* ── LAYOUT ────────────────────────────────────────── */
    #app { display: none; height: 100%; width: 100%; }
    .sidebar {
      position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w);
      background: var(--surface); border-right: 1px solid var(--border);
      display: flex; flex-direction: column; z-index: 100;
    }
    .sidebar-logo {
      padding: 20px 24px; border-bottom: 1px solid var(--border);
      display: flex; align-items: center; gap: 10px;
    }
    .sidebar-logo .logo-text { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; }
    .sidebar-logo .logo-text span { color: var(--accent); }
    .sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; display: flex; flex-direction: column; }
    .nav-section-label {
      font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 1.5px;
      text-transform: uppercase; padding: 8px 12px 4px; margin-top: 8px;
    }
    .nav-section-label:first-child { margin-top: 0; }
    .nav-item {
      display: flex; align-items: center; gap: 10px; padding: 11px 14px;
      border-radius: 8px; cursor: pointer; color: var(--text-2); font-size: 14px; font-weight: 500;
      transition: all .15s; margin-bottom: 3px;
    }
    .nav-item:hover { background: var(--surface-2); color: var(--text); }
    .nav-item.active { background: var(--accent-bg); color: var(--accent); }
    .nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
    .nav-item.disabled { opacity: .35; cursor: default; pointer-events: none; }
    .nav-coming { font-size: 9px; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; margin-left: auto; }
    .sidebar-footer {
      padding: 16px 24px; border-top: 1px solid var(--border);
      display: flex; align-items: center; justify-content: space-between;
    }
    .sidebar-user { font-size: 12px; color: var(--muted); }
    .sidebar-logout { font-size: 12px; color: var(--muted); cursor: pointer; background: none; border: none; font-family: inherit; }
    .sidebar-logout:hover { color: var(--red); }

    .main {
      margin-left: var(--sidebar-w); height: 100%; display: flex; flex-direction: column; flex: 1; min-width: 0;
    }
    .topbar {
      height: var(--topbar-h); padding: 0 32px;
      display: flex; align-items: center; justify-content: space-between;
      border-bottom: 1px solid var(--border); background: var(--surface); flex-shrink: 0;
    }
    .topbar-left { display: flex; flex-direction: column; }
    .topbar-title { font-size: 18px; font-weight: 700; }
    .topbar-subtitle { font-size: 12px; color: var(--muted); }
    .topbar-actions { display: flex; gap: 8px; }
    #content {
      flex: 1; overflow-y: auto; padding: 24px 32px;
      scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
    }

    /* ── STATS ─────────────────────────────────────────── */
    .stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
    .stat-card {
      background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
      padding: 16px; display: flex; align-items: center; gap: 12px;
    }
    .stat-icon {
      width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    }
    .stat-icon svg { width: 18px; height: 18px; }
    .stat-icon.accent { background: var(--accent-bg); color: var(--accent); }
    .stat-icon.green { background: var(--green-lt); color: var(--green); }
    .stat-icon.amber { background: var(--amber-lt); color: var(--amber); }
    .stat-icon.blue { background: var(--blue-lt); color: var(--blue); }
    .stat-value { font-size: 24px; font-weight: 800; }
    .stat-label { font-size: 12px; color: var(--muted); font-weight: 500; }

    /* ── TOOLBAR ───────────────────────────────────────── */
    .toolbar {
      display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
    }
    .search-wrap {
      flex: 1; min-width: 200px; position: relative;
    }
    .search-wrap svg {
      position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
      width: 16px; height: 16px; color: var(--muted);
    }
    .search-input {
      width: 100%; padding: 9px 12px 9px 36px;
      border: 1.5px solid var(--border); border-radius: 9px;
      font-size: 13px; font-family: inherit; color: var(--text); background: var(--surface);
      outline: none; transition: border-color .15s;
    }
    .search-input:focus { border-color: var(--accent); }
    .filter-select {
      padding: 9px 32px 9px 12px;
      border: 1.5px solid var(--border); border-radius: 9px;
      font-size: 13px; font-family: inherit; color: var(--text); background: var(--surface);
      cursor: pointer; outline: none; appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23777'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
      background-repeat: no-repeat; background-position: right 10px center;
    }
    .filter-select option { background: var(--surface); color: var(--text); }

    /* ── CARDS ─────────────────────────────────────────── */
    .card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .blog-card {
      background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
      overflow: hidden; cursor: pointer; transition: all .2s;
    }
    .blog-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
    .blog-card-img {
      width: 100%; height: 180px; object-fit: cover; display: block; background: var(--surface-2);
    }
    .blog-card-body { padding: 16px; }
    .blog-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
    .blog-card-title { font-size: 16px; font-weight: 700; line-height: 1.4; }
    .blog-card-meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
    .blog-card-meta svg { width: 12px; height: 12px; }
    .blog-card-desc {
      font-size: 13px; color: var(--text-2); line-height: 1.5;
      display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .blog-card-badges { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

    /* ── BADGES ────────────────────────────────────────── */
    .badge {
      display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 6px;
      font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
    }
    .badge-published { background: var(--green-lt); color: var(--green); }
    .badge-draft { background: var(--amber-lt); color: var(--amber); }
    .badge-featured { background: var(--accent-bg); color: var(--accent); }
    .badge-tag {
      padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 600;
    }

    /* ── FORMS: SECTIONS ──────────────────────────────── */
    .form-section {
      background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
      padding: 24px; margin-bottom: 16px;
    }
    .form-section-title {
      font-size: 15px; font-weight: 700; margin-bottom: 16px;
      padding-bottom: 12px; border-bottom: 1px solid var(--border);
    }
    .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .form-actions {
      display: flex; align-items: center; justify-content: space-between;
      padding: 16px 0; gap: 8px; flex-wrap: wrap;
    }
    .form-actions-right { display: flex; gap: 8px; flex-wrap: wrap; }
    .back-link {
      display: inline-flex; align-items: center; gap: 6px;
      font-size: 13px; color: var(--muted); cursor: pointer; margin-bottom: 16px;
    }
    .back-link:hover { color: var(--text); }
    .back-link svg { width: 16px; height: 16px; }

    /* ── IMAGE SLOTS ──────────────────────────────────── */
    .image-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .image-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

    /* ── SOCIAL MEDIA ─────────────────────────────────── */
    .platform-toggles { display: flex; gap: 12px; margin-bottom: 16px; }
    .platform-toggle {
      display: flex; align-items: center; gap: 8px; padding: 10px 16px;
      border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer;
      transition: all .15s; font-size: 13px; font-weight: 500; color: var(--text-2);
    }
    .platform-toggle.active { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }
    .platform-toggle .dot { width: 10px; height: 10px; border-radius: 50%; }
    .dot-instagram { background: #E1306C; }
    .dot-facebook { background: #1877F2; }
    .dot-google { background: #34A853; }

    .platform-tabs { display: flex; gap: 4px; margin-bottom: 16px; }
    .platform-tab {
      padding: 8px 16px; border-radius: 8px; font-size: 12px; font-weight: 600;
      cursor: pointer; color: var(--muted); background: var(--surface-2);
      transition: all .15s; border: 1px solid transparent;
    }
    .platform-tab.active { color: var(--text); background: var(--surface-3); border-color: var(--border); }

    .post-preview {
      background: #000; border-radius: 12px; overflow: hidden; max-width: 400px;
    }
    .post-preview-header {
      display: flex; align-items: center; gap: 10px; padding: 12px 14px;
    }
    .post-preview-avatar {
      width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3);
      display: flex; align-items: center; justify-content: center; overflow: hidden;
    }
    .post-preview-avatar img { width: 100%; height: 100%; object-fit: cover; }
    .post-preview-username { font-size: 13px; font-weight: 600; color: #fff; }
    .post-preview-image { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
    .post-preview-caption { padding: 12px 14px; font-size: 13px; color: #fff; line-height: 1.5; }
    .post-preview-caption strong { font-weight: 600; }

    .feed-grid {
      display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
      max-width: 500px; margin: 0 auto;
    }
    .feed-grid-item {
      aspect-ratio: 4/5; overflow: hidden; cursor: pointer; position: relative;
      background: var(--surface-2);
    }
    .feed-grid-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .feed-grid-item.dragging { opacity: 0.4; }
    .feed-grid-item .drag-handle {
      position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.6);
      color: #fff; border-radius: 4px; padding: 2px 6px; font-size: 10px;
      opacity: 0; transition: opacity .2s;
    }
    .feed-grid-item:hover .drag-handle { opacity: 1; }
    .bulk-feed-cell { position:relative; cursor:pointer; overflow:hidden; }
    .bulk-feed-cell img { transition:filter .15s, opacity .15s; }
    .bulk-feed-new { box-shadow:inset 0 0 0 2px var(--accent); z-index:1; }
    .img-crop-container:hover > div:last-child { opacity: .8 !important; }
    .img-crop-container:active { cursor: grabbing !important; }
    .img-crop-container:active > div:last-child { opacity: 0 !important; }
    .bulk-feed-existing { opacity:.45; cursor:default; }
    .bulk-feed-existing img { filter:brightness(.85); }
    .bulk-feed-unapproved { opacity:.35; }
    .bulk-feed-unapproved img { filter:grayscale(.8); }
    .bulk-feed-deselected-badge {
      position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
      width:28px; height:28px; border-radius:50%; background:rgba(0,0,0,.6);
      color:#fff; font-size:14px; display:flex; align-items:center; justify-content:center;
    }
    .bulk-feed-order-badge {
      position:absolute; bottom:6px; right:6px; min-width:20px; height:20px; border-radius:10px;
      background:var(--accent); color:#fff; font-size:10px; font-weight:700;
      display:flex; align-items:center; justify-content:center; padding:0 5px;
    }
    .bulk-feed-placeholder { opacity:.2; }
    .bulk-feed-placeholder img { visibility:hidden; }
    .bulk-feed-placeholder::after {
      content:''; position:absolute; inset:0; border:2px dashed var(--accent);
      background:rgba(228,211,255,.06);
    }
    .bulk-feed-ghost { border-radius:4px; overflow:hidden; }

    .ai-variations { display: flex; flex-direction: column; gap: 12px; }
    .ai-variation-card {
      background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
      padding: 16px; position: relative;
    }
    .ai-variation-card.selected { border-color: var(--accent); background: var(--accent-bg); }
    .ai-variation-text { font-size: 13px; line-height: 1.6; color: var(--text); white-space: pre-wrap; }
    .ai-variation-actions { display: flex; gap: 8px; margin-top: 12px; }
    .ai-edit-input {
      width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 10px;
      font-size: 13px; font-family: inherit; color: var(--text); background: var(--surface);
      outline: none; margin-top: 8px;
    }
    .ai-edit-input:focus { border-color: var(--accent); }

    .char-count { font-size: 11px; color: var(--muted); text-align: right; margin-top: 4px; }
    .char-count.warning { color: var(--amber); }
    .char-count.over { color: var(--red); }

    .accounts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
    .account-card {
      background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
      padding: 16px; display: flex; align-items: center; gap: 12px;
    }
    .account-card-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--surface-2); flex-shrink: 0; }
    .account-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
    .account-card-info { flex: 1; }
    .account-card-name { font-size: 14px; font-weight: 600; }
    .account-card-platform { font-size: 11px; color: var(--muted); text-transform: capitalize; }

    .connect-btns { display: flex; gap: 12px; margin-bottom: 20px; }
    .connect-btn {
      display: flex; align-items: center; gap: 8px; padding: 10px 20px;
      border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer;
      border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
      transition: all .15s; font-family: inherit;
    }
    .connect-btn:hover { border-color: var(--accent); background: var(--accent-bg); }

    .social-sub-nav { display: flex; gap: 4px; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
    .social-sub-nav-item {
      padding: 8px 16px; border-radius: 8px; font-size: 12px; font-weight: 600;
      cursor: pointer; color: var(--muted); transition: all .15s;
    }
    .social-sub-nav-item.active { color: var(--text); background: var(--surface-3); }

    /* ── KANBAN BOARD ────────────────────────────────── */
    .kanban-board {
      display: flex; gap: 14px; min-height: calc(100vh - 280px);
      overflow-x: auto; padding-bottom: 16px;
    }
    .kanban-column {
      flex: 0 0 280px; background: var(--surface); border: 1px solid var(--border);
      border-radius: 12px; display: flex; flex-direction: column;
      max-height: calc(100vh - 280px); min-height: 200px;
    }
    .kanban-column-header {
      padding: 12px 14px; border-bottom: 1px solid var(--border);
      display: flex; align-items: center; justify-content: space-between;
    }
    .kanban-column-body {
      flex: 1; overflow-y: auto; padding: 8px; display: flex;
      flex-direction: column; gap: 8px;
    }
    .kanban-add-btn {
      background: none; border: none; color: var(--muted); cursor: pointer;
      padding: 4px; border-radius: 6px; transition: all .15s;
      display: flex; align-items: center; justify-content: center;
    }
    .kanban-add-btn:hover { background: var(--surface-2); color: var(--text); }
    .kanban-empty { text-align: center; padding: 20px 8px; color: var(--muted); font-size: 12px; }
    .kanban-quick-add { padding: 8px; background: var(--surface-2); border-radius: 8px; margin-bottom: 4px; }
    .kanban-quick-input {
      width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
      padding: 8px 10px; color: var(--text); font-size: 12px; font-family: inherit;
    }
    .kanban-quick-input:focus { border-color: var(--accent); outline: none; }

    /* ── TASK CARD ────────────────────────────────────── */
    .task-card {
      background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
      padding: 12px; cursor: pointer; transition: all .15s; user-select: none;
    }
    .task-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.15); }
    .task-card { transition: transform 0.15s ease, opacity 0.15s ease; cursor: grab; }
    .task-card:active { cursor: grabbing; }
    .task-drag-ghost {
      position: fixed; z-index: 9999; pointer-events: none;
      opacity: 0.92; box-shadow: 0 12px 32px rgba(0,0,0,.35);
      transition: none; cursor: grabbing;
    }
    .task-drag-placeholder {
      border: 2px dashed var(--accent) !important; background: rgba(228,211,255,.04) !important;
      opacity: 1;
    }
    .task-drag-placeholder > * { visibility: hidden; }
    .kanban-column.drag-over { background: rgba(228,211,255,.03); border-color: var(--accent); }
    .task-card-top { display: flex; align-items: flex-start; gap: 8px; }
    .task-card-top > div:first-child { margin-top: 5px; }
    .task-card-title { font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .task-card-client { font-size: 10px; color: var(--muted); margin-top: 4px; padding-left: 16px; }
    .task-card-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; padding-left: 16px; }
    .task-card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-left: 16px; }
    .task-card-meta-left { display: flex; align-items: center; gap: 8px; }
    .task-card-check { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; color: var(--muted); }
    .task-card-assignee { flex-shrink: 0; }
    .task-card-move-mobile { display: none; }
    @media (max-width: 768px) {
      .task-card-move-mobile {
        display: block; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border);
      }
      .task-card-move-mobile select {
        width: 100%; background: var(--surface); border: 1px solid var(--border);
        border-radius: 6px; padding: 4px 8px; color: var(--muted); font-size: 11px;
        font-family: inherit; cursor: pointer;
      }
      .kanban-board { flex-direction: column; }
      .kanban-column { flex: none; width: 100%; max-height: none; }
    }

    /* ── TASK DETAIL PANEL ────────────────────────────── */
    .task-detail-backdrop {
      position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 8400;
      opacity: 0; transition: opacity .3s; pointer-events: auto;
    }
    .task-detail-backdrop.open { opacity: 1; }
    .task-detail-panel {
      position: fixed; top: 0; right: 0; bottom: 0; width: 680px; max-width: 100%;
      background: var(--surface); border-left: 1px solid var(--border); z-index: 8500;
      overflow-y: auto; transform: translateX(100%);
      transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1);
      box-shadow: -8px 0 32px rgba(0,0,0,.3);
    }
    .task-detail-panel.open { transform: translateX(0); }
    .task-detail-header {
      display: flex; align-items: center; gap: 8px; padding: 16px 20px;
      border-bottom: 1px solid var(--border); position: sticky; top: 0;
      background: var(--surface); z-index: 1;
    }
    .task-detail-close {
      background: none; border: none; color: var(--muted); cursor: pointer;
      padding: 4px; border-radius: 6px; transition: all .15s;
    }
    .task-detail-close:hover { color: var(--text); background: var(--surface-2); }
    .task-detail-body { padding: 20px; }
    .task-detail-title {
      font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 20px;
      outline: none; min-height: 1.4em; line-height: 1.3;
      border-bottom: 2px solid transparent; transition: border-color .15s;
    }
    .task-detail-title:focus { border-bottom-color: var(--accent); }
    .task-detail-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
    .task-detail-field { display: flex; flex-direction: column; gap: 4px; }
    .task-detail-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
    .task-detail-select {
      background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
      padding: 7px 10px; color: var(--text); font-size: 13px; font-family: inherit; cursor: pointer;
    }
    .task-detail-select:focus { border-color: var(--accent); outline: none; }
    .task-detail-section { margin-bottom: 20px; }
    .task-detail-section-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
    .task-detail-textarea {
      width: 100%; background: var(--surface-2); border: 1px solid var(--border);
      border-radius: 8px; padding: 10px 12px; color: var(--text); font-size: 13px;
      font-family: inherit; resize: vertical;
    }
    .task-detail-textarea:focus { border-color: var(--accent); outline: none; }

    /* ── CHECKLIST & ATTACHMENTS ──────────────────────── */
    .task-checklist-item {
      display: flex; align-items: center; gap: 8px; padding: 6px 0;
      font-size: 13px; color: var(--text);
    }
    .task-checklist-item input[type="checkbox"] { accent-color: var(--accent); cursor: pointer; }
    .task-checklist-remove {
      background: none; border: none; color: var(--muted); cursor: pointer;
      font-size: 14px; padding: 0 4px; opacity: 0; transition: opacity .15s;
    }
    .task-checklist-item:hover .task-checklist-remove,
    .task-attachment-item:hover .task-checklist-remove { opacity: 1; }
    .task-attachment-item {
      display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px;
    }

    /* ── COMMENTS & ACTIVITY ─────────────────────────── */
    .task-detail-tab {
      padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 600;
      cursor: pointer; color: var(--muted); background: none; border: none; font-family: inherit;
      transition: all .15s;
    }
    .task-detail-tab.active { color: var(--text); background: var(--surface-2); }
    .task-comment-input { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
    .task-comment-input textarea {
      width: 100%; background: var(--surface-2); border: 1px solid var(--border);
      border-radius: 8px; padding: 10px 12px; color: var(--text); font-size: 13px;
      font-family: inherit; resize: none;
    }
    .task-comment-input textarea:focus { border-color: var(--accent); outline: none; }
    .task-comment { padding: 12px 0; border-bottom: 1px solid var(--border); }
    .task-comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
    .task-comment-body { font-size: 13px; color: var(--text); line-height: 1.5; padding-left: 32px; }
    .task-activity-list { display: flex; flex-direction: column; }
    .task-activity-item {
      display: flex; align-items: center; gap: 6px; padding: 8px 0;
      border-bottom: 1px solid var(--border);
    }

    /* ── TASK LIST VIEW ──────────────────────────────── */
    .task-list-table { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
    .task-list-header {
      display: flex; padding: 10px 16px; border-bottom: 1px solid var(--border);
      font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px;
    }
    .task-list-row {
      display: flex; align-items: center; padding: 10px 16px; cursor: pointer;
      transition: background .1s; border-bottom: 1px solid var(--border);
    }
    .task-list-row:last-child { border-bottom: none; }
    .task-list-row:hover { background: var(--surface-2); }
    .task-list-col { font-size: 13px; }
    .task-col-priority { width: 50px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
    .task-col-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; overflow: hidden; }
    .task-col-status { width: 110px; flex-shrink: 0; }
    .task-col-assignee { width: 130px; flex-shrink: 0; }
    .task-col-client { width: 110px; flex-shrink: 0; }
    .task-col-due { width: 80px; flex-shrink: 0; }

    /* ── LABEL DROPDOWN ──────────────────────────────── */
    .task-label-dropdown {
      position: absolute; top: 100%; left: 0; z-index: 100;
      background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
      padding: 8px; min-width: 180px; box-shadow: 0 8px 24px rgba(0,0,0,.3);
      margin-top: 4px;
    }
    .task-label-option {
      display: flex; align-items: center; gap: 8px; padding: 6px 8px;
      border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600;
      transition: background .1s;
    }
    .task-label-option:hover { background: var(--surface-2); }

    @media (max-width: 768px) {
      .task-detail-panel { width: 100%; }
      .task-detail-fields { grid-template-columns: 1fr; }
      .task-list-header { display: none; }
      .task-list-row { flex-wrap: wrap; gap: 8px; }
      .task-col-assignee, .task-col-client { display: none; }
      .task-col-status { width: auto; }
      .task-col-due { width: auto; }
    }

    /* ── CALENDAR ─────────────────────────────────────── */
    .cal-month-grid {
      display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--border);
      border-radius: 12px; overflow: hidden; background: var(--surface);
    }
    .cal-day-header {
      padding: 10px; text-align: center; font-size: 11px; font-weight: 600;
      color: var(--muted); text-transform: uppercase; letter-spacing: .5px;
      border-bottom: 1px solid var(--border); background: var(--surface);
    }
    .cal-day-cell {
      min-height: 100px; padding: 6px; border-right: 1px solid var(--border);
      border-bottom: 1px solid var(--border); cursor: pointer;
      transition: background .1s;
    }
    .cal-day-cell:nth-child(7n) { border-right: none; }
    .cal-day-cell:hover { background: var(--surface-2); }
    .cal-today { background: rgba(228,211,255,.04) !important; }
    .cal-other-month { opacity: .35; }
    .cal-day-number { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
    .cal-today-num {
      color: white !important; font-weight: 800 !important;
      background: var(--accent); width: 26px; height: 26px; border-radius: 50%;
      display: inline-flex; align-items: center; justify-content: center;
    }
    .cal-today .cal-day-number { color: var(--accent); font-weight: 800; }
    .cal-day-events { display: flex; flex-direction: column; gap: 2px; }
    .cal-event-pill {
      font-size: 10px; padding: 2px 6px; border-radius: 4px;
      background: var(--surface-2); overflow: hidden; text-overflow: ellipsis;
      white-space: nowrap; cursor: pointer; transition: background .1s;
    }
    .cal-event-pill:hover { background: var(--surface-3); }

    /* Week view */
    .cal-week-container { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
    .cal-week-header-row { display: flex; border-bottom: 1px solid var(--border); }
    .cal-time-gutter-header { width: 60px; flex-shrink: 0; }
    .cal-week-day-header { flex: 1; padding: 8px; text-align: center; border-left: 1px solid var(--border); }
    .cal-today-header { background: rgba(228,211,255,.06); }
    .cal-week-body { display: flex; position: relative; overflow-y: auto; }
    .cal-time-gutter { width: 60px; flex-shrink: 0; position: relative; }
    .cal-time-label { position: absolute; right: 8px; font-size: 10px; color: var(--muted); transform: translateY(-6px); }
    .cal-week-day-col { flex: 1; position: relative; border-left: 1px solid var(--border); cursor: pointer; }
    .cal-today-col { background: rgba(228,211,255,.03); }
    .cal-hour-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); }
    .cal-event-block {
      position: absolute; left: 2px; right: 2px; border-radius: 6px; padding: 4px 6px;
      overflow: hidden; cursor: pointer; z-index: 1; transition: box-shadow .15s;
    }
    .cal-event-block:hover { box-shadow: 0 2px 8px rgba(0,0,0,.2); z-index: 2; }

    /* Day view */
    .cal-day-container { position: relative; }
    .cal-day-hour-row {
      position: absolute; left: 60px; right: 0; border-top: 1px solid var(--border); cursor: pointer;
    }
    .cal-day-hour-row:hover { background: rgba(228,211,255,.02); }
    .cal-time-label-day { position: absolute; left: -60px; width: 52px; text-align: right; font-size: 11px; color: var(--muted); transform: translateY(-7px); }
    .cal-day-event-block {
      position: absolute; left: 68px; right: 16px; border-radius: 10px; padding: 12px 14px;
      cursor: pointer; transition: box-shadow .15s; z-index: 1;
    }
    .cal-day-event-block:hover { box-shadow: 0 4px 16px rgba(0,0,0,.2); z-index: 2; }

    .cal-suggestion:hover { background: var(--surface-2); }
    .meeting-expanded { max-height: 2000px !important; }
    .meeting-full-notes { cursor: pointer; }

    @media (max-width: 768px) {
      .cal-month-grid { font-size: 11px; }
      .cal-day-cell { min-height: 60px; padding: 4px; }
      .cal-week-container { overflow-x: auto; }
      .cal-day-event-block { left: 8px; right: 8px; }
    }

    /* ── CLIENT SETTINGS ─────────────────────────────── */
    .client-tabs { display: flex; gap: 4px; margin-bottom: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
    .client-tab {
      padding: 8px 20px; border-radius: 8px; font-size: 13px; font-weight: 600;
      cursor: pointer; color: var(--muted); transition: all .15s;
    }
    .client-tab.active { color: var(--text); background: var(--surface-3); }
    .logo-upload-area {
      width: 120px; height: 120px; border-radius: 16px; border: 2px dashed var(--border);
      display: flex; align-items: center; justify-content: center; flex-direction: column;
      cursor: pointer; transition: all .2s; background: var(--surface-2); overflow: hidden; position: relative;
    }
    .logo-upload-area:hover { border-color: var(--accent); background: var(--accent-bg); }
    .logo-upload-area img { width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0; }
    .logo-upload-area .logo-placeholder { color: var(--muted); font-size: 11px; text-align: center; line-height: 1.4; }
    .logo-upload-area .logo-placeholder svg { display: block; margin: 0 auto 6px; opacity: .4; }

    /* ── GENERATE ─────────────────────────────────────── */
    .gen-spinner {
      display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3);
      border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; vertical-align: middle;
    }
    .gen-pulse-ring {
      width: 64px; height: 64px; margin: 0 auto; border-radius: 50%;
      border: 3px solid var(--accent); opacity: .6;
      animation: gen-pulse 1.5s ease-in-out infinite;
    }
    @keyframes gen-pulse {
      0%, 100% { transform: scale(0.9); opacity: 0.4; }
      50% { transform: scale(1.1); opacity: 1; }
    }
    .gen-progress-bar {
      width: 200px; height: 4px; background: var(--surface-2); border-radius: 2px;
      overflow: hidden; margin: 0 auto;
    }
    .gen-progress-fill {
      height: 100%; width: 30%; background: var(--accent); border-radius: 2px;
      animation: gen-progress 2s ease-in-out infinite;
    }
    @keyframes gen-progress {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(430%); }
    }

    /* ── BULK CREATOR ─────────────────────────────────── */
    .bulk-step-bar { display: flex; gap: 0; margin-bottom: 24px; position: relative; }
    .bulk-step-bar::before { content:''; position:absolute; top:16px; left:40px; right:40px; height:2px; background:var(--border); z-index:0; }
    .bulk-step { flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; position:relative; z-index:1; }
    .bulk-step-num { width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; border:2px solid var(--border); background:var(--surface); color:var(--muted); transition:all .2s; }
    .bulk-step.active .bulk-step-num { border-color:var(--accent); background:var(--accent); color:#fff; }
    .bulk-step.done .bulk-step-num { border-color:var(--green); background:var(--green); color:#fff; }
    .bulk-step-label { font-size:11px; font-weight:600; color:var(--muted); }
    .bulk-step.active .bulk-step-label { color:var(--text); }
    .bulk-step.done .bulk-step-label { color:var(--green); }

    .bulk-drop-zone {
      border:2px dashed var(--border); border-radius:16px; padding:48px 24px; text-align:center;
      cursor:pointer; transition:all .2s; min-height:200px; display:flex; flex-direction:column;
      align-items:center; justify-content:center; gap:12px; margin-bottom:20px;
    }
    .bulk-drop-zone:hover, .bulk-drop-zone.drag-over { border-color:var(--accent); background:var(--accent-bg); }
    .bulk-drop-zone-icon { color:var(--muted); opacity:.5; }
    .bulk-drop-zone-text { font-size:14px; color:var(--muted); }
    .bulk-drop-zone-sub { font-size:12px; color:var(--muted); opacity:.6; }

    .bulk-thumb-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:12px; margin-bottom:20px; }
    .bulk-thumb-card {
      position:relative; border-radius:12px; overflow:hidden; border:1px solid var(--border);
      background:var(--surface-2); transition:all .15s;
    }
    .bulk-thumb-card img { width:100%; aspect-ratio:1; object-fit:cover; display:block; }
    .bulk-thumb-remove {
      position:absolute; top:6px; right:6px; width:24px; height:24px; border-radius:50%;
      background:rgba(0,0,0,.7); color:#fff; border:none; cursor:pointer; font-size:12px;
      display:flex; align-items:center; justify-content:center; opacity:0; transition:opacity .15s;
    }
    .bulk-thumb-card:hover .bulk-thumb-remove { opacity:1; }
    .bulk-thumb-note { padding:6px 8px; font-size:11px; }
    .bulk-thumb-note a { color:var(--accent); text-decoration:none; font-size:11px; }
    .bulk-thumb-note input {
      width:100%; padding:4px 6px; border:1px solid var(--border); border-radius:6px;
      font-size:11px; background:var(--surface); color:var(--text); font-family:inherit;
    }
    .bulk-thumb-uploading { pointer-events:none; }
    .bulk-thumb-skeleton {
      width:100%; aspect-ratio:1; background:var(--surface-2); position:relative; overflow:hidden;
    }
    .bulk-thumb-shimmer {
      position:absolute; inset:0;
      background:linear-gradient(90deg, transparent 0%, rgba(255,255,255,.04) 50%, transparent 100%);
      animation:shimmer 1.5s infinite;
    }
    @keyframes shimmer { 0% { transform:translateX(-100%); } 100% { transform:translateX(100%); } }

    .bulk-progress-item {
      display:flex; align-items:center; gap:12px; padding:12px; background:var(--surface-2);
      border-radius:10px; margin-bottom:8px;
    }
    .bulk-progress-thumb { width:48px; height:48px; border-radius:8px; object-fit:cover; flex-shrink:0; }
    .bulk-progress-status { font-size:12px; font-weight:600; }
    .bulk-progress-status.pending { color:var(--muted); }
    .bulk-progress-status.generating { color:var(--accent); }
    .bulk-progress-status.complete { color:var(--green); }
    .bulk-progress-status.failed { color:var(--red); }
    .bulk-progress-bar { height:4px; background:var(--border); border-radius:2px; overflow:hidden; margin-bottom:20px; }
    .bulk-progress-fill { height:100%; background:var(--accent); border-radius:2px; transition:width .3s; }
    .bulk-progress-indeterminate { width:40%; animation:indeterminate 1.5s ease-in-out infinite; }
    @keyframes indeterminate { 0% { margin-left:0; width:30%; } 50% { margin-left:35%; width:40%; } 100% { margin-left:70%; width:30%; } }

    .bulk-review-card {
      display:flex; gap:16px; padding:16px; background:var(--surface-2); border:1px solid var(--border);
      border-radius:12px; margin-bottom:10px; transition:all .15s; cursor:grab; position:relative;
    }
    .bulk-review-card.dragging { opacity:.4; }
    .bulk-review-card.drag-over-card { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-bg); }
    .bulk-review-card.unapproved { opacity:.5; }
    .bulk-review-img { width:140px; height:140px; border-radius:10px; object-fit:cover; flex-shrink:0; }
    .bulk-review-content { flex:1; min-width:0; }
    .bulk-review-caption {
      font-size:13px; line-height:1.6; color:var(--text); white-space:pre-wrap; word-break:break-word;
      max-height:120px; overflow-y:auto; margin-bottom:8px;
    }
    .bulk-review-caption-edit {
      width:100%; min-height:80px; padding:8px 10px; border:1.5px solid var(--accent); border-radius:8px;
      font-size:13px; line-height:1.6; font-family:inherit; color:var(--text); background:var(--surface);
      resize:vertical; outline:none;
    }
    .bulk-review-actions { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
    .bulk-review-check {
      width:20px; height:20px; border-radius:6px; border:2px solid var(--border); cursor:pointer;
      display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:all .15s;
      background:transparent; color:transparent; font-size:12px;
    }
    .bulk-review-check.checked { border-color:var(--green); background:var(--green); color:#fff; }
    .bulk-review-drag { cursor:grab; color:var(--muted); padding:4px; display:flex; align-items:center; }

    .bulk-sticky-bar {
      position:fixed; bottom:0; left:var(--sidebar-w, 240px); right:0;
      background:var(--surface); border-top:1px solid var(--border);
      padding:14px 24px; display:flex; align-items:center; justify-content:space-between;
      z-index:100;
    }
    @media (max-width:768px) { .bulk-sticky-bar { left:0; bottom:60px; } }
    .bulk-sticky-count { font-size:13px; color:var(--muted); font-weight:600; }

    .bulk-timeline { display:flex; flex-direction:column; gap:8px; margin:20px 0; }
    .bulk-timeline-item {
      display:flex; align-items:center; gap:12px; padding:10px 14px; background:var(--surface-2);
      border-radius:10px; font-size:13px;
    }
    .bulk-timeline-thumb { width:36px; height:36px; border-radius:6px; object-fit:cover; flex-shrink:0; }
    .bulk-timeline-date { font-weight:600; color:var(--text); min-width:140px; }
    .bulk-timeline-caption { color:var(--muted); flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

    .bulk-schedule-toggle { display:flex; gap:0; border:1px solid var(--border); border-radius:8px; overflow:hidden; margin-bottom:16px; }
    .bulk-schedule-opt {
      flex:1; padding:10px 16px; font-size:12px; font-weight:600; text-align:center; cursor:pointer;
      background:var(--surface); color:var(--muted); transition:all .15s; border:none; font-family:inherit;
    }
    .bulk-schedule-opt.active { background:var(--accent); color:#fff; }

    .batch-image-row {
      display: flex; align-items: center; gap: 12px; padding: 12px;
      background: var(--surface-2); border-radius: 10px; margin-bottom: 8px;
    }
    .batch-image-thumb { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; }
    .batch-image-info { flex: 1; }
    .image-slot {
      border: 2px dashed var(--border); border-radius: var(--radius);
      padding: 16px; text-align: center; position: relative; min-height: 160px;
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      transition: border-color .2s; cursor: pointer;
    }
    .image-slot:hover { border-color: var(--accent); }
    .image-slot.has-image { border-style: solid; padding: 0; overflow: hidden; }
    .image-slot img { width: 100%; height: 160px; object-fit: cover; display: block; }
    .image-slot-label { font-size: 12px; color: var(--muted); margin-top: 8px; }
    .image-slot-icon { color: var(--muted); margin-bottom: 4px; }
    .image-slot-remove {
      position: absolute; top: 8px; right: 8px;
      width: 28px; height: 28px; border-radius: 50%;
      background: rgba(0,0,0,0.7); color: #fff; border: none;
      cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center;
      opacity: 0; transition: opacity .2s;
    }
    .image-slot:hover .image-slot-remove { opacity: 1; }

    /* ── TOGGLE ────────────────────────────────────────── */
    .toggle-wrap { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
    .toggle {
      width: 44px; height: 24px; border-radius: 12px; background: var(--border);
      position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0;
    }
    .toggle.on { background: var(--accent); }
    .toggle::after {
      content: ''; position: absolute; top: 2px; left: 2px;
      width: 20px; height: 20px; border-radius: 50%; background: #fff;
      transition: transform .2s;
    }
    .toggle.on::after { transform: translateX(20px); }
    .toggle-label { font-size: 13px; color: var(--text-2); }

    /* ── COLOR SWATCHES ───────────────────────────────── */
    .swatch-row { display: flex; gap: 8px; flex-wrap: wrap; }
    .swatch {
      width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
      border: 2px solid transparent; transition: all .15s;
    }
    .swatch.active { border-color: var(--text); transform: scale(1.1); }
    .swatch:hover { transform: scale(1.1); }

    /* ── RICH TEXT EDITOR ──────────────────────────────── */
    .rte-toolbar {
      display: flex; flex-wrap: wrap; gap: 2px; padding: 8px;
      background: var(--surface-2); border: 1.5px solid var(--border);
      border-bottom: none; border-radius: 10px 10px 0 0;
    }
    .rte-btn {
      width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
      border: none; background: none; color: var(--text-2); border-radius: 6px;
      cursor: pointer; font-size: 13px; font-family: inherit; transition: all .15s;
    }
    .rte-btn:hover { background: var(--surface-3); color: var(--text); }
    .rte-sep { width: 1px; background: var(--border); margin: 4px 4px; }
    .rte-editor {
      border: 1.5px solid var(--border); border-top: 1px solid var(--border);
      border-radius: 0 0 10px 10px; padding: 16px; min-height: 300px;
      font-size: 14px; line-height: 1.7; color: var(--text); background: var(--surface);
      outline: none; overflow-y: auto;
    }
    .rte-editor:focus { border-color: var(--accent); }
    .rte-editor h1, .rte-editor h2, .rte-editor h3, .rte-editor h4, .rte-editor h5, .rte-editor h6 { margin: 16px 0 8px; font-weight: 700; }
    .rte-editor h1 { font-size: 28px; }
    .rte-editor h2 { font-size: 22px; }
    .rte-editor h3 { font-size: 18px; }
    .rte-editor p { margin: 8px 0; }
    .rte-editor ul, .rte-editor ol { margin: 8px 0; padding-left: 24px; }
    .rte-editor li { margin: 4px 0; }
    .rte-editor blockquote { border-left: 3px solid var(--accent); padding-left: 16px; margin: 12px 0; color: var(--muted); }
    .rte-editor img { max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; }
    .rte-editor pre { background: var(--surface-2); border-radius: 8px; padding: 16px; overflow-x: auto; margin: 12px 0; }
    .rte-editor code { font-family: 'SF Mono', Monaco, monospace; font-size: 13px; }
    .rte-editor.drag-over { border-color: var(--accent); background: var(--accent-bg); }

    /* ── EMPTY STATE ───────────────────────────────────── */
    .empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
    .empty-state svg { width: 48px; height: 48px; margin-bottom: 16px; opacity: .4; }
    .empty-state h3 { font-size: 16px; color: var(--text-2); margin-bottom: 8px; }
    .empty-state p { font-size: 13px; }

    /* ── TOAST ─────────────────────────────────────────── */
    #toast {
      position: fixed; top: 20px; right: 20px; z-index: 10000;
      display: flex; flex-direction: column; gap: 8px;
    }
    .toast-item {
      padding: 12px 20px; border-radius: 10px; font-size: 13px; font-weight: 500;
      box-shadow: var(--shadow-lg); animation: toast-in .3s ease;
      display: flex; align-items: center; gap: 8px;
    }
    .toast-item.success { background: var(--green); color: #fff; }
    .toast-item.error { background: var(--red); color: #fff; }
    .toast-item.info { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
    @keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

    /* ── MODAL ─────────────────────────────────────────── */
    .modal-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
      display: flex; align-items: center; justify-content: center; z-index: 9000;
      animation: modal-bg-in .2s ease;
    }
    @keyframes modal-bg-in { from { opacity: 0; } to { opacity: 1; } }
    .modal-box {
      background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
      padding: 28px; max-width: 420px; width: 90%; box-shadow: var(--shadow-lg);
      animation: modal-box-in .25s cubic-bezier(0.16, 1, 0.3, 1);
    }
    @keyframes modal-box-in { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
    .modal-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
    .modal-text { font-size: 13px; color: var(--muted); margin-bottom: 20px; line-height: 1.6; }
    .modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

    /* ── LOADING ───────────────────────────────────────── */
    #loading-overlay {
      position: fixed; inset: 0; background: rgba(10,10,10,0.5); backdrop-filter: blur(2px);
      display: none; align-items: center; justify-content: center; z-index: 8000;
    }
    .spinner {
      width: 36px; height: 36px; border: 3px solid var(--border);
      border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    .spin-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--accent); animation:pulse-dot 1s ease-in-out infinite; }
    @keyframes pulse-dot { 0%,100% { opacity:.3; transform:scale(.8); } 50% { opacity:1; transform:scale(1.2); } }

    /* ── PAGE TRANSITION ──────────────────────────────── */
    @keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
    #content > * { animation: page-in .3s ease; }

    /* ── MOBILE ────────────────────────────────────────── */
    .m-header, .m-nav, .m-form-bar { display: none; }

    @media (max-width: 768px) {
      .sidebar { display: none; }
      .main { margin-left: 0; }
      .topbar { display: none; }

      .m-header {
        display: flex; align-items: center; justify-content: space-between;
        padding: 0 16px; height: 56px;
        background: var(--surface); border-bottom: 1px solid var(--border);
        position: sticky; top: 0; z-index: 100;
      }
      .m-header-logo { font-size: 16px; font-weight: 800; }
      .m-header-logo span { color: var(--accent); }
      .m-header-actions { display: flex; gap: 8px; }

      .m-nav {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0;
        background: var(--surface); border-top: 1px solid var(--border);
        height: 64px; z-index: 100; padding: 0 8px;
      }
      .m-nav-item {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
        gap: 3px; cursor: pointer; color: var(--muted); font-size: 10px; font-weight: 600;
        transition: color .15s;
      }
      .m-nav-item.active { color: var(--accent); }
      .m-nav-item svg { width: 20px; height: 20px; }

      .m-form-bar {
        position: fixed; bottom: 64px; left: 0; right: 0;
        background: var(--surface); border-top: 1px solid var(--border);
        padding: 8px 16px; z-index: 99;
        display: none; gap: 8px; justify-content: flex-end;
      }
      .m-form-bar.visible { display: flex; }

      #content { padding: 16px; padding-bottom: 140px; }
      .form-row { grid-template-columns: 1fr; }
      .image-grid { grid-template-columns: 1fr; }
      .image-grid-3 { grid-template-columns: 1fr; }
      .stats-grid { grid-template-columns: 1fr 1fr; }
      .card-grid { grid-template-columns: 1fr; }
      .form-actions { flex-direction: column; }
      .form-actions-right { width: 100%; justify-content: flex-end; }
      .btn-label { display: none; }
    }

    /* ── AI CHAT WIDGET ────────────────────────────────── */
    .ai-chat-fab {
      position: fixed; bottom: 24px; right: 24px; z-index: 9000;
      width: 52px; height: 52px; border-radius: 50%;
      background: linear-gradient(135deg, #7c3aed, #a78bfa);
      border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
      box-shadow: 0 4px 20px rgba(124,58,237,.4);
      transition: transform .2s, box-shadow .2s;
    }
    .ai-chat-fab:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(124,58,237,.55); }
    .ai-chat-fab svg { color: white; }

    .ai-chat-panel {
      position: fixed; bottom: 88px; right: 24px; z-index: 9001;
      width: 380px; max-width: calc(100vw - 48px); height: 520px; max-height: calc(100vh - 120px);
      background: var(--bg); border: 1px solid var(--border); border-radius: 16px;
      display: flex; flex-direction: column; overflow: hidden;
      box-shadow: 0 12px 48px rgba(0,0,0,.5);
      transform: translateY(12px) scale(0.95); opacity: 0; pointer-events: none;
      transition: transform .25s cubic-bezier(0.16,1,0.3,1), opacity .2s;
    }
    .ai-chat-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }

    .ai-chat-header {
      padding: 14px 16px; border-bottom: 1px solid var(--border);
      display: flex; align-items: center; gap: 10px; flex-shrink: 0;
    }
    .ai-chat-header-icon {
      width: 28px; height: 28px; border-radius: 8px;
      background: linear-gradient(135deg, #7c3aed, #a78bfa);
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    .ai-chat-header-text { font-size: 14px; font-weight: 700; color: var(--text); }
    .ai-chat-header-sub { font-size: 11px; color: var(--muted); }

    .ai-chat-messages {
      flex: 1; overflow-y: auto; padding: 16px; display: flex;
      flex-direction: column; gap: 12px;
    }
    .ai-msg { max-width: 88%; font-size: 13px; line-height: 1.5; padding: 10px 14px; border-radius: 14px; word-wrap: break-word; }
    .ai-msg.user {
      align-self: flex-end; background: #7c3aed; color: white; border-bottom-right-radius: 4px;
    }
    .ai-msg.assistant {
      align-self: flex-start; background: var(--surface); color: var(--text);
      border: 1px solid var(--border); border-bottom-left-radius: 4px;
    }
    .ai-msg.assistant strong { color: var(--accent); }
    .ai-msg.system {
      align-self: center; font-size: 11px; color: var(--muted);
      background: none; padding: 4px 0; text-align: center;
    }

    .ai-typing {
      align-self: flex-start; display: flex; gap: 4px; padding: 12px 16px;
      background: var(--surface); border: 1px solid var(--border); border-radius: 14px; border-bottom-left-radius: 4px;
    }
    .ai-typing-dot {
      width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
      animation: ai-bounce 1.2s infinite;
    }
    .ai-typing-dot:nth-child(2) { animation-delay: .15s; }
    .ai-typing-dot:nth-child(3) { animation-delay: .3s; }
    @keyframes ai-bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }

    .ai-chat-input-area {
      padding: 12px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-shrink: 0;
    }
    .ai-chat-input {
      flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
      padding: 10px 12px; color: var(--text); font-size: 13px; font-family: inherit;
      resize: none; min-height: 20px; max-height: 80px;
    }
    .ai-chat-input:focus { border-color: var(--accent); outline: none; }
    .ai-chat-send {
      background: linear-gradient(135deg, #7c3aed, #a78bfa); border: none; border-radius: 10px;
      width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
      cursor: pointer; flex-shrink: 0; transition: opacity .15s;
    }
    .ai-chat-send:disabled { opacity: .4; cursor: not-allowed; }
    .ai-chat-send svg { color: white; }

    @media (max-width: 768px) {
      .ai-chat-fab { bottom: 76px; right: 16px; width: 46px; height: 46px; }
      .ai-chat-panel {
        bottom: 0; right: 0; left: 0; width: 100%; max-width: 100%;
        height: calc(100vh - 60px); max-height: none;
        border-radius: 16px 16px 0 0;
      }
    }

    /* ── WEBSITE REVIEW ───────────────────────────────── */
    .ws-layout {
      display: flex; height: calc(100vh - var(--topbar-h)); margin: -24px -32px;
    }
    .ws-viewer-area {
      flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
    }
    .ws-toolbar {
      display: flex; align-items: center; gap: 8px; padding: 10px 16px;
      background: var(--surface); border-bottom: 1px solid var(--border); flex-shrink: 0;
    }
    .ws-url-bar {
      flex: 1; display: flex; align-items: center; gap: 0;
      background: var(--bg); border: 1.5px solid var(--border); border-radius: 9px;
      overflow: hidden; transition: border-color .15s;
    }
    .ws-url-bar:focus-within { border-color: var(--accent); }
    .ws-url-prefix {
      padding: 7px 0 7px 12px; font-size: 12px; color: var(--muted);
      white-space: nowrap; user-select: none;
    }
    .ws-url-input {
      flex: 1; padding: 7px 12px 7px 2px; border: none; background: transparent;
      color: var(--text); font-size: 13px; font-family: inherit; outline: none;
      min-width: 0;
    }
    .ws-url-go {
      padding: 7px 14px; background: var(--surface-2); border: none; border-left: 1px solid var(--border);
      color: var(--text-2); font-size: 12px; font-weight: 600; cursor: pointer;
      font-family: inherit; transition: all .15s;
    }
    .ws-url-go:hover { background: var(--surface-3); color: var(--text); }
    .ws-toolbar-sep {
      width: 1px; height: 24px; background: var(--border); margin: 0 4px;
    }
    .ws-viewport-btn {
      padding: 6px 8px; border-radius: 7px; border: 1px solid transparent;
      background: none; color: var(--muted); cursor: pointer; transition: all .15s;
      display: flex; align-items: center; justify-content: center;
    }
    .ws-viewport-btn:hover { background: var(--surface-2); color: var(--text); }
    .ws-viewport-btn.active {
      background: var(--accent-bg); color: var(--accent); border-color: rgba(228,211,255,0.2);
    }
    .ws-viewport-btn svg { width: 18px; height: 18px; }
    .ws-pin-toggle {
      padding: 6px 14px; border-radius: 7px; border: 1.5px solid var(--border);
      background: var(--surface-2); color: var(--text-2); cursor: pointer;
      font-size: 12px; font-weight: 600; font-family: inherit;
      display: flex; align-items: center; gap: 6px; transition: all .15s;
    }
    .ws-pin-toggle:hover { border-color: var(--accent); color: var(--text); }
    .ws-pin-toggle.active {
      background: var(--accent); color: #16161e; border-color: var(--accent);
    }
    .ws-pin-toggle svg { width: 14px; height: 14px; }

    .ws-viewport-container {
      flex: 1; display: flex; justify-content: center; align-items: flex-start;
      overflow: auto; padding: 24px;
      background: var(--bg);
      background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.03) 1px, transparent 0);
      background-size: 24px 24px;
    }
    .ws-device-frame-scaler {
      flex-shrink: 0; overflow: hidden;
    }
    .ws-device-frame {
      position: relative; border-radius: 12px; overflow: hidden;
      box-shadow: 0 8px 40px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.06);
      flex-shrink: 0;
    }
    .ws-device-chrome {
      height: 36px; background: #1a1a24; display: flex; align-items: center;
      padding: 0 14px; gap: 7px; border-bottom: 1px solid rgba(255,255,255,.06);
    }
    .ws-traffic-dot {
      width: 10px; height: 10px; border-radius: 50%;
    }
    .ws-traffic-dot.red { background: #ff5f57; }
    .ws-traffic-dot.yellow { background: #febc2e; }
    .ws-traffic-dot.green { background: #28c840; }
    .ws-device-url {
      flex: 1; text-align: center; font-size: 11px; color: var(--muted);
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
      margin: 0 40px;
    }
    .ws-iframe-wrap { position: relative; }
    .ws-iframe-blocked {
      display: none; flex-direction: column; align-items: center; justify-content: center;
      text-align: center; padding: 48px 32px; color: var(--muted);
      background: var(--surface); min-height: 400px;
    }
    .ws-iframe-blocked h4 { font-size: 15px; color: var(--text); margin: 12px 0 6px; font-weight: 700; }
    .ws-iframe-blocked p { font-size: 12px; line-height: 1.6; max-width: 400px; }
    .ws-code-block {
      margin-top: 12px; padding: 12px 16px; border-radius: 8px;
      background: var(--bg); border: 1px solid var(--border);
      font-family: 'SF Mono', Monaco, 'Courier New', monospace; font-size: 12px;
      color: var(--accent); word-break: break-all; max-width: 500px;
      user-select: all; cursor: text;
    }
    .ws-iframe {
      width: 100%; height: 800px; border: none; display: block; background: #fff;
    }
    .ws-pin-overlay {
      position: absolute; inset: 0; z-index: 10;
      pointer-events: none;
    }
    .ws-pin-overlay.active {
      pointer-events: auto; cursor: crosshair;
    }
    .ws-pin-overlay.active::after {
      content: 'Click to place a pin'; position: absolute; top: 12px; left: 50%;
      transform: translateX(-50%); padding: 6px 14px; border-radius: 8px;
      background: var(--accent); color: #16161e; font-size: 11px; font-weight: 700;
      pointer-events: none; letter-spacing: 0.3px;
      animation: ws-hint-in .3s ease;
    }
    @keyframes ws-hint-in { from { opacity: 0; transform: translateX(-50%) translateY(-6px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

    .ws-pin-marker {
      position: absolute; width: 28px; height: 28px; border-radius: 50%;
      background: var(--accent); color: #16161e; font-size: 11px; font-weight: 800;
      display: flex; align-items: center; justify-content: center;
      transform: translate(-50%, -50%); z-index: 11;
      cursor: pointer; pointer-events: auto;
      box-shadow: 0 2px 10px rgba(0,0,0,.35), 0 0 0 2px rgba(228,211,255,0.25);
      transition: top .08s linear, left .08s linear;
      animation: ws-pin-drop .35s cubic-bezier(0.34, 1.56, 0.64, 1);
      will-change: top;
    }
    @keyframes ws-pin-drop { from { transform: translate(-50%, -50%) scale(0); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
    .ws-pin-marker:hover {
      transform: translate(-50%, -50%) scale(1.15);
      box-shadow: 0 4px 16px rgba(0,0,0,.4), 0 0 0 3px rgba(228,211,255,0.35);
    }
    .ws-pin-marker.selected {
      background: #fff; color: var(--accent);
      transform: translate(-50%, -50%) scale(1.2);
      box-shadow: 0 4px 20px rgba(0,0,0,.4), 0 0 0 3px var(--accent);
    }
    .ws-pin-marker.resolved { opacity: .35; background: var(--muted); }

    /* Pin sidebar */
    .ws-sidebar {
      width: 360px; flex-shrink: 0; background: var(--surface);
      border-left: 1px solid var(--border); display: flex; flex-direction: column;
      height: 100%; overflow: hidden;
    }
    .ws-sidebar-header {
      padding: 16px; border-bottom: 1px solid var(--border); flex-shrink: 0;
    }
    .ws-sidebar-title {
      font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 10px;
      display: flex; align-items: center; justify-content: space-between;
    }
    .ws-sidebar-count {
      font-size: 11px; font-weight: 600; color: var(--muted);
      background: var(--surface-2); padding: 2px 8px; border-radius: 10px;
    }
    .ws-filter-tabs {
      display: flex; gap: 0; background: var(--surface-2); border-radius: 8px; padding: 3px;
    }
    .ws-filter-tab {
      flex: 1; padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 600;
      cursor: pointer; color: var(--muted); background: none; border: none;
      font-family: inherit; text-align: center; transition: all .15s;
    }
    .ws-filter-tab.active { color: var(--text); background: var(--surface-3); }
    .ws-pin-list {
      flex: 1; overflow-y: auto; padding: 8px;
    }
    .ws-pin-card {
      padding: 12px; border-radius: 10px; cursor: pointer;
      border: 1px solid transparent; transition: all .15s; margin-bottom: 6px;
      background: var(--surface-2);
    }
    .ws-pin-card:hover { border-color: var(--border); background: var(--surface-3); }
    .ws-pin-card.active { border-color: var(--accent); background: var(--accent-bg); }
    .ws-pin-card-header {
      display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
    }
    .ws-pin-badge {
      width: 24px; height: 24px; border-radius: 50%; background: var(--accent);
      color: #16161e; font-size: 10px; font-weight: 800;
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    .ws-pin-card.resolved .ws-pin-badge { background: var(--muted); opacity: .5; }
    .ws-pin-card-author { font-size: 11px; font-weight: 600; color: var(--text-2); }
    .ws-pin-card-time { font-size: 10px; color: var(--muted); margin-left: auto; }
    .ws-pin-card-preview {
      font-size: 12px; color: var(--muted); line-height: 1.5;
      display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
      padding-left: 32px;
    }
    .ws-pin-card-meta {
      display: flex; align-items: center; gap: 8px; margin-top: 6px; padding-left: 32px;
    }
    .ws-pin-card-meta-item {
      font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 3px;
    }
    .ws-pin-card-meta-item svg { width: 11px; height: 11px; }

    /* Pin detail */
    .ws-pin-detail {
      flex: 1; display: flex; flex-direction: column; overflow: hidden;
    }
    .ws-pin-detail-header {
      padding: 14px 16px; border-bottom: 1px solid var(--border);
      display: flex; align-items: center; gap: 10px; flex-shrink: 0;
    }
    .ws-pin-detail-back {
      background: none; border: none; color: var(--muted); cursor: pointer;
      padding: 4px; border-radius: 6px; display: flex; transition: all .15s;
    }
    .ws-pin-detail-back:hover { color: var(--text); background: var(--surface-2); }
    .ws-pin-detail-actions {
      margin-left: auto; display: flex; gap: 6px;
    }
    .ws-comments {
      flex: 1; overflow-y: auto; padding: 12px 16px;
      display: flex; flex-direction: column; gap: 12px;
    }
    .ws-comment {
      display: flex; gap: 10px;
    }
    .ws-comment-avatar {
      width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
      font-size: 12px; font-weight: 700; color: #16161e;
    }
    .ws-comment-body { flex: 1; min-width: 0; }
    .ws-comment-meta {
      display: flex; align-items: center; gap: 6px; margin-bottom: 3px;
    }
    .ws-comment-name { font-size: 12px; font-weight: 600; color: var(--text); }
    .ws-comment-time { font-size: 10px; color: var(--muted); }
    .ws-comment-text {
      font-size: 13px; color: var(--text-2); line-height: 1.55; word-break: break-word;
    }
    .ws-comment-input {
      padding: 12px 16px; border-top: 1px solid var(--border); flex-shrink: 0;
      display: flex; gap: 8px;
    }
    .ws-comment-textarea {
      flex: 1; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 9px;
      font-size: 13px; font-family: inherit; color: var(--text); background: var(--surface-2);
      resize: none; min-height: 20px; max-height: 80px; outline: none;
    }
    .ws-comment-textarea:focus { border-color: var(--accent); }
    .ws-comment-send {
      padding: 8px 14px; border-radius: 9px; border: none;
      background: var(--accent); color: #16161e; font-size: 12px; font-weight: 600;
      cursor: pointer; font-family: inherit; transition: all .15s; align-self: flex-end;
    }
    .ws-comment-send:hover { background: var(--accent-dk); }
    .ws-comment-send:disabled { opacity: .4; cursor: not-allowed; }

    .ws-task-link {
      display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
      border-radius: 6px; font-size: 10px; font-weight: 600;
      background: var(--blue-lt); color: var(--blue); cursor: pointer;
      transition: all .15s; border: none; font-family: inherit;
    }
    .ws-task-link:hover { background: var(--blue); color: #fff; }

    .ws-empty {
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      padding: 40px 24px; text-align: center; color: var(--muted); flex: 1;
    }
    .ws-empty svg { width: 40px; height: 40px; margin-bottom: 12px; opacity: .3; }
    .ws-empty h4 { font-size: 14px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
    .ws-empty p { font-size: 12px; line-height: 1.5; }

    @media (max-width: 768px) {
      .ws-layout { flex-direction: column; }
      .ws-sidebar {
        position: fixed; bottom: 64px; left: 0; right: 0; height: 50vh;
        border-left: none; border-top: 1px solid var(--border);
        border-radius: 16px 16px 0 0; z-index: 200;
        transform: translateY(100%); transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1);
      }
      .ws-sidebar.open { transform: translateY(0); }
      .ws-device-frame { max-width: 100% !important; }
      .ws-viewport-container { padding: 12px; }
    }
