.btn-cta, .btn-primary {
  display: inline-block; padding: 12px 24px; border-radius: 12px;
  background: var(--cta); color: #fff; font-weight: 700; min-height: 44px;
}
.btn-outline-sm { padding: 10px 16px; border-radius: 10px; border: 2px solid #fff; color: #fff; background: transparent; }
.btn-outline { display: block; padding: 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--card-bg); text-align: center; margin-top: 8px; }
.btn-block { width: 100%; margin-top: 10px; }
.btn-sm { padding: 6px 12px; border-radius: 8px; background: var(--primary); color: #fff; font-size: .8rem; }

.hero { position: relative; border-radius: 0 0 20px 20px; overflow: hidden; margin-bottom: 12px; }
.hero-bg { position: absolute; inset: 0; }
.hero-content { position: relative; padding: 24px 16px; color: #fff; text-align: center; z-index: 1; }
.hero-content h1 { font-size: 1.35rem; margin: 8px 0; }
.hero-type { font-size: .85rem; opacity: .9; }
.progress-ring { position: relative; width: 80px; height: 80px; margin: 12px auto; }
.progress-ring svg { width: 100%; height: 100%; }
.progress-ring strong { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.hero-stats { font-size: .85rem; margin: 8px 0 14px; opacity: .92; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.tab-row { display: flex; gap: 8px; padding: 0 12px 12px; overflow-x: auto; }
.tab-btn { padding: 8px 14px; border-radius: 20px; background: var(--card-bg); border: 1px solid var(--border); white-space: nowrap; font-size: .85rem; }
.tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.dragon-cards { display: grid; gap: 12px; padding: 0 12px 80px; }
.list-card {
  background: var(--card-bg); border-radius: 14px; padding: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06); border: 1px solid var(--border); cursor: pointer;
}
.type-badge { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 8px; margin-bottom: 6px; }
.list-card h3 { font-size: 1rem; margin-bottom: 4px; }
.list-meta { display: flex; justify-content: space-between; font-size: .8rem; color: var(--text-light); margin-top: 8px; }

.type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0; }
.type-card {
  padding: 14px; border-radius: 12px; border: 2px solid var(--border); background: var(--card-bg); text-align: center;
}
.type-card.active { background: rgba(74,144,217,.08); }
.type-card span { font-size: 1.8rem; display: block; margin-bottom: 4px; }
.type-card strong { display: block; font-size: .9rem; }
.type-card small { font-size: .7rem; color: var(--text-light); }

.tpl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 8px 0 16px; }
.tpl-card { padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card-bg); font-size: .85rem; }

.create-wizard, .class-panel, .dash-actions { padding: 16px 12px 80px; }
.create-wizard label, .class-panel label { display: block; margin-bottom: 12px; font-weight: 600; font-size: .9rem; }
.create-wizard input, .create-wizard textarea, .class-panel textarea {
  width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 10px; margin-top: 4px;
}
.form-nav { display: flex; gap: 10px; margin-top: 16px; }
.form-nav button { flex: 1; padding: 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--card-bg); }
.confirm-box { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin: 12px 0; }

.avatar-wall { display: flex; justify-content: center; gap: 6px; padding: 8px 16px; flex-wrap: wrap; }
.av, .av-more { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .85rem; }
.av-more { background: var(--text-light); font-size: .7rem; }

.response-list { list-style: none; padding: 0 12px 16px; margin: 0; }
.response-item { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.p-no { width: 22px; font-weight: 700; color: var(--primary); }
.p-avatar { width: 32px; height: 32px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.p-name { font-weight: 600; }
.p-child { font-size: .8rem; color: var(--text-light); }
.p-time { margin-left: auto; font-size: .75rem; color: var(--text-light); }

.kanban-header { display: flex; justify-content: space-between; align-items: center; padding: 0 12px 8px; font-size: .9rem; }
.kanban-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 12px 20px; }
.kanban-card { padding: 8px; border-radius: 10px; text-align: center; font-size: .8rem; }
.kanban-card small { display: block; font-size: .7rem; margin-top: 2px; }

.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 12px; margin-bottom: 12px; }
.kpi { background: var(--card-bg); padding: 12px; border-radius: 12px; text-align: center; font-size: .8rem; }
.kpi strong { display: block; font-size: 1.2rem; margin-top: 4px; color: var(--primary); }

