:root{--ink:#19332f;--muted:#6d7d78;--green:#174e43;--lime:#e5f2c9;--line:#e1e7e0;--bg:#f6f7f3;--white:#fff;--red:#b44e3d;--shadow:0 14px 50px #16392d12;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);font-size:14px;background:var(--bg)}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}button,a{ -webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:var(--green)}button{border:0}input,select,textarea{width:100%;border:1px solid #ccd7cd;border-radius:10px;padding:12px;background:#fff;color:var(--ink);min-height:44px}textarea{resize:vertical;min-height:130px;line-height:1.6}input[type=checkbox]{width:18px;min-height:18px;height:18px;accent-color:var(--green)}:focus-visible{outline:3px solid #83ad63;outline-offset:3px}input:focus,textarea:focus,select:focus{border-color:var(--green)}h1,h2,h3,p{margin-top:0}h1{font-size:32px;letter-spacing:-1.2px;font-weight:650;margin-bottom:9px}h2{font-size:19px;letter-spacing:-.4px}h3{font-size:17px;margin-bottom:8px}p{line-height:1.6}.muted{color:var(--muted)}.small{font-size:12px}.eyebrow{text-transform:uppercase;letter-spacing:1.8px;font-size:10px;font-weight:750;color:var(--muted)}.row{display:flex;align-items:center;gap:12px}.between{justify-content:space-between}.wrap{flex-wrap:wrap}.grow{flex:1;min-width:0}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 17px;min-height:44px;border-radius:10px;font-weight:650;background:#edf1e9;color:var(--ink);text-decoration:none;white-space:nowrap}.btn:hover{filter:brightness(.96)}.btn.primary{background:var(--green);color:white}.btn.outline{background:white;border:1px solid var(--line)}.btn.danger{background:#fcebe7;color:#a63d2b}.btn.small{padding:8px 12px;min-height:36px;font-size:12px}.icon{width:19px;height:19px;flex-shrink:0;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.icon-btn{background:transparent;border:1px solid var(--line);border-radius:9px;min-width:40px;min-height:40px;color:var(--muted);display:inline-flex;align-items:center;justify-content:center}.badge{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:650;padding:5px 9px;border-radius:7px;background:#eff2ed;white-space:nowrap}.badge.urgent{color:#ab4935;background:#fff0e8}.badge.pending{color:#7b6928;background:#faf3d9}.badge.in_progress{color:#3b64a0;background:#eaf0fb}.badge.done{color:#2d7250;background:#e8f3e9}.badge.unread{background:var(--lime);color:var(--green)}.avatar{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:#e9eee6;color:var(--green);width:35px;height:35px;font-size:11px;font-weight:750;flex-shrink:0}.avatar.me{background:#daebc4}.hidden{display:none!important}.loading{padding:80px;text-align:center;color:var(--muted)}
.shell{display:grid;grid-template-columns:240px minmax(0,1fr);min-height:100dvh}.sidebar{position:fixed;width:240px;top:0;bottom:0;border-right:1px solid var(--line);background:#fbfcf8;display:flex;flex-direction:column;padding:31px 20px 20px;z-index:10}.brand{display:flex;align-items:center;gap:11px;font-size:23px;font-weight:750;letter-spacing:-.8px;margin:0 10px 38px}.brand img{height:36px;width:36px}.workspace{margin:0 10px 26px;padding-bottom:25px;border-bottom:1px solid var(--line)}.workspace strong{display:block;font-size:13px;margin:7px 0}.workspace .dot{color:#5b8c40;font-size:11px}.nav-label{margin:0 13px 12px}.nav-btn{width:100%;text-align:left;border-radius:10px;padding:13px 14px;margin:2px 0;background:transparent;color:#60726b;display:flex;align-items:center;gap:12px;font-weight:550;min-height:46px}.nav-btn.active{background:#eaf0e2;color:var(--green);font-weight:700}.nav-btn:hover{background:#eef2e8}.nav-count{margin-left:auto;background:#d9e6ca;padding:2px 7px;border-radius:6px;font-size:11px}.sidebar-foot{margin-top:auto}.tip{border:1px solid var(--line);border-radius:13px;padding:16px;margin-top:30px;background:#f2f5ed}.tip .icon{color:#638c45;margin-bottom:10px}.tip p{font-size:12px;margin:7px 0 0;color:var(--muted)}.user-menu{padding-top:22px;margin-top:20px;border-top:1px solid var(--line)}.user-menu button{margin-left:auto}.main{grid-column:2;min-width:0}.topbar{height:77px;padding:0 40px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;background:#ffffff80}.topbar .breadcrumb{color:var(--muted);font-size:12px}.topbar .breadcrumb strong{color:var(--ink);font-weight:500}.online{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:7px}.online i{width:6px;height:6px;border-radius:50%;background:#6e9c52}.content{padding:35px 40px 60px;max-width:1600px;margin:auto}.heading{margin-bottom:28px}.heading p{color:var(--muted);margin-bottom:0}.heading .btn{padding:13px 19px}.date-label{color:var(--muted);font-size:12px;margin-bottom:15px}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:34px}.stat{background:white;border:1px solid var(--line);border-radius:14px;padding:20px 22px;position:relative}.stat.highlight{background:var(--green);color:white;border-color:var(--green)}.stat-top{font-size:12px;display:flex;justify-content:space-between;align-items:center;gap:8px}.stat-top .icon{color:#819478}.stat.highlight .stat-top .icon{color:#cbe5a6}.stat strong{display:block;font-size:35px;font-weight:600;letter-spacing:-1px;margin:12px 0 6px;line-height:1.1}.stat small{font-size:11px;color:var(--muted)}.stat.highlight small{color:#c9dccd}.section-head{margin-bottom:17px}.section-head h2{margin:0}.section-head .sub{font-size:12px;color:var(--muted);margin-top:5px}.section-head .icon{color:#60824f}.mine-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-bottom:32px}.message-card{background:white;border:1px solid var(--line);border-radius:14px;padding:20px;cursor:pointer;transition:transform .12s,border-color .12s;position:relative;min-width:0}.message-card:hover{transform:translateY(-2px);border-color:#9ab18e;box-shadow:0 6px 20px #15372606}.message-card.urgent-card{border-top:3px solid #d39764;padding-top:18px}.card-top{margin-bottom:19px}.card-ref{color:var(--muted);font-size:11px}.message-card h3{overflow-wrap:anywhere}.message-card .preview{font-size:13px;color:#708078;line-height:1.65;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;min-height:64px;white-space:pre-wrap;overflow-wrap:anywhere;margin:10px 0 18px}.card-contact{font-size:12px;color:var(--muted);display:flex;gap:7px;align-items:center;margin-top:6px}.card-contact .icon{width:14px;height:14px}.card-bottom{border-top:1px solid #edf0e9;padding-top:14px;margin-top:15px;font-size:11px;color:var(--muted)}.card-bottom .avatar{height:27px;width:27px;font-size:9px}.due{font-size:11px;color:#9f603d;margin-top:10px}.table-box{background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden}.filters{padding:17px 19px;display:flex;gap:10px;flex-wrap:wrap;border-bottom:1px solid var(--line);align-items:center}.search{flex:1;min-width:180px;position:relative}.search input{padding-left:36px;background:#f9faf7;border-color:#e5e9e0;font-size:12px}.search .icon{position:absolute;left:11px;top:13px;width:16px;height:16px;color:#82917c}.filters select{width:auto;max-width:190px;font-size:12px;background:#fff}.filter-extra{padding:14px 19px;background:#fafbf8;border-bottom:1px solid var(--line);display:flex;gap:15px;align-items:end;flex-wrap:wrap}.filter-extra label{font-size:12px;flex:1;min-width:130px}.filter-extra input{margin-top:5px}.filter-check{display:flex;gap:7px;align-items:center;min-height:44px}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;font-size:12px;text-align:left}thead{background:#fafbf8;color:var(--muted);font-size:10px;letter-spacing:.7px;text-transform:uppercase}th{font-weight:650;padding:14px 19px}td{padding:17px 19px;border-top:1px solid #edf0e9;vertical-align:middle}tbody tr{cursor:pointer}tbody tr:hover{background:#fafcf6}td .contact-name{font-weight:650;font-size:13px;margin-bottom:5px}td .snippet{max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}td .recipient{display:flex;gap:7px;align-items:center}td .recipient .avatar{height:26px;width:26px;font-size:9px}.check-btn{width:28px;height:28px;border:1px solid #cdd9cb;border-radius:8px;background:white;color:var(--green);display:flex;align-items:center;justify-content:center}.check-btn:hover{background:var(--lime)}.check-btn.checked{background:#e2efdc;border-color:#d2e3c8}.check-btn .icon{height:16px;width:16px}.pagination{padding:14px 19px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:11px}.empty{text-align:center;padding:45px 24px;background:#fcfdf9;border:1px dashed #d6dfcf;border-radius:13px;margin-bottom:28px}.empty .icon{width:32px;height:32px;color:#71925c;margin-bottom:12px}.empty h3{font-size:15px}.empty p{font-size:12px;color:var(--muted);margin-bottom:0}.table-box .empty{margin:20px;border:0}.mobile-menu{display:none}
dialog{border:1px solid var(--line);border-radius:19px;padding:0;width:min(720px,calc(100% - 28px));max-height:92dvh;box-shadow:0 30px 100px #102d3930;color:var(--ink);background:#fff}dialog::backdrop{background:#142c2960;backdrop-filter:blur(3px)}.modal-head{padding:23px 28px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:16px;position:sticky;top:0;background:#fff;z-index:2}.modal-head h2{margin:0;font-size:22px}.modal-head p{margin:5px 0 0;font-size:12px;color:var(--muted)}.modal-body{padding:24px 28px}.modal-foot{display:flex;justify-content:flex-end;gap:10px;padding:18px 28px;border-top:1px solid var(--line);background:#fafbf8}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:19px}.field{display:block;font-weight:600;font-size:12px;margin-bottom:18px}.field input,.field textarea,.field select{margin-top:8px;font-weight:400}.field .hint{font-size:11px;font-weight:400;color:var(--muted);display:block;margin-top:6px}.form-grid .field{margin-bottom:0}.full{grid-column:1/-1}.recipient-picker{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px;max-height:180px;overflow:auto}.person-chip{font-weight:500;font-size:12px;border:1px solid var(--line);background:#fafbf8;border-radius:9px;padding:8px 10px;display:flex;align-items:center;gap:7px;cursor:pointer}.person-chip:has(input:checked){border-color:#71985e;background:#eef5e2}.form-error{color:#aa4133;background:#fff1ed;padding:11px 14px;border-radius:9px;font-size:12px;margin:0 0 15px}.detail-meta{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:20px 0}.detail-meta .eyebrow{display:block;margin-bottom:6px}.message-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;background:#f8faf5;padding:20px;border-radius:12px;border:1px solid var(--line);font-size:14px;margin:20px 0}.detail-actions{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0 25px}.tabs{display:flex;border-bottom:1px solid var(--line);gap:20px;margin:25px 0 18px}.tab{padding:10px 0;border-bottom:2px solid transparent;background:none;color:var(--muted);font-weight:600;font-size:12px}.tab.active{border-color:var(--green);color:var(--green)}.comment{padding:13px 0;border-bottom:1px solid #edf0e9}.comment p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;margin:8px 0}.comment textarea{min-height:80px}.timeline-item{font-size:12px;padding:12px 0;border-bottom:1px solid #eef1e9;line-height:1.7}.timeline-item details{margin-top:8px}.timeline-item pre{font-family:inherit;white-space:pre-wrap;overflow-wrap:anywhere;background:#f7f9f3;padding:12px;font-size:11px}.users-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.user-card{padding:22px;background:white;border:1px solid var(--line);border-radius:14px}.user-card h3{margin:14px 0 5px}.user-card .btn{margin-top:15px}.admin-settings{padding:24px;background:white;border:1px solid var(--line);border-radius:14px;margin:25px 0}.admin-settings form{max-width:600px}.audit-list{padding:0 20px;background:white;border:1px solid var(--line);border-radius:14px}.account-box{max-width:580px;background:white;padding:28px;border:1px solid var(--line);border-radius:14px}.toast{background:var(--green);color:white;border-radius:12px;padding:14px 20px;box-shadow:var(--shadow);font-size:13px;max-width:400px;margin-top:8px}.toast.error{background:#933e33}#toasts{position:fixed;right:24px;bottom:24px;z-index:100}.auth-page{display:grid;grid-template-columns:1fr 1fr;min-height:100dvh}.auth-story{background:var(--green);color:#fff;padding:55px;display:flex;flex-direction:column;justify-content:space-between}.auth-story .brand{margin:0}.auth-story h1{font-size:54px;letter-spacing:-2px;line-height:1.15;max-width:500px}.auth-story h1 em{font-style:normal;color:#d9ecb0}.auth-story p{max-width:390px;color:#d1dfd2;font-size:16px}.story-note{border:1px solid #ffffff30;border-radius:15px;padding:24px;max-width:390px;transform:rotate(-3deg);background:#ffffff0a;margin:38px 0}.story-note .eyebrow{color:#d9ecb0}.story-note h3{font-size:20px;margin-top:13px}.story-note p{font-size:13px;margin:10px 0}.auth-side{display:flex;align-items:center;justify-content:center;padding:45px 30px}.auth-form{width:100%;max-width:370px}.auth-form h2{font-size:30px;letter-spacing:-1px;margin:15px 0 8px}.auth-form>.muted{margin-bottom:30px}.auth-form .btn{width:100%;margin-top:16px}.auth-footer{margin-top:30px;font-size:11px;line-height:1.8;color:var(--muted)}.password-line{position:relative}.password-line input{padding-right:48px}.password-line button{position:absolute;right:5px;top:11px;border:0;background:transparent;color:var(--muted);width:35px;height:35px}.skip-link{position:fixed;left:12px;top:-100px;z-index:200;background:white;padding:12px}.skip-link:focus{top:12px}button:disabled{opacity:.55;cursor:wait}.print-only{display:none}
@media(min-width:1500px){.content{padding-top:42px}.mine-grid{gap:20px}.message-card{padding:24px}}
@media(max-width:1150px){.shell{grid-template-columns:205px minmax(0,1fr)}.sidebar{width:205px;padding-left:14px;padding-right:14px}.content{padding:28px 24px}.topbar{padding:0 24px}.mine-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mine-grid .message-card:nth-child(3){display:none}.stats{gap:10px}.stat{padding:16px}.users-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.table-date{display:none}}
@media(max-width:760px){h1{font-size:27px}.shell{display:block}.sidebar{transform:translateX(-100%);transition:transform .2s;width:245px;box-shadow:var(--shadow)}.sidebar.open{transform:translateX(0)}.main{width:100%}.topbar{height:64px;padding:0 18px}.mobile-menu{display:inline-flex}.topbar .breadcrumb{display:none}.content{padding:25px 18px 45px}.heading{align-items:flex-start;margin-bottom:23px}.heading p{font-size:12px;max-width:220px}.heading .btn{font-size:12px;padding:10px 13px}.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:27px}.stat{padding:15px 17px}.stat strong{font-size:30px;margin:10px 0 4px}.stat-top{font-size:11px}.stat small{font-size:10px}.mine-grid{display:flex;overflow-x:auto;gap:12px;margin-right:-18px;padding-right:18px;padding-bottom:5px;scroll-snap-type:x mandatory}.mine-grid .message-card,.mine-grid .message-card:nth-child(3){display:block;flex:0 0 86%;scroll-snap-align:start}.section-head h2{font-size:17px}.section-head .btn{font-size:10px;padding:7px 10px}.filters{padding:12px;gap:8px}.search{flex-basis:100%}.filters select{flex:1;min-width:0;max-width:none;font-size:11px;padding:10px 7px}.filters>.icon-btn{min-width:42px}.table-scroll{overflow:visible}table,tbody{display:block}thead{display:none}tr{display:grid;grid-template-columns:minmax(0,1fr) auto;border-bottom:1px solid var(--line);padding:15px;gap:10px;position:relative}td{display:block;border:0;padding:0}.table-contact{grid-column:1;grid-row:1}.table-status{grid-column:2;grid-row:1}.table-recipient{grid-column:1;grid-row:2}.table-action{grid-column:2;grid-row:2;justify-self:end}.table-date{display:none}td .snippet{max-width:100%;font-size:11px}td .contact-name{font-size:14px}.pagination{padding:12px;font-size:10px}.pagination .btn{min-height:36px;padding:7px 10px}.users-grid{grid-template-columns:1fr}.modal-head{padding:18px}.modal-body{padding:20px 18px}.modal-foot{padding:16px 18px}.form-grid{grid-template-columns:1fr;gap:17px}.full{grid-column:1}.detail-meta{gap:15px;font-size:12px}.modal-head h2{font-size:20px}.auth-page{display:block;background:var(--bg)}.auth-story{padding:25px}.auth-story .brand{font-size:21px}.auth-story .story-content,.auth-story>.small{display:none}.auth-side{padding:40px 24px}.auth-form{max-width:420px}.auth-form h2{font-size:29px}.tip{display:none}.online{font-size:10px}.date-label{font-size:10px}.account-box{padding:20px}#toasts{right:14px;left:14px;bottom:15px}.toast{max-width:none}.admin-settings{padding:18px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
@media print{.sidebar,.topbar,.stats,.filters,.filter-extra,.pagination,.heading>.btn,.detail-actions,.modal-head button,.modal-foot,#toasts,.tabs,form{display:none!important}.shell,.main{display:block}.content{padding:0}.mine-grid{display:none}.table-box{border:0}dialog[open]{position:absolute;max-height:none;width:100%;border:0;box-shadow:none;inset:0;margin:0}body:has(dialog[open]) #app{display:none}dialog::backdrop{background:white}.message-body{background:white}.table-scroll{overflow:visible}}
/* Identidad corporativa Applus+. El SVG local puede sustituirse por el original. */
:root{--ink:#393b3c;--muted:#7c7d7e;--green:#b64a00;--lime:#fff0e1;--line:#e8e5e1;--bg:#f7f7f5;--shadow:0 14px 50px #42312610}
.brand{margin-bottom:30px}.brand img{width:145px;height:auto;max-height:55px}.workspace .dot{color:#a35316}.nav-btn.active{background:#fff0e3;color:#ac4800}.nav-btn:hover{background:#faf0e7}.nav-count{background:#f8d8bc}.stat.highlight{background:#54504e;border-color:#54504e}.stat.highlight .stat-top .icon{color:#ffad74}.stat.highlight small{color:#dfd9d5}.avatar,.avatar.me{background:#fff0e1;color:#a94a0b}.tip{background:#fcf8f3}.tip .icon,.section-head .icon{color:#c56523}.btn.primary{background:#bd4e00}.person-chip:has(input:checked){border-color:#dc8e58;background:#fff2e6}.auth-story{background:#504b48}.auth-story .brand{background:white;align-self:flex-start;padding:5px 12px;border-radius:10px}.auth-story h1 em{color:#ff9b54}.auth-story p{color:#e2dbd5}.story-note .eyebrow{color:#ffb680}.story-note{border-color:#ffffff25}.check-btn:hover{background:#fff0df}.check-btn.checked{background:#eef4e9;border-color:#d7e3cd;color:#39724c}.message-body{background:#faf9f6}.top-brand{width:83px;height:auto}.auth-form .brand{margin:0 0 22px}.auth-form .brand img{width:120px}.stat.highlight .stat-top{color:#fff}.stat.highlight strong{color:white}

/* Remitente visible en todos los listados, también en móvil. */
.mobile-field-label{display:none}.table-sender .recipient{max-width:210px}.table-sender .recipient>span:last-child{overflow-wrap:anywhere}
@media(max-width:760px){.table-sender{grid-column:1;grid-row:2}.table-recipient{grid-column:1;grid-row:3}.table-action{grid-column:2;grid-row:2 / span 2;align-self:center}.table-sender,.table-recipient{display:flex;align-items:center;gap:7px}.mobile-field-label{display:inline-block;width:28px;flex-shrink:0;color:var(--muted);font-size:10px}.table-sender .recipient,.table-recipient .recipient{min-width:0;max-width:none}.table-sender .recipient>span:last-child,.table-recipient .recipient>span:last-child{overflow-wrap:anywhere;min-width:0}}
