/* ── Header ── */
.header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 20px 14px;
}
.header h1 { font-size: 22px; font-weight: 800; }
.btn-new {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 20px; border: none;
  background: var(--purple); color: #fff;
  font-size: 13px; font-weight: 600; font-family: 'Inter', sans-serif;
  cursor: pointer; transition: opacity .2s;
}
.btn-new:hover { opacity: .85; }
.btn-new i { width: 16px; height: 16px; }

/* ── Search ── */
.search-wrap { padding: 0 20px 10px; }
.search-bar {
  display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px;
}
.search-bar i { width: 16px; height: 16px; color: var(--t3); flex-shrink: 0; }
.search-bar input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 14px; color: var(--t1); font-family: 'Inter', sans-serif;
}
.search-bar input::placeholder { color: var(--t3); }

/* ── Filter tabs ── */
.filter-tabs { display: flex; gap: 8px; padding: 0 20px 16px; }
.tab {
  padding: 7px 16px; border-radius: 20px; border: none;
  background: var(--card); color: var(--t2);
  font-size: 12px; font-weight: 600; font-family: 'Inter', sans-serif;
  cursor: pointer; transition: all .2s;
}
.tab.active {
  background: rgba(168,85,247,.12);
  border: 1px solid rgba(168,85,247,.5);
  color: var(--purple);
}

/* ── Stats bar ── */
.stats-bar { display: flex; gap: 16px; padding: 0 20px 14px; }
.stat-chip {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--t3);
}
.stat-chip i   { width: 12px; height: 12px; }
.stat-chip span { color: var(--t2); font-weight: 600; }

/* ── Card list ── */
.list {
  flex: 1; overflow-y: auto; padding: 0 16px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.list::-webkit-scrollbar { display: none; }

/* ── Content card ── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .2s;
}
.card:hover { border-color: rgba(168,85,247,.3); }

.card-top  { display: flex; gap: 10px; align-items: flex-start; }
.style-badge {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.card-title {
  font-size: 14px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.card-meta span { font-size: 11px; color: var(--t2); }
.card-meta .sep { color: var(--t3); }
.card-actions { display: flex; gap: 4px; }
.action-btn {
  width: 32px; height: 32px; border-radius: 10px; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: opacity .2s;
}
.action-btn:hover  { opacity: .8; }
.action-btn.edit   { background: var(--elev); }
.action-btn.edit i { width: 14px; height: 14px; color: var(--t2); }
.action-btn.del    { background: rgba(239,68,68,.12); }
.action-btn.del i  { width: 14px; height: 14px; color: var(--red); }

.card-bottom { display: flex; align-items: center; justify-content: space-between; }
.card-date   { display: flex; align-items: center; gap: 8px; }
.date-item   { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--t3); }
.date-item i       { width: 11px; height: 11px; }
.date-item.acc-good { color: var(--green); }
.date-item.acc-mid  { color: var(--yellow); }
.date-item.acc-bad  { color: var(--red); }

.practice-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 10px; border: none;
  background: var(--grad);
  color: #fff; font-size: 11px; font-weight: 600;
  font-family: 'Inter', sans-serif; cursor: pointer;
  transition: opacity .2s; text-decoration: none;
}
.practice-btn:hover { opacity: .85; }
.practice-btn i { width: 11px; height: 11px; }

/* ── Empty state ── */
.empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  padding: 60px 40px; text-align: center; color: var(--t3);
}
.empty i  { width: 48px; height: 48px; opacity: .4; }
.empty h2 { font-size: 17px; color: var(--t2); font-weight: 700; }
.empty p  { font-size: 13px; line-height: 1.6; }
.empty a {
  margin-top: 8px; padding: 12px 28px; border-radius: 14px; border: none;
  background: var(--grad);
  color: #fff; font-size: 14px; font-weight: 600;
  text-decoration: none; display: inline-block;
}

/* ── Modal backdrop ── */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  z-index: 100; align-items: flex-end; justify-content: center;
}
.modal-backdrop.open { display: flex; }

/* ── Modal sheet ── */
.modal-sheet {
  width: 390px; max-height: 90vh;
  background: var(--bg2); border-radius: 24px 24px 0 0;
  padding: 20px 20px 40px;
  display: flex; flex-direction: column; gap: 16px;
  overflow-y: auto;
  animation: slideUp .25s ease;
}
@keyframes slideUp {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-handle { width: 36px; height: 4px; background: var(--border); border-radius: 2px; align-self: center; }
.modal-title  { font-size: 18px; font-weight: 700; }

.form-group    { display: flex; flex-direction: column; gap: 6px; }
.form-label    { font-size: 12px; font-weight: 600; color: var(--t2); letter-spacing: .5px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--card); color: var(--t1);
  font-size: 14px; font-family: 'Inter', sans-serif; outline: none;
  transition: border-color .2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--purple); }
.form-textarea  { resize: vertical; min-height: 100px; line-height: 1.6; }
.form-select option { background: var(--card); }
.form-row       { display: flex; gap: 10px; }
.form-row .form-group { flex: 1; }

.modal-actions { display: flex; gap: 10px; }
.btn-cancel {
  flex: 1; height: 50px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--card); color: var(--t2);
  font-size: 14px; font-weight: 600; font-family: 'Inter', sans-serif;
  cursor: pointer; transition: background .2s;
}
.btn-cancel:hover { background: var(--elev); }
.btn-save {
  flex: 2; height: 50px; border-radius: 14px; border: none;
  background: var(--grad);
  color: #fff; font-size: 14px; font-weight: 600;
  font-family: 'Inter', sans-serif; cursor: pointer; transition: opacity .2s;
}
.btn-save:hover { opacity: .9; }

/* ── Delete confirm ── */
.confirm-body { display: flex; flex-direction: column; gap: 12px; }
.confirm-body p { font-size: 14px; color: var(--t2); line-height: 1.6; }
.confirm-body strong { color: var(--t1); }
.btn-del-confirm {
  flex: 2; height: 50px; border-radius: 14px;
  background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.3);
  color: var(--red); font-size: 14px; font-weight: 600;
  font-family: 'Inter', sans-serif; cursor: pointer;
}

/* ── Auth required banner ── */
.auth-banner {
  margin: 12px 16px; padding: 14px 16px; border-radius: 14px;
  background: rgba(168,85,247,.08); border: 1px solid rgba(168,85,247,.25);
  display: flex; align-items: center; gap: 12px;
}
.auth-banner i   { width: 20px; height: 20px; color: var(--purple); flex-shrink: 0; }
.auth-banner p   { font-size: 13px; color: var(--t2); line-height: 1.5; flex: 1; }
.auth-banner a   { font-weight: 700; color: var(--purple); text-decoration: none; }
