/* Dashboard de proveedores: mismo lenguaje visual que el acceso. */
:root{color-scheme:light;--ink:#203958;--muted:#687a91;--blue:#275fa9;--line:#dce4ef;--paper:#fafcff}
*{box-sizing:border-box;margin:0;padding:0}
body{position:relative;isolation:isolate;min-height:100vh;background:#eaf0f8;color:var(--ink);font-family:"Segoe UI",Arial,sans-serif;-webkit-font-smoothing:antialiased}
.header{position:relative;z-index:2;background:#fafcff;border-bottom:1px solid var(--line);padding:22px 32px}
.header-content{max-width:1200px;margin:auto;display:flex;justify-content:space-between;align-items:center;gap:28px}
.header-left{color:inherit;text-decoration:none;border-radius:6px;display:flex;align-items:center;gap:16px;min-width:0}
.logo-container{display:flex;align-items:center;flex-shrink:0;background:transparent}
.logo-container img{display:block;width:58px;height:58px;object-fit:contain}
.header h1{font-size:17px;line-height:1.4;font-weight:600;letter-spacing:-.3px}
.user-info{display:flex;align-items:center;gap:22px;min-width:0}
.user-name{font-size:12px;text-align:right;line-height:1.6;overflow-wrap:anywhere;max-width:260px}
.user-name strong{font-size:13px;font-weight:600}
.user-name small{color:var(--muted);font-size:11px}
.lang-selector{display:flex;gap:5px;flex-shrink:0}
.lang-link{display:grid;place-items:center;min-width:40px;min-height:40px;border:1px solid transparent;border-radius:8px;text-decoration:none;transition:background .15s}
.lang-link .fi{width:24px;height:16px;border-radius:2px;font-size:18px;box-shadow:0 0 0 1px #173b6c18}
.lang-link:hover{background:#edf3fb}
.lang-link.active{background:#e6effb;border-color:#cdddf2}
.btn-logout{display:inline-flex;align-items:center;justify-content:center;padding:11px 16px;border:1px solid #b91c1c;border-radius:9px;font-size:12px;font-weight:600;color:#fff;text-decoration:none;white-space:nowrap;background:#b91c1c;transition:background .15s,border-color .15s}
.btn-logout:hover{background:#991b1b;border-color:#991b1b}
.container{position:relative;z-index:1;max-width:1264px;margin:40px auto;padding:0 32px}
.top-grid{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:22px;margin-bottom:30px}
.welcome-card{position:relative;overflow:hidden;isolation:isolate;min-width:0;padding:36px 40px;border-radius:20px;background:#173b6c;color:#fff;box-shadow:0 12px 35px #193b6510}
.welcome-card::after{content:"";position:absolute;z-index:-1;width:290px;height:290px;right:-115px;top:-135px;border:1px solid #ffffff18;border-radius:50%;box-shadow:0 0 0 38px #ffffff05,0 0 0 76px #ffffff04;pointer-events:none}
.eyebrow{display:block;margin-bottom:16px;font-size:10px;font-weight:700;letter-spacing:2px;text-transform:uppercase;color:#b8d5fc}
.welcome-card h2{font-size:clamp(23px,2.5vw,32px);line-height:1.25;font-weight:500;letter-spacing:-.8px;overflow-wrap:anywhere;margin-bottom:14px}
.welcome-card p{max-width:640px;font-size:14px;line-height:1.8;color:#cadbf1}
.stats{display:flex}
.stat-card{width:100%;padding:30px;border-radius:20px;background:var(--paper);border:1px solid #fff;box-shadow:0 12px 35px #193b650c;display:flex;flex-direction:column;justify-content:center}
.stat-card h3{font-size:11px;font-weight:600;letter-spacing:1px;text-transform:uppercase;line-height:1.6;color:var(--muted)}
.stat-card .number{font-size:58px;font-weight:600;letter-spacing:-2px;line-height:1.2;color:var(--blue);margin-top:12px;font-variant-numeric:tabular-nums}
.pedidos-section{background:var(--paper);border:1px solid #fff;border-radius:20px;box-shadow:0 16px 45px #193b650c;overflow:hidden}
.section-heading{display:flex;align-items:center;gap:12px;padding:27px 30px;border-bottom:1px solid var(--line)}
.section-heading h2{font-size:19px;line-height:1.4;font-weight:600;letter-spacing:-.4px}
.order-count{display:inline-grid;place-items:center;min-width:29px;padding:5px 9px;border:1px solid #dce6f4;border-radius:8px;color:var(--blue);background:#edf3fb;font-size:12px;font-weight:600}
.table-container{overflow-x:auto}
table{width:100%;border-collapse:collapse;text-align:left}
thead{background:#f0f5fc}
th{padding:16px 22px;font-size:12px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:#627894;white-space:nowrap}
td{padding:20px 22px;border-bottom:1px solid #e5ecf5;font-size:15px;line-height:1.6;color:var(--muted)}
td:nth-child(2){font-weight:650;color:var(--ink);font-variant-numeric:tabular-nums}
td:nth-child(3){font-weight:700;color:var(--ink);min-width:200px;max-width:480px;overflow-wrap:anywhere}
th:last-child,td:last-child{text-align:right}
tbody tr{transition:background .15s}
tbody tr:hover{background:#f1f6fd}
tbody tr:last-child td{border-bottom:0}
.badge{display:inline-flex;align-items:center;gap:7px;padding:5px 10px;border-radius:7px;font-size:13px;font-weight:600;white-space:nowrap}
.badge-pending{background:#fff4df;color:#856019;border:1px solid #f3e2ba}
.badge-pending::before{content:"";width:5px;height:5px;background:#b78528;border-radius:50%}
.btn-view{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:40px;padding:10px 15px;border:1px solid var(--blue);border-radius:8px;background:var(--blue);color:#fff;font-size:14px;font-weight:600;text-decoration:none;white-space:nowrap;transition:background .15s}
.btn-view::after{content:"→";font-size:17px;line-height:1}
.btn-view:hover{background:#1c4780;border-color:#1c4780}
.no-pedidos{text-align:center;padding:65px 24px;color:var(--muted);font-size:14px;line-height:1.7}
.empty-icon{display:grid;place-items:center;width:56px;height:56px;margin:0 auto 18px;border:1px solid var(--line);border-radius:16px;background:#edf3fb;color:var(--blue)}
.empty-icon svg{width:26px;height:26px}
.dashboard-footer{display:flex;justify-content:space-between;gap:16px;margin:25px 3px 0;color:var(--muted);font-size:11px;line-height:1.8}
a:focus-visible{outline:3px solid #b38a31;outline-offset:4px}
@media(max-width:1000px){.header-content{flex-wrap:wrap;gap:20px}.user-info{flex:1;justify-content:flex-end;gap:15px}.top-grid{grid-template-columns:minmax(0,1fr) 220px}.welcome-card{padding:30px}.header h1{max-width:180px}}
@media(max-width:700px){.header{padding:18px 20px}.header-content{gap:17px}.header-left{gap:12px}.header h1{max-width:none;font-size:16px}.logo-container img{width:45px;height:45px}.user-info{width:100%;flex-wrap:wrap;justify-content:space-between;gap:12px}.user-name{order:3;flex-basis:100%;max-width:none;text-align:left}.user-name br{display:none}.user-name small{margin-left:10px}.container{margin:24px auto;padding:0 16px}.top-grid{grid-template-columns:1fr;gap:14px;margin-bottom:22px}.welcome-card{padding:28px 25px;border-radius:16px}.stat-card{padding:20px 25px;flex-direction:row;align-items:center;justify-content:space-between;gap:18px;border-radius:16px}.stat-card h3{max-width:180px}.stat-card .number{margin:0;font-size:38px}.section-heading{padding:22px}.section-heading h2{font-size:17px}.pedidos-section{border-radius:16px}th,td{padding:15px 17px}.dashboard-footer{font-size:10px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.balloon{position:absolute;border-radius:49% 51% 48% 48%;box-shadow:inset -12px -12px 25px #173b6c20}
.balloon::before{content:"";position:absolute;top:15%;left:22%;width:22%;height:36%;border-radius:50%;background:#ffffff28;transform:rotate(25deg)}
.balloon::after{content:"";position:absolute;bottom:-7px;left:calc(50% - 5px);border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:8px solid var(--balloon)}
.balloon i{position:absolute;top:calc(100% + 7px);left:50%;height:115px;width:35px;border-left:1px solid #c6d8f070;border-radius:50%;transform:translateX(-50%) rotate(-13deg);transform-origin:top center}
/* Decoración por detrás del acceso, sin interceptar clics ni provocar scroll. */
.floating-background{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none}
.floating-balloon{--balloon:#9fc6f1;width:88px;height:108px;top:calc(100% + 160px);background:var(--balloon);opacity:.55;animation:balloon-rise 32s linear infinite}
.floating-balloon i{border-left-color:#6e92c470;height:100px}
.float-one{left:3%;animation-delay:-5s}
.float-two{left:18%;width:58px;height:73px;--balloon:#c1d9f5;animation-duration:39s;animation-delay:-25s}
.float-three{left:42%;width:76px;height:94px;--balloon:#b3cbed;animation-duration:35s;animation-delay:-17s}
.float-four{right:3%;width:104px;height:130px;--balloon:#aacbf1;animation-duration:37s;animation-delay:-21s}
.float-five{right:18%;width:64px;height:81px;--balloon:#e9c7b5;animation-duration:42s;animation-delay:-10s}
.float-six{left:68%;width:52px;height:66px;--balloon:#c7d9f0;animation-duration:31s;animation-delay:-29s}
.balloon-scene .balloon{animation:balloon-bob 7s ease-in-out infinite;--tilt:12deg}
.balloon-scene .balloon-peach{--tilt:-17deg;animation-delay:-2s;animation-duration:8s}
.balloon-scene .balloon-yellow{--tilt:20deg;animation-delay:-4s;animation-duration:9s}
@keyframes balloon-rise{
    0%{transform:translate3d(0,0,0) rotate(-8deg)}
    50%{transform:translate3d(24px,calc(-50vh - 180px),0) rotate(7deg)}
    100%{transform:translate3d(-12px,calc(-100vh - 360px),0) rotate(-5deg)}
}
@keyframes balloon-bob{
    0%,100%{transform:translateY(0) rotate(var(--tilt))}
    50%{transform:translateY(-14px) rotate(calc(var(--tilt) + 4deg))}
}
@media(max-width:680px){.floating-balloon{opacity:.35}.float-two,.float-three,.float-five{display:none}}
@media(prefers-reduced-motion:reduce){
    *{transition:none!important}
    .floating-balloon,.balloon-scene .balloon{animation:none}
    .float-one{top:15%}.float-two{top:70%}.float-three{top:45%}
    .float-four{top:60%}.float-five{top:8%}.float-six{top:85%}
}
/* Scheduled synchronization indicator, shared by dashboard and order details. */
.sync-status{display:flex;align-items:center;gap:9px;flex-shrink:0;padding:9px 12px;background:#edf3fb;border:1px solid #d4e2f4;border-radius:10px;line-height:1.5}
.sync-label{font-size:11px;font-weight:600;color:var(--ink)}
.sync-status small{font-size:10px;color:var(--muted)}
.sync-time{font-variant-numeric:tabular-nums;color:var(--blue);font-weight:700}
.sync-dot{width:7px;height:7px;border-radius:50%;background:#7499c8}
.sync-status.is-syncing{background:#e0edff;border-color:#8eb5e8}
.is-syncing .sync-dot{background:#275fa9;box-shadow:0 0 0 4px #275fa91a}
@media(max-width:1100px){.header-content{flex-wrap:wrap}.user-info{flex-wrap:wrap;gap:14px}.sync-status{margin-right:auto}}
@media(max-width:600px){.sync-status{order:4;flex-basis:100%;justify-content:center;text-align:left}}

/* Clickable synchronization status and informational dialog. */
.sync-status{font-family:inherit;text-align:left;cursor:pointer;background:#edf8f0;border-color:#b9ddc5;color:#226b3d}
.sync-status .sync-label,.sync-status small,.sync-status .sync-time{color:inherit}
.sync-status .sync-dot{background:#2d9452}
.sync-status.is-syncing{background:#fff0f0;border-color:#edbcbc;color:#ad3030}
.sync-status.is-syncing .sync-dot{background:#d54141;box-shadow:0 0 0 4px #d541411a}
.sync-status:hover{filter:brightness(.97)}
.sync-status:focus-visible,.sync-dialog button:focus-visible{outline:3px solid #275fa9;outline-offset:3px}
.sync-dialog{position:fixed;inset:0;margin:auto;box-sizing:border-box;width:calc(100vw - 48px);max-width:520px;max-height:calc(100dvh - 48px);overflow:auto;padding:28px;border:1px solid #dce4ef;border-radius:18px;background:#fafcff;color:#203958;box-shadow:0 24px 80px #102a4f40;text-align:left}
.sync-dialog::backdrop{background:#102a4f80;backdrop-filter:blur(4px)}
.sync-dialog h2{font-size:20px;line-height:1.4;margin-bottom:16px}
.sync-dialog p{font-size:15px;line-height:1.65;margin-bottom:16px}
.sync-dialog .sync-dialog-schedule{display:grid;gap:5px;font-size:12px;color:#687a91}.sync-dialog-schedule span{display:block}.sync-dialog h2,.sync-dialog p{overflow-wrap:break-word}.sync-dialog:focus{outline:none}@media(max-width:480px){.sync-dialog{padding:22px;width:calc(100vw - 32px);max-height:calc(100dvh - 32px)}.sync-dialog h2{font-size:18px}}
.sync-dialog form{display:flex;justify-content:flex-end;margin-top:22px}
.sync-dialog button{border:0;border-radius:9px;padding:12px 20px;background:#275fa9;color:white;font:600 14px "Segoe UI",Arial,sans-serif;cursor:pointer}
