:root{--n:#17345d;--b:#087cc1;--o:#f58220;--bg:#f3f6fa;--line:#dfe6ee}*{box-sizing:border-box}body{margin:0;background:var(--bg);font-family:Arial,sans-serif;color:#293b50}header{height:72px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:24px;padding:12px 24px}header img,.quotehead img{width:165px}main{max-width:1000px;margin:28px auto;padding:0 18px}.top,.quotehead,.grand{display:flex;justify-content:space-between;align-items:center}.card,.quote{background:#fff;border:1px solid var(--line);border-radius:17px;padding:22px;margin-bottom:18px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}label{display:block;font-size:12px;font-weight:bold;margin:10px 0}input,textarea,select{width:100%;padding:12px;border:1px solid #d5dee8;border-radius:9px;margin-top:6px;font:inherit}textarea{min-height:110px}.btn{display:inline-block;border:0;border-radius:10px;padding:13px 17px;font-weight:bold;text-decoration:none;cursor:pointer}.orange{background:var(--o);color:#fff}.blue{background:var(--b);color:#fff}.notice,.terms{background:#fff6ec;border-left:4px solid var(--o);padding:14px;border-radius:8px}.table{overflow:auto}table{width:100%;border-collapse:collapse}th,td{padding:12px;border-bottom:1px solid #eee;text-align:left}.item{border:1px solid var(--line);border-radius:14px;padding:19px;margin:16px 0}.item strong{display:block;text-align:right;color:var(--n);font-size:20px;margin-top:15px}.quote{max-width:780px;margin:30px auto}.quotehead{border-bottom:1px solid #eee;padding-bottom:18px}.quotehead span{background:#e8f5ed;padding:7px 10px;border-radius:99px;font-size:11px}.grand{background:var(--n);color:white;padding:20px;border-radius:14px;margin:20px 0}.grand b{font-size:26px}.public h4{color:var(--b);margin-bottom:0}.client{background:#f6f8fb;padding:16px;border-radius:12px;margin:18px 0}.item-editor{border:1px solid var(--line);padding:16px;border-radius:13px;margin:12px 0}.item-editor textarea{min-height:90px}@media(max-width:650px){.grid{grid-template-columns:1fr}.quote{margin:0;border-radius:0;min-height:100vh}.top{align-items:flex-start;flex-direction:column}}

/* Presupuesto público V2 */
.quote-v2{max-width:820px;padding:30px}.quote-v2 .quotehead img{width:205px}.status{font-weight:800;letter-spacing:.04em}.status-sent{background:#e8f5ed!important;color:#23794a}.status-accepted{background:#e7f1ff!important;color:#1763a0}.status-expired,.status-rejected{background:#fbeaea!important;color:#a13c3c}
.quote-title{display:flex;justify-content:space-between;align-items:end;padding:26px 0 8px}.eyebrow{font-size:12px;color:var(--b);font-weight:800;letter-spacing:.1em}.quote-title h1{margin:6px 0 0;color:var(--n);font-size:34px}.valid{text-align:right}.valid small,.client-v2 small,.grand small{display:block;font-size:10px;letter-spacing:.08em;color:#7b8998;margin-bottom:5px}.valid b{color:var(--n)}
.client-v2{display:grid;grid-template-columns:1fr 1fr;gap:20px}.client-v2 div{display:flex;flex-direction:column;gap:3px}.client-v2 b{font-size:17px;color:var(--n)}.client-v2 span{color:#647487}.agency{text-align:right}
.item-v2{padding:24px;margin:18px 0}.item-top{display:flex;justify-content:space-between;gap:20px;align-items:start;border-bottom:1px solid #edf1f5;padding-bottom:14px;margin-bottom:15px}.item-v2 h2{margin:0;color:var(--n);font-size:22px}.item-v2 .item-top strong{margin:0;white-space:nowrap;font-size:19px}.description{line-height:1.65;color:#4d5f73}.includes{margin-top:19px;background:#f7f9fc;border-radius:11px;padding:16px 18px}.includes h5{margin:0 0 10px;color:var(--n);font-size:13px}.included{margin:0;padding-left:0;list-style:none}.included li{position:relative;padding:5px 0 5px 22px;line-height:1.4}.included li:before{content:"✓";position:absolute;left:0;color:var(--b);font-weight:bold}.qty-note{margin-top:12px;font-size:12px;color:#7a8998}
.quote-v2 .grand{padding:22px 24px}.grand div{display:flex;flex-direction:column;gap:3px}.grand small{color:#c8d5e4;margin:0}.grand span{font-size:13px;color:#fff}.terms{margin:18px 0;line-height:1.55}.terms b{display:block;color:var(--n);margin-bottom:7px}
.accept-card{border:1px solid var(--line);border-radius:14px;padding:20px;margin-top:18px}.accept-card h3{margin:0 0 6px;color:var(--n)}.accept-card p{font-size:13px;color:#6d7b8b;line-height:1.5}.accept-btn{width:100%;margin-top:8px;padding:15px}.whatsapp-btn{display:block;text-align:center;background:#087cc1;color:#fff;margin-top:12px;padding:15px}.accepted-box{background:#eaf7ef;border:1px solid #ccebd8;border-radius:13px;padding:18px;display:flex;flex-direction:column;gap:5px;color:#23794a}.quote-footer{text-align:center;border-top:1px solid #edf1f5;margin-top:28px;padding-top:22px;color:#8290a0;font-size:12px}.quote-footer b,.quote-footer span{display:block;margin:4px}
@media(max-width:650px){.quote-v2{padding:20px}.quote-v2 .quotehead img{width:170px}.quote-title{align-items:start}.quote-title h1{font-size:29px}.client-v2{grid-template-columns:1fr}.agency{text-align:left;border-top:1px solid #e9eef4;padding-top:12px}.item-top{flex-direction:column}.item-v2 .item-top strong{align-self:flex-end}.quote-v2 .grand{align-items:flex-end}.quote-v2 .grand b{font-size:22px}}


/* ===== MSRok Presupuesto Público V3 - estilos definitivos ===== */
body.public{background:#f3f6fa;color:#293b50;font-family:Arial,Helvetica,sans-serif}
body.public .quote.quote-v2{max-width:820px;margin:30px auto;padding:30px;background:#fff;border:1px solid #dfe6ee;border-radius:18px;box-shadow:0 10px 30px rgba(23,52,93,.06)}
body.public .quotehead{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e8edf3;padding-bottom:20px}
body.public .quotehead img{width:205px;height:auto}
body.public .status{display:inline-block;padding:7px 11px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.04em}
body.public .status-sent{background:#e8f5ed!important;color:#23794a}
body.public .status-accepted{background:#e7f1ff!important;color:#1763a0}
body.public .status-expired,body.public .status-rejected{background:#fbeaea!important;color:#a13c3c}
body.public .quote-title{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;padding:27px 0 10px}
body.public .eyebrow{font-size:12px;color:#087cc1;font-weight:800;letter-spacing:.1em;margin-bottom:8px}
body.public .quote-title h1{margin:0;color:#17345d;font-size:34px;line-height:1.1}
body.public .valid{text-align:right;display:flex;flex-direction:column;gap:6px}
body.public .valid small,body.public .client-v2 small,body.public .grand small{display:block!important;font-size:10px;letter-spacing:.08em;color:#7b8998;line-height:1.2}
body.public .valid b{display:block;color:#17345d;font-size:14px}
body.public .client.client-v2{display:grid;grid-template-columns:1fr 1fr;gap:24px;background:#f6f8fb;padding:18px 20px;border-radius:12px;margin:18px 0 22px}
body.public .client-v2>div{display:flex!important;flex-direction:column!important;gap:6px!important}
body.public .client-v2 b{display:block!important;font-size:17px;color:#17345d;line-height:1.25}
body.public .client-v2 span{display:block!important;color:#647487;line-height:1.3}
body.public .client-v2 .agency{text-align:right}
body.public .item.item-v2{border:1px solid #dfe6ee;border-radius:14px;padding:24px;margin:18px 0;background:#fff}
body.public .item-top{display:flex;justify-content:space-between;align-items:flex-start;gap:22px;border-bottom:1px solid #edf1f5;padding-bottom:14px;margin-bottom:16px}
body.public .item-v2 h2{margin:0;color:#17345d;font-size:22px;line-height:1.25}
body.public .item-v2 .item-top strong{display:block;margin:0;white-space:nowrap;color:#17345d;font-size:19px}
body.public .description{font-size:14px;line-height:1.7;color:#4d5f73}
body.public .includes{margin-top:19px;background:#f7f9fc;border-radius:11px;padding:16px 18px}
body.public .includes h5{margin:0 0 11px;color:#17345d;font-size:13px}
body.public ul.included{display:block!important;list-style:none!important;padding:0!important;margin:0!important}
body.public ul.included li{display:block!important;list-style:none!important;position:relative!important;padding:6px 0 6px 25px!important;margin:0!important;font-size:14px;line-height:1.4}
body.public ul.included li::marker{content:""!important}
body.public ul.included li::before{content:"✓"!important;display:block!important;position:absolute!important;left:0!important;top:6px!important;color:#087cc1!important;font-weight:900!important}
body.public .qty-note{margin-top:13px;font-size:12px;color:#7a8998}
body.public .grand{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:20px;background:#17345d;color:#fff;padding:22px 24px;border-radius:14px;margin:20px 0}
body.public .grand>div{display:flex!important;flex-direction:column!important;gap:7px!important}
body.public .grand small{color:#c8d5e4!important}
body.public .grand span{display:block!important;font-size:13px;color:#fff;line-height:1.2}
body.public .grand b{display:block;font-size:26px;white-space:nowrap}
body.public .terms{background:#fff6ec;border-left:4px solid #f58220;padding:17px 18px;border-radius:8px;margin:18px 0;line-height:1.55;font-size:14px}
body.public .terms b{display:block!important;color:#17345d;margin:0 0 9px}
body.public .accept-card{border:1px solid #dfe6ee;border-radius:14px;padding:22px;margin-top:18px}
body.public .accept-card h3{margin:0 0 8px;color:#17345d;font-size:20px}
body.public .accept-card p{font-size:13px;color:#6d7b8b;line-height:1.55;margin:0 0 15px}
body.public .accept-card label{display:block;margin:0;font-size:12px;font-weight:700}
body.public .accept-card input{display:block;width:100%;margin:7px 0 12px;padding:13px;border:1px solid #d5dee8;border-radius:9px}
body.public .accept-btn{display:block;width:100%;margin:0;padding:15px;background:#f58220;color:#fff}
body.public .whatsapp-btn{display:block!important;width:100%;text-align:center;background:#087cc1!important;color:#fff!important;margin-top:12px;padding:15px;border-radius:10px;font-weight:800;text-decoration:none}
body.public .accepted-box{background:#eaf7ef;border:1px solid #ccebd8;border-radius:13px;padding:18px;display:flex;flex-direction:column;gap:6px;color:#23794a}
body.public .quote-footer{text-align:center;border-top:1px solid #edf1f5;margin-top:28px;padding:22px 10px 2px;color:#8290a0;font-size:12px;line-height:1.6}
body.public .quote-footer b,body.public .quote-footer span{display:block!important;margin:4px 0!important}
@media(max-width:650px){
 body.public .quote.quote-v2{margin:0 auto;min-height:100vh;border-radius:0;padding:22px 20px;box-shadow:none}
 body.public .quotehead img{width:175px}
 body.public .quote-title{align-items:flex-start;padding-top:23px}
 body.public .quote-title h1{font-size:30px}
 body.public .valid{padding-top:1px}
 body.public .client.client-v2{grid-template-columns:1fr;gap:15px;padding:17px}
 body.public .client-v2 .agency{text-align:left;border-top:1px solid #e5ebf1;padding-top:14px}
 body.public .item.item-v2{padding:20px}
 body.public .item-top{flex-direction:column;gap:10px}
 body.public .item-v2 .item-top strong{align-self:flex-end;font-size:18px}
 body.public .description,body.public ul.included li{font-size:14px}
 body.public .grand{align-items:flex-end!important;padding:20px;gap:15px}
 body.public .grand b{font-size:22px}
}
/* Ajuste estructural V3.1 */
body.public .client-v2 .client-block{display:block!important}
body.public .client-v2 .meta-label{display:block!important;font-size:10px;letter-spacing:.08em;color:#7b8998;margin:0 0 7px!important;line-height:1.2}
body.public .client-v2 .meta-main{display:block!important;font-size:17px;font-weight:700;color:#17345d;margin:0 0 5px!important;line-height:1.25}
body.public .client-v2 .meta-sub{display:block!important;color:#647487;margin:0!important;line-height:1.3}
body.public .included-checks{display:block!important;margin:0!important}
body.public .included-row{display:flex!important;align-items:flex-start!important;gap:10px!important;padding:5px 0!important;font-size:14px;line-height:1.4}
body.public .included-row .check{display:inline-block!important;flex:0 0 16px;color:#087cc1;font-weight:900}
body.public .grand .grand-copy{display:block!important}
body.public .grand .grand-label{display:block!important;font-size:10px;letter-spacing:.08em;color:#c8d5e4;margin:0 0 7px!important;line-height:1.2}
body.public .grand .grand-sub{display:block!important;font-size:13px;color:#fff;margin:0!important;line-height:1.2}
/* Panel administrativo V5 */
.admin-search{display:flex;gap:10px;margin:0 0 18px}.admin-search input{flex:1;max-width:520px}
.admin-status{display:inline-block;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800}.st-draft{background:#eef1f4;color:#586675}.st-sent{background:#e8f5ed;color:#23794a}.st-accepted{background:#e7f1ff;color:#1763a0}.st-rejected,.st-expired{background:#fbeaea;color:#a13c3c}
.actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.actions form{margin:0}.act{border:0;border-radius:7px;padding:7px 9px;text-decoration:none!important;font:inherit;font-size:12px;cursor:pointer;background:#eef3f8;color:#17345d}.act.view{background:#e8f2fb;color:#0870b2}.act.edit{background:#fff2e7;color:#b85b0c}.act.duplicate{background:#f0ecfb;color:#6046a8}.act.copy{background:#edf2f6}.act.wa{background:#e8f7ee;color:#177341}.act.delete{background:#fbeaea;color:#a13c3c}
@media(max-width:700px){.admin-search{flex-wrap:wrap}.actions{min-width:230px}}
/* ===== MSRok Panel Administrativo V5.1 ===== */
body:not(.public) header{
  display:flex;align-items:center;gap:28px;padding:0 32px;background:#fff;
  border-bottom:1px solid #dfe6ee;min-height:76px
}
body:not(.public) header img{width:165px;height:auto}
body:not(.public) header b{font-size:20px;color:#17345d}
body:not(.public) header a{margin-left:auto!important;background:#eef3f8;color:#17345d;
  text-decoration:none;padding:9px 13px;border-radius:8px;font-size:13px;font-weight:700}
body:not(.public) main{max-width:1120px;margin:0 auto;padding:46px 24px}
body:not(.public) .admin-search{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;
  gap:10px!important;align-items:center;margin:0 0 20px!important}
body:not(.public) .admin-search input{width:100%!important;max-width:none!important;margin:0!important;height:48px}
body:not(.public) .admin-search .btn{height:48px;margin:0!important;display:flex;align-items:center}
body:not(.public) .table table{width:100%;border-collapse:collapse}
body:not(.public) .table th{padding:13px 12px;text-align:left;white-space:nowrap}
body:not(.public) .table td{padding:16px 12px;vertical-align:middle;border-top:1px solid #edf1f5}
body:not(.public) .admin-status{display:inline-block!important;padding:7px 11px!important;
  border-radius:999px!important;font-size:12px!important;font-weight:800!important;white-space:nowrap}
body:not(.public) .st-draft{background:#eef1f4!important;color:#586675!important}
body:not(.public) .st-sent{background:#e8f5ed!important;color:#23794a!important}
body:not(.public) .st-accepted{background:#e7f1ff!important;color:#1763a0!important}
body:not(.public) .st-rejected,body:not(.public) .st-expired{background:#fbeaea!important;color:#a13c3c!important}
body:not(.public) .actions{display:flex!important;flex-wrap:wrap!important;gap:7px!important;align-items:center!important}
body:not(.public) .actions form{display:inline-flex!important;margin:0!important}
body:not(.public) .actions .act{display:inline-flex!important;align-items:center!important;justify-content:center!important;
  border:0!important;border-radius:7px!important;padding:8px 10px!important;text-decoration:none!important;
  font-family:inherit!important;font-size:12px!important;font-weight:700!important;line-height:1!important;
  cursor:pointer!important;white-space:nowrap!important}
body:not(.public) .actions .view{background:#e8f2fb!important;color:#0870b2!important}
body:not(.public) .actions .edit{background:#fff2e7!important;color:#b85b0c!important}
body:not(.public) .actions .duplicate{background:#f0ecfb!important;color:#6046a8!important}
body:not(.public) .actions .copy{background:#edf2f6!important;color:#34495e!important}
body:not(.public) .actions .wa{background:#e8f7ee!important;color:#177341!important}
body:not(.public) .actions .delete{background:#fbeaea!important;color:#a13c3c!important}
body:not(.public) .actions .view::before{content:"👁 ";margin-right:4px}
body:not(.public) .actions .edit::before{content:"✎ ";margin-right:4px}
body:not(.public) .actions .duplicate::before{content:"⧉ ";margin-right:4px}
body:not(.public) .actions .copy::before{content:"🔗 ";margin-right:4px}
body:not(.public) .actions .wa::before{content:"↗ ";margin-right:4px}
body:not(.public) .actions .delete::before{content:"× ";margin-right:4px}
@media(max-width:850px){
 body:not(.public) header{padding:0 18px;gap:14px}
 body:not(.public) header img{width:135px}
 body:not(.public) header b{font-size:16px}
 body:not(.public) main{padding:28px 15px}
 body:not(.public) .admin-search{grid-template-columns:1fr auto!important}
 body:not(.public) .admin-search a.btn{grid-column:1/-1;width:max-content}
 body:not(.public) .table{overflow-x:auto}
 body:not(.public) .table table{min-width:900px}
}
/* Vista pública final V3.2 */
body.public .valid{display:block!important;text-align:right!important}
body.public .valid-label{display:block!important;font-size:10px!important;letter-spacing:.08em!important;color:#7b8998!important;margin:0 0 7px!important;line-height:1.2!important}
body.public .valid-date{display:block!important;font-size:14px!important;font-weight:700!important;color:#17345d!important;line-height:1.2!important}
body.public .included-row{display:grid!important;grid-template-columns:18px 1fr!important;column-gap:9px!important;align-items:start!important;padding:5px 0!important}
body.public .included-row .check{display:block!important;width:18px!important;text-align:center!important;color:#087cc1!important;font-weight:900!important}
body.public .quote-footer .footer-brand{display:block!important;font-weight:700!important;color:#52657a!important;margin:0 0 7px!important}
body.public .quote-footer .footer-services{display:block!important;color:#8290a0!important;margin:0!important}
@media(max-width:650px){body.public .valid{min-width:92px!important}}
