*{box-sizing:border-box}body{margin:0;font:15px/1.5 system-ui,-apple-system,Segoe UI,sans-serif;color:#17243a;background:#f3f6fa}header{display:flex;justify-content:space-between;align-items:center;background:white;border-bottom:1px solid #e1e6ef;padding:16px max(24px,calc((100vw - 1160px)/2))}.brand{font-weight:850;letter-spacing:.3px;color:#176c8a;font-size:21px}.brand span{display:block;font-size:10px;letter-spacing:2px;color:#64748b}.wrap{max-width:1160px;margin:38px auto;padding:0 20px}.heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px}.heading h1{margin:0;font-size:29px}h2{margin-top:0;font-size:20px}p,.muted,small{color:#66758a}p{margin-top:6px}.tag{padding:8px 12px;background:#e5f3f6;color:#156b8a;border-radius:20px;font-size:12px}.layout{display:grid;grid-template-columns:390px 1fr;gap:22px}.panel{background:white;padding:26px;border:1px solid #e0e6ef;border-radius:17px;box-shadow:0 5px 18px #24354d08}label{display:block;font-weight:650;margin-top:16px}input{width:100%;padding:12px 13px;margin-top:6px;border:1px solid #cbd5e1;border-radius:9px;font:inherit}input[type=color]{height:47px;padding:5px}button{border:0;background:#176c8a;color:white;padding:12px 20px;border-radius:9px;font-weight:700;cursor:pointer;margin-top:20px}button.secondary{margin:0;background:#edf3f7;color:#176c8a}.count{background:#edf3f7;border-radius:30px;padding:3px 9px;font-size:13px}.empty{padding:35px;text-align:center;color:#7b8798;background:#f8fafc;border-radius:12px}.app-list{display:grid;gap:12px}.app{display:flex;gap:14px;align-items:center;border:1px solid #e3e9f1;border-radius:12px;padding:14px}.app-icon{width:49px;height:49px;display:grid;place-items:center;background:var(--app-color);color:white;border-radius:13px;font-size:24px;flex-shrink:0}.foot{margin-top:28px;font-size:12px}.auth{max-width:430px;margin:10vh auto;padding:20px}.auth .brand{text-align:center;margin-bottom:24px}.error{background:#fff0f0;color:#a32424;border-radius:9px;padding:12px}.auth button,.layout button{width:100%}@media(max-width:750px){.layout{grid-template-columns:1fr}.heading{align-items:flex-start;gap:12px;flex-direction:column}header{padding:15px 20px}.panel{padding:20px}}
.edit-link{display:inline-block;margin-top:8px;color:#176c8a;font-weight:750;text-decoration:none}.edit-link:hover{text-decoration:underline}
.studio-shell{max-width:1500px;margin:22px auto;padding:0 20px}.studio-top{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:18px}.studio-top h1{margin:0;font-size:24px}.studio-top p{margin:2px 0}.studio-grid{display:grid;grid-template-columns:270px minmax(300px,1fr) 340px;gap:15px;align-items:start}.studio-card{background:white;border:1px solid #e0e6ef;border-radius:16px;padding:17px;box-shadow:0 5px 18px #24354d08}.studio-card h2{font-size:16px;margin:0 0 12px}.studio-card h3{font-size:14px;margin:16px 0 7px}.studio-card button{margin:5px 0;padding:10px 12px}.studio-card input,.studio-card select,.studio-card textarea{width:100%;border:1px solid #cbd5e1;border-radius:9px;padding:9px;font:inherit;background:#fff;color:#17243a}.studio-card textarea{min-height:72px;resize:vertical}.studio-card label{font-size:12px;margin-top:9px}.studio-card input[type=color]{height:42px}.screen-item,.field-item{width:100%;display:flex;align-items:center;justify-content:space-between;gap:7px;background:#f5f8fb;color:#17243a;border:1px solid #dbe5ed;text-align:left;border-radius:9px;font-size:13px;font-weight:650}.screen-item.active,.field-item.active{border-color:var(--studio-accent,#176c8a);background:#eaf4f7}.tiny-btn{font-size:12px!important;padding:7px 9px!important}.studio-actions{display:flex;gap:8px;flex-wrap:wrap}.studio-actions button{width:auto}.studio-actions .secondary{background:#eaf0f4;color:#176c8a}.studio-preview{display:flex;justify-content:center;padding:14px 0}.phone-frame{width:290px;min-height:540px;border:7px solid #1c2635;border-radius:32px;overflow:hidden;background:#fff;box-shadow:0 12px 28px #17243a25}.phone-head{background:var(--phone-color,#176c8a);color:white;padding:23px 15px 15px}.phone-head strong{display:block;font-size:17px}.phone-head small{color:#fff;opacity:.88}.phone-body{padding:15px;min-height:370px}.phone-bottom{display:flex;gap:4px;border-top:1px solid #e5eaf0;padding:8px;flex-wrap:wrap}.phone-bottom button{background:#f0f4f8;color:#34445a;font-size:11px;padding:8px;flex:1;min-width:55px}.preview-field{margin:12px 0}.preview-field label{font-size:12px;font-weight:700;display:block;margin-bottom:4px}.preview-field input,.preview-field textarea,.preview-field select{width:100%;padding:9px;border:1px solid #d5dee8;border-radius:8px;background:white}.preview-field input[type=checkbox]{width:auto}.notice{font-size:12px;padding:10px;background:#eaf4f7;color:#175c72;border-radius:9px;margin:12px 0}.studio-card .danger{background:#fcebec;color:#a5222b}.studio-card .outline{background:#f2f5f9;color:#26374d}.muted-small{font-size:12px;color:#64748b}.hidden{display:none!important}@media(max-width:1120px){.studio-grid{grid-template-columns:230px minmax(300px,1fr)}.studio-grid>.studio-card:last-child{grid-column:1/-1}}@media(max-width:700px){.studio-grid{grid-template-columns:1fr}.studio-grid>.studio-card:last-child{grid-column:auto}.studio-shell{padding:0 12px}.phone-frame{width:min(290px,100%)}}

/* Fase 3: componentes y vista previa */
.component-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end;margin:12px 0}.component-toolbar button{white-space:nowrap}.p-heading{font-size:18px;margin:12px 0 5px}.p-text{font-size:12px;color:#526278}.p-card,.p-stat{border:1px solid #e2e8f0;border-radius:12px;padding:12px;margin:10px 0;background:#f8fafc}.p-card p{font-size:12px;margin:5px 0}.p-action{background:var(--phone-color,#176c8a);width:100%;margin:9px 0}.p-stat strong{font-size:24px;color:var(--phone-color,#176c8a);display:block}.p-stat span{font-size:12px}.p-divider{border:0;border-top:1px solid #e2e8f0;margin:14px 0}.p-image{max-width:100%;border-radius:10px}.p-placeholder{border:1px dashed #a5b3c6;padding:20px;text-align:center;font-size:12px}.p-calendar{font-size:11px;line-height:2;margin-top:10px}.p-table{width:100%;border-collapse:collapse;font-size:11px}.p-table th,.p-table td{border-bottom:1px solid #dfe5ed;padding:5px;text-align:left}.p-bars{height:100px;display:flex;align-items:end;gap:9px;padding:10px 0}.p-bars i{flex:1;background:var(--phone-color,#176c8a);border-radius:5px 5px 0 0;opacity:.75}.phone-body{overflow-wrap:anywhere}.phone-bottom button{margin:0}.studio-card .field-item{margin-bottom:6px}@media(max-width:480px){.component-toolbar{grid-template-columns:1fr}}