.chart-block { background: var(--card-bg); border-radius: 14px; padding: 14px; margin: 0 12px 12px; border: 1px solid var(--border); }
.chart-block h3 { font-size: .9rem; margin-bottom: 10px; }
.pie-wrap { display: flex; align-items: center; gap: 16px; }
.pie-wrap svg { width: 100px; height: 100px; }
.pie-legend { list-style: none; font-size: .8rem; }
.pie-legend li { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.pie-legend span { width: 10px; height: 10px; border-radius: 2px; }
.bar-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: .8rem; }
.bar-label { width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width .8s ease; }
.bar-val { width: 36px; text-align: right; }
.vote-bar { display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: .85rem; }

.modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: flex-end; justify-content: center; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.modal-sheet { position: relative; width: 100%; max-width: 480px; background: var(--card-bg); border-radius: 16px 16px 0 0; padding: 20px 16px 32px; max-height: 85vh; overflow-y: auto; }
.modal-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; background: var(--bg); }
.form-field { display: block; margin-bottom: 12px; font-size: .9rem; font-weight: 600; }
.form-field input, .form-field textarea { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 10px; margin-top: 4px; font-weight: 400; }
.radio-opt, .check-opt { display: block; font-weight: 400; margin: 6px 0; }
.poster-canvas { max-width: 100%; border-radius: 12px; margin: 12px 0; }
.class-card { background: var(--card-bg); padding: 16px; border-radius: 14px; border: 1px solid var(--border); margin-bottom: 16px; }
.theme-picker select { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid var(--border); margin-top: 6px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--bottom-chrome-h) + 24px + var(--safe-area-bottom));
  transform: translateX(-50%); padding: 12px 20px; border-radius: 12px;
  background: rgba(45,45,45,.92); color: #fff; font-size: 14px; opacity: 0; transition: opacity .25s; z-index: 2000;
}
.toast.show { opacity: 1; }
.toast.ok { background: rgba(16,185,129,.95); }
.toast.warn { background: rgba(245,158,11,.95); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; padding: 0 12px 16px; }
.product-card { background: var(--card-bg); border-radius: 14px; padding: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.06); border: 1px solid var(--border); }
.product-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; margin-bottom: 8px; }
.product-card h3 { font-size: .95rem; margin-bottom: 4px; }
.prod-desc { font-size: .75rem; color: var(--text-light); margin-bottom: 6px; }
.prod-price { font-size: 1.1rem; font-weight: 700; color: var(--cta); }
.prod-price span { font-size: .8rem; font-weight: 400; color: var(--text-light); }
.prod-stock { font-size: .75rem; color: var(--text-light); margin: 6px 0; }
.qty-stepper { display: flex; align-items: center; justify-content: center; gap: 12px; }
.qty-stepper button { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 1.2rem; }

.order-summary { margin: 12px 0; padding: 12px; background: var(--bg); border-radius: 10px; font-size: .9rem; }
.order-line { padding: 4px 0; border-bottom: 1px dashed var(--border); }
.order-total { font-weight: 700; margin-top: 8px; color: var(--cta); }
.modal-hint { font-size: .85rem; color: var(--text-light); margin: 8px 0; }
.modal-sheet textarea { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 10px; margin: 10px 0; resize: vertical; }
.pay-amount { font-size: 1.2rem; text-align: center; margin: 12px 0; }
.pay-note, .pay-hint { font-size: .85rem; color: var(--text-light); margin-bottom: 12px; text-align: center; }
.pay-qr-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.pay-qr { max-width: 180px; border-radius: 10px; }
.pay-order { font-size: .75rem; color: var(--text-light); text-align: center; margin-top: 10px; }
.poster-sheet { max-height: 90vh; overflow-y: auto; text-align: center; }

@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
