/* ===== BUTTONS ===== */
.btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 13.5px;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Rubik', sans-serif;
  letter-spacing: 0.01em;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 4px 14px rgba(67,97,238,0.3); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #e84d6e; }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; position: relative;
  transition: background var(--transition), color var(--transition);
  color: var(--text-muted);
}
.icon-btn:hover { background: var(--bg); color: var(--primary); }

.badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--danger); color: white;
  font-size: 10px; min-width: 16px; height: 16px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; font-weight: 700;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); }

/* ===== STATUS BADGES ===== */
.status {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.status-todo { background: #eef0f3; color: #6b7280; }
.status-scheduled { background: #dbeafe; color: #1e40af; }
.status-running { background: #fff4e0; color: #b45309; }
.status-published { background: #d1fae5; color: #065f46; }
.status-skipped { background: #fee2e2; color: #991b1b; }

[data-theme="dark"] .status-todo { background: #2d3150; color: #8a94a6; }
[data-theme="dark"] .status-scheduled { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .status-running { background: #422006; color: #fcd34d; }
[data-theme="dark"] .status-published { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .status-skipped { background: #4a1010; color: #fca5a5; }

/* ===== MODAL ===== */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); backdrop-filter: blur(3px); }
.modal-content {
  position: relative; background: var(--bg-elevated);
  border-radius: var(--radius); width: 100%; max-width: 600px;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.97) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-family: 'Rubik', sans-serif; font-weight: 600; font-size: 16px; }
.modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.modal-body label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
}
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  border-top: 1px solid var(--border); margin-top: 8px; padding-top: 16px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.char-count { color: var(--text-muted); font-size: 11px; text-align: right; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--text); color: var(--bg-elevated);
  padding: 12px 20px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); z-index: 300;
  animation: slideUp 0.3s ease; font-size: 13.5px; font-weight: 500;
}
.toast[hidden] { display: none; }
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== TABS ===== */
.tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  margin-bottom: 20px; overflow-x: auto;
}
.tab {
  padding: 10px 16px; border-bottom: 2px solid transparent;
  font-weight: 500; color: var(--text-muted); white-space: nowrap;
  transition: all var(--transition); font-size: 13.5px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ===== VIEW GRID / LIST SWITCHER ===== */
.view-controls {
  display: flex; align-items: center; gap: 6px;
}
.view-size-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-elevated); color: var(--text-muted);
  font-size: 13px; transition: all var(--transition); cursor: pointer;
  gap: 2px;
}
.view-size-btn.active {
  background: var(--primary); color: white; border-color: var(--primary);
}
.view-size-btn:hover:not(.active) {
  border-color: var(--primary); color: var(--primary);
}

/* Dot grid icons inside view-size-btn */
.grid-icon-sm { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px; width: 14px; height: 14px; }
.grid-icon-md { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 14px; height: 14px; }
.grid-icon-lg { display: grid; grid-template-columns: 1fr; gap: 2px; width: 14px; height: 14px; }
.grid-icon-sm span, .grid-icon-md span, .grid-icon-lg span {
  background: currentColor; border-radius: 1px;
}
.list-icon { display: flex; flex-direction: column; gap: 2px; width: 14px; height: 14px; }
.list-icon span { display: block; height: 2px; background: currentColor; border-radius: 1px; }

/* ===== LINK BTN ===== */
.link-btn { color: var(--primary); font-size: 12px; font-weight: 500; }
.link-btn:hover { text-decoration: underline; }
