/* =====================================================================
   TRANG LÀM MẪU TRÊN WEB (app/site/pages/lam-mau.php)
   ===================================================================== */
.lm-wrap { max-width: 1200px; margin: 0 auto; }

.lm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.lm-title { font-size: 22px; font-weight: 800; color: var(--brand-dark); margin: 0; flex: 1 1 auto; }
.lm-title i { color: var(--brand); }

.lm-stage-card {
    background: #fff;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}
.lm-stage {
    position: relative;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    background: repeating-conic-gradient(#e2e8f0 0 25%, #f8fafc 0 50%) 50% / 18px 18px;
}
.lm-stage canvas { display: block; }
.lm-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .7); }
.lm-tip { margin: 10px 0 0; font-size: 13px; color: #64748b; text-align: center; }

.lm-panel {
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
    position: sticky;
    top: 130px;
}
.lm-panel-title { font-size: 16px; font-weight: 800; color: #0f172a; margin-bottom: 12px; }
.lm-panel-title i { color: var(--brand); margin-right: 6px; }

.lm-slot-list { display: flex; flex-direction: column; gap: 8px; }
.lm-slot {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 8px 12px;
    border: 2px solid #e2e8f0; border-radius: 12px;
    background: #fff; text-align: left; color: #0f172a;
    transition: border-color .15s, background .15s;
}
.lm-slot:hover { border-color: var(--brand); }
.lm-slot.active { border-color: #f59e0b; background: #fffbeb; }
.lm-slot > .fa-chevron-right { margin-left: auto; color: #94a3b8; font-size: 12px; }
.lm-slot-thumb {
    width: 46px; height: 46px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px; background: var(--brand-soft) center / cover no-repeat; color: var(--brand);
}
.lm-slot-name { font-weight: 700; font-size: 14px; line-height: 1.3; }
.lm-slot-name small { display: block; font-weight: 500; color: #64748b; font-size: 12px; }
.lm-slot.filled .lm-slot-name small { color: #16a34a; }

.lm-tools { margin-top: 14px; padding: 12px; border-radius: 12px; background: #f8fafc; border: 1px solid #e2e8f0; }
.lm-tools-head { font-size: 14px; margin-bottom: 8px; color: #334155; }
.lm-tools-head i { color: var(--brand); margin-right: 6px; }
.lm-tool-btns { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.lm-tool-btns .btn { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; line-height: 1.1; }
.lm-tool-btns .btn i { font-size: 15px; }
/* Nhóm ô + danh sách layer con */
.lm-group { display: flex; flex-direction: column; gap: 6px; }
.lm-slot-main { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; border: 0; background: none; padding: 0; text-align: left; color: inherit; }
.lm-expand { margin-left: auto; width: 34px; height: 34px; flex-shrink: 0; border: 0; border-radius: 8px; background: #f1f5f9; color: #475569; }
.lm-expand i { transition: transform .2s; }
.lm-group.open .lm-expand i { transform: rotate(90deg); }
.lm-subs { display: none; flex-direction: column; gap: 6px; padding-left: 22px; border-left: 2px dashed #e2e8f0; margin-left: 22px; }
.lm-group.open .lm-subs { display: flex; }
.lm-sub { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 2px solid #e2e8f0; border-radius: 10px; background: #fff; text-align: left; font-size: 13px; color: #0f172a; }
.lm-sub.active { border-color: #f59e0b; background: #fffbeb; }
.lm-sub .lm-slot-thumb { width: 34px; height: 34px; border-radius: 8px; }
.lm-sub small { display: block; color: #64748b; font-size: 11px; }
.lm-tool-btns .btn { padding: 8px 0; border: 1px solid #e2e8f0; }

@media (max-width: 991px) {
    .lm-panel { position: static; }
    .lm-title { font-size: 18px; }
    .lm-stage-card { padding: 8px; border-radius: 14px; }
}

.lm-desc { margin: -4px 0 16px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .85); color: #334155; font-size: 14px; }
