*{box-sizing:border-box}html,body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;background:#f4efe9;color:#191616}body{min-height:100vh}.hidden{display:none!important}.auth-shell{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 20% 10%,#fff 0,#f4efe9 48%,#e7d8cd 100%)}.auth-card{width:min(420px,100%);background:#fff;border:1px solid #eadfd7;border-radius:26px;padding:32px;box-shadow:0 20px 70px #25181416}.auth-logo{width:88px;height:88px;object-fit:contain;display:block;margin:0 auto 12px}.eyebrow{font-size:11px;letter-spacing:.18em;font-weight:800;text-align:center;color:#a21e2a}.auth-card h1{text-align:center;margin:7px 0}.muted{color:#716865}.auth-card .muted{text-align:center}.auth-card form{display:grid;gap:14px;margin-top:24px}label{display:grid;gap:7px;font-size:13px;font-weight:700}input,select,textarea{font:inherit;border:1px solid #d8ccc4;border-radius:12px;padding:12px;background:#fff;color:#171313}textarea{min-height:90px;resize:vertical}.btn{border:0;border-radius:12px;padding:12px 15px;font-weight:800;cursor:pointer}.btn-primary{background:#a21e2a;color:#fff}.btn-dark{background:#191616;color:#fff}.btn-light{background:#f1e9e3;color:#191616}.full{width:100%}.error{color:#a21e2a;font-size:13px;min-height:18px}.topbar{position:sticky;top:0;z-index:20;height:68px;background:#171313;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 18px;box-shadow:0 4px 18px #0002}.brand{display:flex;align-items:center;gap:10px}.brand img{width:42px;height:42px;object-fit:contain;background:#fff;border-radius:12px}.brand strong{display:block;font-size:15px}.brand small{display:block;color:#c9bdb8;font-size:11px;margin-top:2px}.user-menu{display:flex;align-items:center;gap:8px;font-weight:800;font-size:13px}.icon-btn{width:36px;height:36px;border-radius:11px;border:1px solid #ffffff22;background:#ffffff10;color:#fff;cursor:pointer}.main{max-width:1180px;margin:auto;padding:20px 16px 100px}.view{display:none}.view.active{display:block}.hero{background:#fff;border:1px solid #eadfd7;border-radius:24px;padding:24px;display:flex;justify-content:space-between;gap:20px;align-items:center}.hero h1{margin:4px 0 8px;font-size:30px}.eyebrow2{font-size:11px;letter-spacing:.15em;color:#a21e2a;font-weight:900}.hero-logo{width:100px;height:100px;object-fit:contain}.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:16px}.card{background:#fff;border:1px solid #eadfd7;border-radius:20px;padding:18px}.stat strong{font-size:28px;display:block}.stat small{color:#716865}.section-title{display:flex;justify-content:space-between;align-items:center;margin:26px 0 10px}.section-title h2{font-size:19px;margin:0}.list{display:grid;gap:10px}.row{display:flex;justify-content:space-between;align-items:center;gap:12px}.pill{display:inline-flex;padding:5px 9px;border-radius:999px;background:#f1e9e3;font-size:11px;font-weight:800}.pill.red{background:#f4d8da;color:#8c1722}.event{border-left:5px solid #a21e2a;padding:20px 20px 18px}.event-datetime{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:10px}.event-time{display:inline-flex;align-items:center;justify-content:center;min-width:94px;padding:9px 13px;border-radius:12px;background:#a21e2a;color:#fff;font-size:24px;line-height:1;font-weight:950;letter-spacing:-.04em;font-variant-numeric:tabular-nums}.event-date{font-size:15px;font-weight:850;color:#a21e2a}.event h3{margin:7px 0 4px;font-size:18px;line-height:1.35}.event p{margin:5px 0;color:#665e5b;font-size:13px}.event .actions{margin-top:14px}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.calendar-tabs{display:flex;gap:8px;margin-bottom:14px}.calendar-tabs button.active{background:#a21e2a;color:#fff}.meal{border-top:4px solid #a21e2a}.money{font-weight:900}.negative{color:#a21e2a}.positive{color:#1f6f4a}.bottom-nav{position:fixed;z-index:30;bottom:0;left:0;right:0;background:#171313;color:#fff;display:flex;gap:2px;overflow-x:auto;padding:8px 8px calc(8px + env(safe-area-inset-bottom));box-shadow:0 -6px 20px #0002}.nav-item{flex:0 0 auto;min-width:72px;border:0;background:transparent;color:#bfb3ae;border-radius:12px;padding:7px 8px;cursor:pointer;font-size:16px}.nav-item span{display:block;font-size:10px;margin-top:3px}.nav-item.active{background:#a21e2a;color:#fff}.table-wrap{overflow:auto}.simple-table{width:100%;border-collapse:collapse;font-size:13px}.simple-table th,.simple-table td{text-align:left;padding:10px;border-bottom:1px solid #eee2da}.ticket-thumb{width:64px;height:64px;object-fit:cover;border-radius:10px;border:1px solid #ddd}.empty{padding:30px;text-align:center;color:#7c716c}.toast{position:fixed;right:16px;bottom:90px;background:#171313;color:#fff;padding:12px 16px;border-radius:12px;opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s;z-index:100}.toast.show{opacity:1;transform:translateY(0)}dialog{border:0;border-radius:20px;width:min(560px,calc(100% - 28px));padding:0;box-shadow:0 30px 100px #0005}dialog::backdrop{background:#17131388}.modal-body{padding:22px}.modal-head{display:flex;justify-content:space-between;align-items:center}.close{border:0;background:#f1e9e3;border-radius:9px;width:34px;height:34px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-grid .wide{grid-column:1/-1}@media(max-width:760px){.grid{grid-template-columns:1fr 1fr}.hero{align-items:flex-start}.hero-logo{width:70px;height:70px}.hero h1{font-size:25px}.form-grid{grid-template-columns:1fr}.form-grid .wide{grid-column:auto}.main{padding:14px 12px 100px}.bottom-nav{justify-content:flex-start}.nav-item{min-width:68px}}@media(min-width:1100px){.bottom-nav{left:50%;right:auto;transform:translateX(-50%);width:min(1100px,100%);border-radius:18px 18px 0 0}}
/* Unified Penya El Conill icon and navigation system */
.bottom-nav{align-items:stretch;gap:4px;padding:9px 10px calc(9px + env(safe-area-inset-bottom));background:rgba(23,19,19,.97);backdrop-filter:blur(16px);border-top:1px solid rgba(255,255,255,.08)}
.nav-item{display:flex;flex:1 1 0;min-width:64px;max-width:120px;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:8px 5px;border:1px solid transparent;border-radius:14px;color:#cbbfba;font-size:0;transition:background .18s ease,color .18s ease,transform .18s ease}
.nav-item svg{display:block;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.nav-item span{display:block;font-size:10px;line-height:1.15;font-weight:650;letter-spacing:.01em;margin:0}
.nav-item.active{background:#a21e2a;color:#fff;border-color:#bd3944;box-shadow:0 3px 10px #0002}
.nav-item:not(.active):hover{background:#ffffff0c;color:#fff}
.nav-item:focus-visible{outline:2px solid #e8a1a6;outline-offset:2px}
.admin-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:24px 0 28px}
.admin-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:16px;min-height:178px;width:100%;padding:22px;text-align:left;background:#fff!important;border:1px solid #eadfd7!important;border-radius:20px!important;box-shadow:0 4px 14px #33191409;color:#21191a!important;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.admin-card:hover{transform:translateY(-3px);border-color:#d9b9b2!important;box-shadow:0 12px 28px #33191416}
.admin-icon{display:flex;align-items:center;justify-content:center;text-align:center;width:50px;height:50px;flex:0 0 50px;border-radius:15px;background:#fbefed;color:#a21e2a;font-size:0!important;overflow:hidden}
.admin-icon::before,.admin-icon::after{content:none!important;display:none!important}
.admin-card:nth-child(1) .admin-icon::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E")}
.admin-card:nth-child(2) .admin-icon::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M16 8.5c-.7-1-1.8-1.5-3.5-1.5-1.8 0-3 .9-3 2.2 0 3.4 7 1.2 7 4.6 0 1.4-1.4 2.4-3.5 2.4-1.5 0-2.8-.5-3.7-1.6M12.5 5v14'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M16 8.5c-.7-1-1.8-1.5-3.5-1.5-1.8 0-3 .9-3 2.2 0 3.4 7 1.2 7 4.6 0 1.4-1.4 2.4-3.5 2.4-1.5 0-2.8-.5-3.7-1.6M12.5 5v14'/%3E%3C/svg%3E")}
.admin-card:nth-child(3) .admin-icon::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18m5 5-2 2 4-4'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E")}
.admin-card:nth-child(4) .admin-icon::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11Z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11Z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E")}
.admin-card h3{margin:0 0 6px;font-size:1.05rem;font-weight:750;letter-spacing:-.015em}
.admin-card p{margin:0;color:#817674;font-size:.9rem;line-height:1.45}
.admin-card .chev{position:absolute;right:20px;top:22px;color:#a21e2a;font-size:1.2rem}
@media(max-width:1000px){.admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.admin-grid{grid-template-columns:1fr;gap:12px}.admin-card{min-height:0;flex-direction:row;align-items:center;padding:17px}.admin-card .chev{top:50%;transform:translateY(-50%)}}
@media(max-width:760px){.bottom-nav{gap:1px;padding-left:4px;padding-right:4px}.nav-item{min-width:54px;padding:7px 3px}.nav-item svg{width:20px;height:20px}.nav-item span{font-size:9px}}


/* PENYA EL CONILL — Apple-inspired red & white responsive refresh */
:root{color-scheme:light;--brand-red:#ff0000;--brand-red-dark:#d90000;--brand-tint:#fff0f0;--ink:#171717;--muted:#737373;--line:#e8e8eb;--surface:#ffffff;--canvas:#f7f7f9;--radius-card:22px;--shadow-card:0 4px 18px rgba(0,0,0,.045)}
html{background:var(--canvas);scroll-behavior:smooth;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{background:var(--canvas);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text",Inter,"Segoe UI",sans-serif;font-size:15px;line-height:1.45;overscroll-behavior-y:contain}
button,input,select,textarea{font:inherit}button{touch-action:manipulation}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(255,0,0,.24);outline-offset:2px}
.hidden{display:none!important}
.auth-shell{min-height:100svh;background:#fff;padding:24px 18px calc(24px + env(safe-area-inset-bottom));}
.auth-card{width:min(420px,100%);padding:clamp(24px,6vw,36px);border:1px solid #ededf0;border-radius:28px;background:#fff;box-shadow:0 12px 44px rgba(0,0,0,.055)}
.auth-logo{width:clamp(92px,25vw,124px);height:clamp(92px,25vw,124px);object-fit:contain;margin:0 auto 14px}
.eyebrow,.eyebrow2{color:var(--brand-red);letter-spacing:.12em;font-size:11px;font-weight:800}
.auth-card h1{color:#111;font-size:clamp(27px,7vw,34px);letter-spacing:-.045em;line-height:1.08;margin:10px 0 12px}
.muted,.auth-card .muted{color:var(--muted)}
label{gap:8px;font-size:13px;font-weight:650;color:#333}
input,select,textarea{width:100%;min-width:0;min-height:46px;padding:12px 14px;border:1px solid #dedee3;border-radius:14px;background:#fff;color:#171717;box-shadow:inset 0 1px 1px rgba(0,0,0,.015);transition:border-color .16s,box-shadow .16s}
input:focus,select:focus,textarea:focus{border-color:var(--brand-red);box-shadow:0 0 0 3px rgba(255,0,0,.08);outline:0}textarea{min-height:110px}
.btn{min-height:44px;border-radius:14px;padding:12px 17px;font-weight:700;letter-spacing:-.01em;transition:transform .15s,background .15s,box-shadow .15s}.btn:active{transform:scale(.98)}
.btn-primary{background:var(--brand-red);color:#fff;box-shadow:0 3px 9px rgba(255,0,0,.13)}.btn-primary:hover{background:var(--brand-red-dark)}
.btn-dark{background:#fff;color:#222;border:1px solid var(--line)}.btn-light{background:#f4f4f6;color:#222;border:1px solid transparent}
.link-btn{color:var(--brand-red);background:transparent;border:0;padding:10px;cursor:pointer;font-weight:600}
.error{color:#c90000}
.topbar{height:64px;position:sticky;top:0;z-index:20;padding:0 max(16px,calc((100vw - 1180px)/2));background:rgba(255,255,255,.92);color:#171717;border-bottom:1px solid rgba(0,0,0,.06);box-shadow:0 2px 12px rgba(0,0,0,.025);backdrop-filter:saturate(180%) blur(18px);-webkit-backdrop-filter:saturate(180%) blur(18px)}
.brand{gap:10px;min-width:0}.brand img{width:38px;height:38px;border-radius:12px;background:#fff;object-fit:contain}.brand strong{font-size:15px;letter-spacing:-.025em}.brand small{color:#777;font-size:11px}.user-menu{gap:9px;color:#333;font-size:12px}.icon-btn{width:38px;height:38px;border-radius:50%;border:1px solid #e7e7eb;background:#f7f7f9;color:var(--brand-red);font-size:18px}
.main{width:100%;max-width:1180px;margin:0 auto;padding:22px 18px calc(112px + env(safe-area-inset-bottom))}.view{min-width:0}.view.active{animation:viewIn .18s ease-out}@keyframes viewIn{from{opacity:.65;transform:translateY(3px)}to{opacity:1;transform:none}}
.hero{background:linear-gradient(135deg,#fff 0%,#fff7f7 100%);border:1px solid #f0e5e5;border-radius:26px;padding:clamp(20px,4vw,30px);box-shadow:var(--shadow-card)}.hero h1{font-size:clamp(26px,5vw,34px);letter-spacing:-.045em;line-height:1.1}.hero-logo{width:clamp(64px,10vw,96px);height:clamp(64px,10vw,96px);object-fit:contain}
.grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:16px}.card{min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-card);padding:18px;box-shadow:var(--shadow-card)}.stat strong{font-size:clamp(23px,3vw,30px);letter-spacing:-.04em}.stat small{color:var(--muted)}
.section-title{gap:12px;margin:26px 0 12px}.section-title h2,.section-title h3{font-size:clamp(18px,3vw,21px);letter-spacing:-.035em;font-weight:750}.section-title p{margin:5px 0 0}.list{gap:11px}.list>.card,.event,.meal{border-radius:18px}.event{border-left:3px solid var(--brand-red)}.event .time,.negative,.eyebrow2{color:var(--brand-red)}.event p{color:#666}.pill{background:#f3f3f5;color:#555;border-radius:999px;padding:5px 10px}.pill.red{background:#ffe6e6;color:#d00000}.calendar-tabs{gap:7px;overflow-x:auto;padding-bottom:3px}.calendar-tabs button{border:1px solid #ececf0;background:#f4f4f6;color:#555;border-radius:999px;white-space:nowrap}.calendar-tabs button.active{background:var(--brand-red);border-color:var(--brand-red);color:#fff}
.admin-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:20px 0 26px}.admin-card{min-width:0;min-height:155px;padding:19px;background:#fff!important;border:1px solid #e9e9ed!important;border-radius:22px!important;box-shadow:0 3px 14px rgba(0,0,0,.035);color:#171717!important;gap:13px}.admin-card:hover{transform:translateY(-2px);border-color:#ffc4c4!important;box-shadow:0 9px 24px rgba(0,0,0,.07)}.admin-icon{width:48px;height:48px;flex:0 0 48px;border-radius:15px;background:#fff0f0!important;color:var(--brand-red)!important}.admin-icon::before{width:24px;height:24px}.admin-card h3{font-size:15px;letter-spacing:-.025em}.admin-card p{color:#777;font-size:13px}.admin-card .chev{color:var(--brand-red)}
.bottom-nav{left:50%;right:auto;bottom:max(8px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(760px,calc(100% - 24px));justify-content:space-around;gap:2px;padding:7px 8px;background:rgba(255,255,255,.94);color:#555;border:1px solid rgba(0,0,0,.08);border-radius:22px;box-shadow:0 8px 32px rgba(0,0,0,.13);backdrop-filter:saturate(180%) blur(22px);-webkit-backdrop-filter:saturate(180%) blur(22px)}
.nav-item{flex:1 1 0;min-width:0;max-width:110px;gap:4px;padding:7px 3px;border:0;border-radius:14px;color:#7c7c84;background:transparent}.nav-item svg{width:21px;height:21px;stroke-width:1.8}.nav-item span{font-size:10px;line-height:1.15;font-weight:600;white-space:nowrap}.nav-item.active{background:#fff0f0;color:var(--brand-red);border:0;box-shadow:none}.nav-item:not(.active):hover{background:#f5f5f7;color:#333}.nav-item:focus-visible{outline:2px solid rgba(255,0,0,.3)}
.table-wrap{max-width:100%;overflow:auto;border:1px solid var(--line);border-radius:16px;background:#fff}.simple-table{font-size:13px}.simple-table th{color:#666;font-weight:700;background:#fafafa}.simple-table th,.simple-table td{padding:12px;border-bottom:1px solid #eee}.ticket-thumb{border:1px solid #eee;border-radius:12px}.empty{color:#777}.toast{background:#242424;color:#fff;border-radius:14px;box-shadow:0 8px 25px rgba(0,0,0,.18);bottom:calc(94px + env(safe-area-inset-bottom))}
dialog{max-height:min(88svh,760px);overflow:auto;border:1px solid #eee;border-radius:26px;box-shadow:0 24px 90px rgba(0,0,0,.22)}dialog::backdrop{background:rgba(25,25,30,.28);backdrop-filter:blur(3px)}.modal-body{padding:clamp(18px,4vw,26px)}.modal-head{gap:12px}.close{background:#f4f4f6;color:#333;border-radius:50%;width:38px;height:38px}.form-grid{gap:14px}
@media(max-width:1000px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
 html,body{width:100%;overflow-x:hidden}.topbar{height:58px;padding:0 12px}.brand img{width:34px;height:34px}.brand strong{font-size:14px}.brand small{font-size:10px}.user-menu{gap:6px}.user-menu #userName{max-width:92px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.icon-btn{width:35px;height:35px}
 .main{padding:14px 12px calc(100px + env(safe-area-inset-bottom))}.hero{padding:19px;border-radius:22px;gap:10px}.hero h1{font-size:27px}.hero-logo{width:62px;height:62px}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.card{padding:15px;border-radius:19px}.stat strong{font-size:24px}.section-title{align-items:center;margin:22px 0 10px}.section-title h2{font-size:19px}.section-title .btn{min-height:40px;padding:9px 12px;font-size:13px}
 .admin-grid{grid-template-columns:1fr;gap:9px;margin:16px 0 22px}.admin-card{min-height:0;flex-direction:row;align-items:center;padding:14px 15px;gap:13px;border-radius:18px!important}.admin-icon{width:44px;height:44px;flex-basis:44px;border-radius:14px}.admin-card .admin-copy{min-width:0;padding-right:20px}.admin-card .chev{right:15px;top:50%;transform:translateY(-50%)}.admin-card h3{margin-bottom:3px;font-size:14px}.admin-card p{font-size:12px;line-height:1.35}
 .bottom-nav{bottom:max(6px,env(safe-area-inset-bottom));width:calc(100% - 16px);padding:6px 3px;border-radius:19px;gap:0}.nav-item{min-width:0;max-width:none;padding:7px 1px;border-radius:13px;gap:4px}.nav-item svg{width:19px;height:19px}.nav-item span{font-size:9px;letter-spacing:-.025em}.form-grid{grid-template-columns:minmax(0,1fr)}.form-grid .wide{grid-column:auto}.actions{gap:7px}.actions .btn{flex:1 1 auto}.table-wrap{border-radius:12px}.simple-table{min-width:560px}.simple-table th,.simple-table td{padding:10px 9px;font-size:12px}.auth-shell{padding:18px 14px calc(18px + env(safe-area-inset-bottom))}.auth-card{border-radius:25px;padding:25px 21px}.auth-card form{gap:13px}input,select{min-height:48px}.toast{left:12px;right:12px;bottom:calc(84px + env(safe-area-inset-bottom));text-align:center}
}
@media(max-width:360px){.brand small{display:none}.user-menu #userName{max-width:70px}.nav-item span{font-size:8px}.nav-item svg{width:18px;height:18px}.grid{gap:8px}.card{padding:12px}}
@media(min-width:601px) and (max-width:900px){.bottom-nav{width:min(760px,calc(100% - 24px))}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* Próximos eventos: día y hora en cajas separadas */
.event-datetime{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;margin-bottom:10px}
.event-day{display:inline-flex;align-items:center;justify-content:center;min-width:64px;padding:10px 12px;border-radius:12px;background:#f4d8da;color:#a21e2a;font-size:20px;line-height:1;font-weight:950;letter-spacing:-.035em;font-variant-numeric:tabular-nums}
.event-time{min-width:82px;padding:10px 12px;background:#a21e2a;color:#fff;font-size:22px}
@media(max-width:360px){.event-day{min-width:58px;padding:10px;font-size:18px}.event-time{min-width:76px;font-size:20px}}

/* Plan de comidas y cenas: mismo lenguaje visual que las tarjetas de eventos */
.meal-plan{margin:18px 0 24px}
.meal-plan>h2{font-size:21px;letter-spacing:-.035em;margin:0 0 12px}
.meal-plan-list{display:grid;gap:10px}
.meal-plan-day{display:grid;grid-template-columns:76px minmax(0,1fr);gap:14px;align-items:stretch;padding:14px}
.meal-plan-date{display:flex;align-items:center;justify-content:center;align-self:start;min-height:58px;padding:10px 8px;border-radius:14px;background:#a21e2a;color:#fff;font-size:21px;line-height:1;font-weight:950;letter-spacing:-.035em;font-variant-numeric:tabular-nums}
.meal-plan-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.meal-plan-item{display:flex;flex-direction:column;gap:5px;min-width:0;padding:11px 12px;border-radius:14px;background:#f7f7f9}
.meal-plan-label{font-size:12px;font-weight:800;color:#a21e2a}
.meal-plan-item strong{font-size:14px;line-height:1.35;overflow-wrap:anywhere}
.meal-plan-item small{font-size:12px;color:#737373;min-height:0}
@media(max-width:520px){.meal-plan-day{grid-template-columns:62px minmax(0,1fr);gap:10px;padding:11px}.meal-plan-date{min-height:54px;font-size:19px}.meal-plan-details{grid-template-columns:1fr;gap:7px}.meal-plan-item{padding:10px 11px}.meal-plan-item strong{font-size:14px}}


/* Desplazamiento vertical móvil: mantener el scroll nativo del documento */
html {
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}
body {
  min-height: 100vh;
  height: auto;
  overflow: visible;
  overscroll-behavior-y: auto !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y pinch-zoom;
}
#appView, .app-shell, .main, .view, .view.active {
  height: auto;
  min-height: 0;
  overflow: visible;
  touch-action: pan-y pinch-zoom;
}
@media (max-width: 600px) {
  #appView, .app-shell { min-height: 100vh; height: auto; }
  .main { min-height: 0; height: auto; overflow: visible; padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
}

/* Inscripciones de comidas: formulario y contador de asistentes */
.meal-plan-details-signup{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.meal-signup-slot{display:flex;flex-direction:column;gap:10px;min-width:0;padding:12px;border:1px solid #ececef;border-radius:16px;background:#fff}
.meal-signup-slot .meal-plan-item{background:#f7f7f9}
.meal-attendance-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.meal-attendance-summary>div{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:9px 4px;border-radius:12px;background:#f4f4f6;text-align:center;min-width:0}
.meal-attendance-summary strong{font-size:20px;line-height:1.1;font-weight:900;font-variant-numeric:tabular-nums}
.meal-attendance-summary span{font-size:10px;color:#626262}
.meal-attendance-summary .meal-attendance-total{background:#a21e2a;color:#fff}
.meal-attendance-summary .meal-attendance-total span{color:#fff}
.meal-signup-form{display:flex;flex-direction:column;gap:10px}
.meal-attending-toggle{display:flex;align-items:center;gap:9px;font-weight:800;font-size:14px}
.meal-attending-toggle input{width:20px;height:20px;min-height:20px;accent-color:#a21e2a}
.meal-count-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.meal-count-fields label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:750}
.meal-count-fields input{width:100%;min-width:0;min-height:42px;padding:8px 10px}
.meal-signup-pending{font-size:12px;margin:0}
@media(max-width:520px){.meal-plan-details-signup{grid-template-columns:1fr}.meal-signup-slot{padding:10px}.meal-attendance-summary strong{font-size:18px}.meal-attendance-summary span{font-size:10px}}


/* Menús e inscripciones: destacar primero el plato y quién lo cocina */
.meal-plan-item-featured{padding:18px 16px 16px!important;min-height:112px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:7px;background:#fff!important;border:1px solid #f0dfe1;border-left:5px solid #b51224;border-radius:14px!important}
.meal-plan-item-featured .meal-plan-label{font-size:12px!important;font-weight:800!important;letter-spacing:.02em;text-transform:uppercase;color:#b51224!important}
.meal-plan-item-featured .meal-plan-dish{display:block;font-size:clamp(20px,2vw,25px)!important;line-height:1.2;font-weight:850!important;color:#191616!important;overflow-wrap:anywhere}
.meal-plan-item-featured .meal-plan-cook{display:flex;align-items:center;gap:7px;font-size:14px;line-height:1.4;color:#4b4545;margin-top:1px}
.meal-plan-item-featured .meal-plan-cook b{color:#191616;font-weight:750}
@media(max-width:600px){.meal-plan-item-featured{padding:15px 13px!important;min-height:100px}.meal-plan-item-featured .meal-plan-dish{font-size:21px!important}.meal-plan-item-featured .meal-plan-cook{font-size:13px}}


/* ==========================================================
   MOBILE FIRST UX POLISH — Penya El Conill
   Prioridad: uso táctil, legibilidad y alineación en móvil.
   ========================================================== */
:root{
  --brand-red:#b51224;
  --brand-red-dark:#8f1020;
  --brand-tint:#fff0f1;
  --ink:#191719;
  --muted:#5f5b5d;
  --line:#e5e2e3;
  --canvas:#f6f5f5;
}
html{scroll-padding-top:76px}
body{color:var(--ink);font-size:15px;line-height:1.5}
.muted{color:#5f5b5d!important}
button,.btn{ -webkit-tap-highlight-color:transparent }
.btn{min-height:46px;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.btn-light{background:#f0edef;color:#242124;border:1px solid #e3dfe1}
.btn-primary{background:#b51224;color:#fff}
.btn-primary:hover{background:#8f1020}
input,select,textarea{font-size:16px; /* evita zoom automático en iOS */}
input[type="checkbox"],input[type="radio"]{width:22px;height:22px;min-height:22px;accent-color:#b51224}
.card,.admin-card,.event,.meal{overflow-wrap:anywhere}
.section-title{min-width:0;flex-wrap:wrap}
.section-title>div{min-width:0}
.actions{align-items:stretch}
.actions .btn{min-height:44px}
.admin-card{ -webkit-appearance:none;appearance:none }
#admin .admin-card .admin-icon{
  margin:0;
  width:48px;height:48px;min-width:48px;flex:0 0 48px;
  display:flex;align-items:center;justify-content:center;
}
#admin .admin-card .admin-icon svg{
  display:block;width:25px;height:25px;max-width:25px;max-height:25px;
  flex:0 0 25px;margin:0;
}
#admin .admin-card .admin-copy{flex:1 1 auto;min-width:0;text-align:left}
#admin .admin-card .chev{line-height:1}
.table-wrap{-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
.simple-table th{color:#454145}
.pill{color:#484448}
.pill.red{color:#8f1020;background:#ffe7e9}
.error,.error-box{color:#9c1020}
:focus-visible{outline-color:rgba(181,18,36,.55)!important}

@media(max-width:600px){
  body{font-size:15px}
  .main{padding-left:12px;padding-right:12px;padding-top:13px}
  .topbar{min-height:58px}
  .section-title{align-items:flex-start;gap:10px}
  .section-title h1{font-size:24px;line-height:1.2}
  .section-title h2{font-size:19px;line-height:1.25}
  .section-title .actions{width:100%}
  .section-title .actions .btn{flex:1 1 145px}
  .card{padding:15px;border-radius:17px}
  .grid{gap:9px}
  .stat strong{font-size:clamp(21px,6vw,25px)}
  .btn{min-height:46px;padding:11px 13px;font-size:14px}
  .actions{gap:8px}
  .actions .btn{flex:1 1 130px}
  label{font-size:14px;line-height:1.35}
  input,select,textarea{min-height:49px;border-radius:12px}
  textarea{min-height:108px}
  .form-grid{gap:13px}
  .admin-heading{margin-bottom:16px!important}
  #admin .admin-heading h1{font-size:26px;line-height:1.2}
  #admin .admin-grid{
    display:grid;grid-template-columns:minmax(0,1fr);gap:10px;
    margin:16px 0 22px;
  }
  #admin .admin-card{
    display:flex;flex-direction:row;align-items:center;justify-content:flex-start;
    gap:13px;width:100%;min-height:76px;height:auto;padding:13px 42px 13px 14px;
    text-align:left;border-radius:16px!important;
  }
  #admin .admin-card .admin-icon{
    margin:0!important;align-self:center;position:relative;
    width:46px;height:46px;min-width:46px;flex:0 0 46px;
    border-radius:13px;
  }
  #admin .admin-card .admin-icon svg{
    width:24px;height:24px;max-width:24px;max-height:24px;flex:0 0 24px;
  }
  #admin .admin-card .admin-copy{
    display:flex;flex-direction:column;justify-content:center;gap:2px;
    min-width:0;flex:1 1 auto;padding:0!important;text-align:left;
  }
  #admin .admin-card h3{font-size:15px;line-height:1.25;margin:0}
  #admin .admin-card p{font-size:12px;line-height:1.35;margin:0;color:#5f5b5d}
  #admin .admin-card .chev{right:14px;top:50%;transform:translateY(-50%);font-size:18px}
  #admin .admin-back-wrap{margin:0 0 14px}
  #admin .admin-back{width:100%;white-space:normal}
  #admin .admin-panel .section-title{align-items:flex-start}
  .bottom-nav{
    left:8px;right:8px;bottom:max(6px,env(safe-area-inset-bottom));
    transform:none;width:auto;max-width:none;justify-content:flex-start;
    overflow-x:auto;overflow-y:hidden;scrollbar-width:none;
    -webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;
    padding:6px 5px;gap:2px;border-radius:17px;
  }
  .bottom-nav::-webkit-scrollbar{display:none}
  .bottom-nav .nav-item{
    flex:0 0 58px;min-width:58px;max-width:58px;height:54px;
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:4px;padding:5px 2px;border-radius:12px;
  }
  .bottom-nav .nav-item svg{width:21px;height:21px;min-height:21px;flex:0 0 21px}
  .bottom-nav .nav-item span{
    display:block;width:100%;font-size:9px;line-height:1.1;
    font-weight:650;text-align:center;white-space:nowrap;letter-spacing:0;
  }
  .bottom-nav .nav-item.active{background:#fff0f1;color:#a20f20}
  .toast{z-index:100;bottom:calc(78px + env(safe-area-inset-bottom))}
  dialog{width:calc(100% - 20px);max-height:calc(100svh - 28px);border-radius:20px}
  .modal-body{padding:17px}
  .close{min-width:42px;min-height:42px}
  .simple-table{min-width:600px}
  .simple-table th,.simple-table td{padding:11px 10px}
  .table-wrap:after{content:"Desliza horizontalmente para ver todas las columnas";display:block;padding:7px 10px;font-size:11px;color:#666;background:#fafafa;border-top:1px solid #eee}
}
@media(max-width:380px){
  #admin .admin-card{gap:10px;padding-left:11px}
  #admin .admin-card .admin-icon{width:42px;height:42px;min-width:42px;flex-basis:42px}
  #admin .admin-card h3{font-size:14px}
  #admin .admin-card p{font-size:11px}
  .bottom-nav .nav-item{flex-basis:55px;min-width:55px;max-width:55px}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}


/* Selector d'idioma: accessible i adaptat a mòbil */
.language-picker{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 18px;padding:10px 12px;border:1px solid rgba(128,128,128,.28);border-radius:12px}
.language-picker label{font-size:13px;font-weight:600}
.language-picker select,.language-select{min-height:38px;max-width:145px;padding:6px 28px 6px 10px;border:1px solid rgba(128,128,128,.4);border-radius:9px;background:var(--card,#fff);color:inherit;font:inherit}
.user-menu{gap:8px}
.language-select{font-size:12px;min-height:34px;max-width:112px}
@media(max-width:560px){.language-select{max-width:94px;padding-left:6px;padding-right:18px;font-size:11px}.user-menu{gap:5px}}


/* Selector d'idioma amb banderes */
.language-flags{display:flex;align-items:center;gap:6px;margin:0 2px}
.language-flag{display:flex;align-items:center;justify-content:center;width:38px;height:34px;padding:5px;border:1px solid rgba(128,128,128,.35);border-radius:8px;background:transparent;cursor:pointer;opacity:.62;transition:opacity .15s,border-color .15s,transform .15s}
.language-flag svg{display:block;width:26px;height:18px;border-radius:2px;box-shadow:0 0 0 1px rgba(0,0,0,.12)}
.language-flag.active{opacity:1;border:2px solid var(--primary,#b4232f);transform:translateY(-1px)}
.language-flag:focus-visible{outline:2px solid currentColor;outline-offset:2px}
@media(max-width:560px){.language-flags{gap:4px}.language-flag{width:34px;height:32px;padding:4px}}

/* Navegación compacta: cuatro accesos frecuentes y un menú secundario */
.bottom-nav{position:fixed;z-index:1000;display:flex;align-items:stretch}
.bottom-nav>.nav-item{flex:1 1 0}
.bottom-nav .nav-more-panel{position:absolute;right:4px;bottom:calc(100% + 10px);width:min(230px,calc(100vw - 32px));padding:8px;display:flex;flex-direction:column;gap:4px;background:rgba(255,255,255,.98);border:1px solid rgba(0,0,0,.09);border-radius:18px;box-shadow:0 12px 36px rgba(0,0,0,.18);backdrop-filter:blur(20px)}
.bottom-nav .nav-more-panel[hidden]{display:none}
.bottom-nav .nav-more-panel .nav-item{display:flex;flex-direction:row;justify-content:flex-start;max-width:none;width:100%;padding:12px 14px;text-align:left;font-size:14px;color:#4b4545}
.bottom-nav .nav-more-panel .nav-item.active{background:#fff0f1;color:var(--brand-red)}
.bottom-nav .nav-more-panel .nav-item span{font-size:14px}
.bottom-nav .nav-more{max-width:none}
.bottom-nav .nav-more.is-open{background:#f1eeee;color:var(--brand-red)}
@media(min-width:900px){
 .bottom-nav{width:min(560px,calc(100% - 32px))}
}

/* El desplegable de «Más» debe poder sobresalir de la barra fija */
.bottom-nav{
  overflow:visible!important;
  overflow-x:visible!important;
  overflow-y:visible!important;
}
.bottom-nav>.nav-item{
  flex:1 1 0!important;
  min-width:0!important;
  max-width:none!important;
}
.bottom-nav .nav-more-panel .nav-item{
  flex:0 0 auto!important;
  min-width:0!important;
  max-width:none!important;
}
