    :root {
      --bg: #f8fafc;
      --card: #ffffff;
      --text: #0f172a;
      --muted: #64748b;
      --primary: #2563eb;
      --primary-hover: #1d4ed8;
      --border: #e2e8f0;
      --badge-bg: #eff6ff;
      --badge-text: #1d4ed8;
      --csv-bg: #fef3c7;
      --csv-text: #92400e;
      --hack-bg: #ecfdf5;
      --hack-border: #a7f3d0;
      --hack-text: #065f46;
      --urgent-bg: #fee2e2;
      --urgent-text: #991b1b;
      --inlogio-bg: #ede9fe;
      --inlogio-text: #5b21b6;
      --invelity-bg: #dbeafe;
      --invelity-text: #1e40af;
      --both-bg: #ccfbf1;
      --both-text: #115e59;
    }
    * { box-sizing: border-box; }
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      background: var(--bg);
      color: var(--text);
      margin: 0;
      padding: 20px;
    }
    .container {
      max-width: 1540px;
      margin: 0 auto;
    }
    .header-box {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 12px;
      margin-bottom: 16px;
    }
    .title-area h1 {
      font-size: 22px;
      margin: 0 0 4px 0;
    }
    .subtitle {
      font-size: 13px;
      color: var(--muted);
      margin: 0;
    }
    .toolbar-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
    }
    .btn {
      padding: 8px 13px;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      border: 1px solid var(--border);
      background: var(--card);
      color: var(--text);
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: all 0.15s;
    }
    .btn:hover { background: #f1f5f9; }
    .btn-primary {
      background: var(--primary);
      color: #fff;
      border-color: var(--primary);
    }
    .btn-primary:hover { background: var(--primary-hover); }
    .btn-sm {
      padding: 5px 9px;
      font-size: 12px;
      border-radius: 6px;
    }
    .btn-danger {
      color: #dc2626;
      border-color: #fecaca;
      background: #fef2f2;
    }
    .btn-danger:hover { background: #fee2e2; }

    /* Playbook Collapsible / Section */
    .playbook-panel {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      margin-bottom: 18px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.04);
      overflow: hidden;
    }
    .playbook-header {
      padding: 14px 18px;
      background: linear-gradient(90deg, #eff6ff 0%, #f8fafc 100%);
      border-bottom: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      align-items: center;
      cursor: pointer;
      user-select: none;
    }
    .playbook-header h2 {
      margin: 0;
      font-size: 16px;
      display: flex;
      align-items: center;
      gap: 8px;
      color: #1e3a8a;
    }
    .playbook-content {
      padding: 18px;
      display: block;
    }
    .playbook-content.collapsed {
      display: none;
    }
    .playbook-grid {
      display: grid;
      grid-template-columns: 1.1fr 1.2fr 1fr;
      gap: 16px;
    }
    @media (max-width: 1100px) {
      .playbook-grid { grid-template-columns: 1fr; }
    }
    .pb-card {
      background: #f8fafc;
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 14px 16px;
    }
    .pb-card h3 {
      margin: 0 0 10px 0;
      font-size: 13.5px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: #334155;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .mental-list {
      margin: 0;
      padding-left: 18px;
      font-size: 12.5px;
      line-height: 1.5;
      color: #334155;
    }
    .mental-list li { margin-bottom: 7px; }
    .entity-box {
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 10px 12px;
      margin-bottom: 8px;
      cursor: pointer;
      transition: border-color 0.15s, transform 0.1s;
    }
    .entity-box:hover {
      border-color: var(--primary);
      transform: translateY(-1px);
    }
    .entity-box:last-child { margin-bottom: 0; }
    .entity-title {
      font-weight: 700;
      font-size: 13px;
      margin-bottom: 4px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .entity-desc {
      font-size: 12px;
      color: #475569;
      line-height: 1.4;
    }
    .checklist-item {
      display: flex;
      align-items: flex-start;
      gap: 9px;
      background: #fff;
      border: 1px solid var(--border);
      padding: 9px 11px;
      border-radius: 8px;
      margin-bottom: 7px;
      font-size: 12.5px;
      line-height: 1.4;
      cursor: pointer;
    }
    .checklist-item input[type="checkbox"] {
      width: 16px;
      height: 16px;
      margin-top: 2px;
      cursor: pointer;
      flex-shrink: 0;
    }
    .checklist-item.done {
      background: #f0fdf4;
      border-color: #bbf7d0;
      color: #64748b;
      text-decoration: line-through;
    }
    .tactical-window {
      margin-top: 12px;
      background: #fff;
      border: 1px solid #fecaca;
      border-radius: 8px;
      padding: 10px 12px;
    }
    .tactical-window h4 {
      margin: 0 0 6px 0;
      font-size: 12px;
      color: #991b1b;
      text-transform: uppercase;
    }
    .tactical-pills {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .tactical-pill {
      font-size: 11.5px;
      background: #fef2f2;
      color: #991b1b;
      border: 1px solid #fecaca;
      padding: 4px 8px;
      border-radius: 6px;
      cursor: pointer;
      font-weight: 500;
    }
    .tactical-pill:hover {
      background: #fee2e2;
    }

    .stats-bar {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 14px;
    }
    .stat-pill {
      background: var(--card);
      border: 1px solid var(--border);
      padding: 8px 13px;
      border-radius: 8px;
      font-size: 12.5px;
      display: flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      transition: border-color 0.15s;
    }
    .stat-pill:hover {
      border-color: var(--primary);
    }
    .stat-pill strong {
      font-size: 14px;
      color: var(--primary);
    }

    .controls {
      display: grid;
      grid-template-columns: 1.8fr 1.1fr 1fr 1fr 0.9fr 0.9fr 0.9fr;
      gap: 9px;
      margin-bottom: 16px;
    }
    @media (max-width: 1250px) {
      .controls { grid-template-columns: 1fr 1fr 1fr; }
    }
    @media (max-width: 680px) {
      .controls { grid-template-columns: 1fr; }
    }
    input, select, textarea {
      padding: 9px 11px;
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 13px;
      background: var(--card);
      color: var(--text);
      width: 100%;
      font-family: inherit;
    }
    input:focus, select:focus, textarea:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
    }
    .table-wrap {
      overflow-x: auto;
      background: var(--card);
      border-radius: 10px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.06);
      border: 1px solid var(--border);
    }
    table {
      width: 100%;
      border-collapse: collapse;
      min-width: 1220px;
    }
    th, td {
      padding: 11px 13px;
      text-align: left;
      border-bottom: 1px solid var(--border);
      font-size: 13px;
      vertical-align: top;
    }
    th {
      background: #f1f5f9;
      font-weight: 600;
      color: #334155;
      font-size: 11.5px;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      position: sticky;
      top: 0;
      z-index: 2;
      user-select: none;
    }
    th.sortable { cursor: pointer; }
    th.sortable:hover { background: #e2e8f0; }
    tr.main-row { transition: background 0.12s; }
    tr.main-row:hover { background: #f8fafc; }

    .badge {
      display: inline-block;
      padding: 3px 8px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 600;
      background: var(--badge-bg);
      color: var(--badge-text);
      margin-bottom: 3px;
      margin-right: 4px;
    }
    .badge-csv {
      background: var(--csv-bg);
      color: var(--csv-text);
      border: 1px solid #fde68a;
    }
    .badge-easy {
      background: #dcfce7;
      color: #166534;
    }
    .badge-med {
      background: #f1f5f9;
      color: #475569;
    }
    .badge-urgent {
      background: var(--urgent-bg);
      color: var(--urgent-text);
      border: 1px solid #fecaca;
    }
    .badge-inlogio {
      background: var(--inlogio-bg);
      color: var(--inlogio-text);
      border: 1px solid #ddd6fe;
    }
    .badge-invelity {
      background: var(--invelity-bg);
      color: var(--invelity-text);
      border: 1px solid #bfdbfe;
    }
    .badge-both {
      background: var(--both-bg);
      color: var(--both-text);
      border: 1px solid #99f6e4;
    }

    .date-box {
      font-weight: 600;
      color: #0f172a;
      font-size: 13px;
      display: flex;
      align-items: center;
      gap: 5px;
      margin-bottom: 3px;
    }
    .location-sub {
      font-size: 12px;
      color: var(--muted);
    }
    .dm-name {
      font-weight: 600;
      font-size: 13px;
      color: #1e293b;
    }
    .dm-role {
      font-size: 12px;
      color: #475569;
      margin-bottom: 3px;
    }
    .dm-contact {
      font-size: 11.5px;
      color: var(--primary);
      word-break: break-word;
    }
    .status-select {
      padding: 4px 8px;
      font-size: 12px;
      font-weight: 600;
      border-radius: 6px;
      width: auto;
      min-width: 120px;
    }
    .status-Neoslovene { background: #f8fafc; color: #475569; }
    .status-V_rieseni { background: #fef9c3; color: #854d0e; border-color: #fde047; }
    .status-Oslovene { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
    .status-Dohodnute { background: #dcfce7; color: #166534; border-color: #86efac; }

    .details-row {
      display: none;
      background: #f8fafc;
    }
    .details-row.open {
      display: table-row;
    }
    .details-box {
      padding: 16px 18px;
      display: grid;
      grid-template-columns: 1.3fr 1.1fr 1fr;
      gap: 18px;
    }
    @media (max-width: 950px) {
      .details-box { grid-template-columns: 1fr; }
    }
    .details-box h4 {
      margin: 0 0 8px 0;
      font-size: 11.5px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--muted);
    }
    .company-pill {
      display: inline-block;
      background: #ffffff;
      border: 1px solid var(--border);
      padding: 4px 9px;
      border-radius: 6px;
      font-size: 12px;
      margin: 2px;
      font-weight: 500;
    }
    .hack-card {
      background: var(--hack-bg);
      border: 1px solid var(--hack-border);
      color: var(--hack-text);
      padding: 11px 13px;
      border-radius: 8px;
      font-size: 12.5px;
      line-height: 1.45;
    }
    .note-area {
      width: 100%;
      min-height: 64px;
      font-size: 12.5px;
      padding: 8px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: #fff;
      resize: vertical;
    }
    .action-cell {
      white-space: nowrap;
      display: flex;
      gap: 6px;
      align-items: center;
    }
    [contenteditable="true"] {
      padding: 2px 4px;
      border-radius: 4px;
      transition: background 0.12s;
    }
    [contenteditable="true"]:hover {
      background: rgba(37, 99, 235, 0.05);
      outline: 1px dashed #cbd5e1;
    }
    [contenteditable="true"]:focus {
      background: #fff;
      outline: 2px solid var(--primary);
    }

    /* Modal */
    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.55);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 100;
      padding: 16px;
    }
    .modal-backdrop.open { display: flex; }
    .modal {
      background: var(--card);
      border-radius: 12px;
      max-width: 800px;
      width: 100%;
      max-height: 90vh;
      overflow-y: auto;
      box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
      border: 1px solid var(--border);
    }
    .modal-header {
      padding: 16px 20px;
      border-bottom: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .modal-header h3 { margin: 0; font-size: 17px; }
    .modal-body {
      padding: 20px;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }
    .modal-body .full-width { grid-column: 1 / -1; }
    .form-group label {
      display: block;
      font-size: 12px;
      font-weight: 600;
      color: #334155;
      margin-bottom: 5px;
    }
    .modal-footer {
      padding: 14px 20px;
      border-top: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: #f8fafc;
    }
    .toast {
      position: fixed;
      bottom: 20px;
      right: 20px;
      background: #0f172a;
      color: #fff;
      padding: 10px 16px;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s;
      z-index: 200;
    }
    .toast.show { opacity: 1; }
