/* MARE DI MUSICA · visual identity v1.0.79
   Original wave: Riccardo Buonafede, from the supplied festival brand book.
   Color family: dark sea-blue, azure, red, seafoam, warm sand.
   Bungee is requested via Google Fonts; robust local fallbacks require no font file. */
:root {
  --navy:#123b75;
  --deep:#0a2347;
  --ocean:#196e9e;
  --teal:#2589b7;
  --foam:#edf8fc;
  --bg:#f5f7f9;
  --ink:#182338;
  --muted:#62758a;
  --line:#dce6ed;
  --white:#ffffff;
  --danger:#b72136;
  --warning:#986513;
  --shadow:0 8px 30px rgba(13,45,84,.065);
  --brand-blue:#228dca;
  --brand-sky:#71c9e0;
  --brand-red:#d91e2a;
  --brand-sand:#efd5c3;
  --brand-font:'Bungee',Impact,'Arial Black',system-ui,sans-serif;
}
html{font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif}
body{color:var(--ink);background:linear-gradient(180deg,#f3f8fc 0,#f7f8fa 450px,#fafafa 100%)}
a{color:#145e94}
a:hover{color:#0e4677}
a:focus-visible,button:focus-visible,[role=button]:focus-visible,summary:focus-visible{outline:3px solid var(--brand-sky);outline-offset:3px}
::selection{background:#bce9f5;color:#0b2d53}

/* Navigation and persistent festival signature */
.sidebar{background:linear-gradient(172deg,#0b2858 0%,#0b3169 48%,#071e3b 100%);border-right:1px solid rgba(180,213,240,.2)}
.sidebar::before{content:'';position:absolute;inset:auto 0 0;min-height:37%;background:url('brand-wave.webp') center bottom/cover no-repeat;opacity:.065;pointer-events:none}
.sidebar > *{position:relative}
.brand{gap:12px;padding:2px 8px;align-items:center;min-height:68px}
.brand img{flex:none;width:58px;height:58px;border-radius:14px;background:#fff;object-fit:cover;box-shadow:0 3px 16px rgba(0,0,0,.16);border:2px solid rgba(255,255,255,.88)}
.brand span{gap:3px;min-width:0}
.brand strong{font-family:var(--brand-font);font-size:12px;line-height:1.2;letter-spacing:0;color:#fff}
.brand small{color:#b9e1f1;font-size:10px;letter-spacing:.035em}
.edition-pill{background:rgba(255,255,255,.09);border:1px solid rgba(154,210,239,.16);color:#d4f1ff;margin-top:24px;font-weight:750}
.nav a{color:#d7e6f6;transition:background-color .17s ease, color .17s ease;border-left:3px solid transparent}
.nav a.current{background:linear-gradient(90deg,rgba(36,137,190,.35),rgba(36,137,190,.16));border-left-color:var(--brand-red);color:#fff}
.nav a:hover{background:rgba(113,201,224,.13);color:#fff}
.nav-symbol{color:#78d4e9}
.side-bottom{border-top-color:rgba(225,238,250,.18)}
.label-tiny{color:#accce2}.subtle{color:#bed4e5}.link-button{color:#80d7ea}

/* Page chrome and typography */
.topbar{position:relative;background:#fff;border-bottom-color:#dfebf2}
.topbar::before{content:'';position:absolute;top:0;left:0;right:0;height:4px;background:linear-gradient(90deg,var(--brand-red) 0 24%,var(--brand-blue) 24% 72%,#114480 72% 100%)}
.top-eyebrow{color:#315b83;font-weight:800}
.mobile-brand{color:#113c71;font-family:var(--brand-font);letter-spacing:0;font-size:11px}
.mobile-brand img{border-radius:8px;object-fit:cover}
.page-heading{margin-bottom:25px}
.page-heading h1{font-family:var(--brand-font);font-weight:400;font-size:clamp(19px,2.1vw,28px);line-height:1.25;letter-spacing:-.015em;color:#0e3265;overflow-wrap:anywhere}
.eyebrow{color:#ca2431;letter-spacing:.145em;font-weight:850}
h2{color:#13365a}
.card{border:1px solid #dfebf2;box-shadow:0 6px 24px rgba(14,53,91,.052);border-radius:16px}
.card>h2{border-left:4px solid var(--brand-red);padding-left:12px;line-height:1.35}
.detail-header{border-color:#d9e9f2;background:linear-gradient(105deg,#fff 72%,#f0f9fc 100%)}
.detail-header h2{color:#0d386a}

/* Welcome / sign-in: use original wave artwork, never approximate it */
.welcome{background:linear-gradient(110deg,#0b2d61 0%,#13518a 67%,#157fb4 100%);border:1px solid rgba(55,162,207,.32);box-shadow:0 12px 28px rgba(11,42,88,.16)}
.welcome::after{content:'';position:absolute;right:0;top:0;bottom:0;width:44%;background:url('brand-wave.webp') 50% 43%/cover no-repeat;opacity:.24;pointer-events:none;mask-image:linear-gradient(90deg,transparent,black 35%)}
.welcome > *{position:relative;z-index:1}
.welcome h2{font-family:var(--brand-font);font-weight:400;letter-spacing:0;font-size:clamp(18px,2.2vw,27px);line-height:1.36}
.welcome p{color:#e7f4fa}
.welcome .eyebrow{color:#ade8f8}
.welcome .wave{display:block;flex:0 0 auto;background:url('brand-wave.webp') center/cover no-repeat;width:130px;height:100px;border-radius:14px;font-size:0;color:transparent;opacity:.9;border:1px solid rgba(255,255,255,.2)}
.auth-story{background:linear-gradient(115deg,#0d2f65 0%,#166b9d 100%)}
.auth-story::before{content:'';position:absolute;inset:0;background:url('brand-wave.webp') right 42%/cover no-repeat;opacity:.19;pointer-events:none}
.auth-story > *{position:relative}
.auth-story h2{font-family:var(--brand-font);font-weight:400;letter-spacing:-.015em;font-size:clamp(24px,3.2vw,38px);line-height:1.25}
.auth-story p{color:#e9f7fc}
.auth-story .eyebrow{color:#b5ecf6}

/* Clear call-to-action hierarchy with accessible blue, reserve red for motif/danger */
.btn{border-radius:10px}
.btn.primary{background:#176d9c;border-color:#176d9c;color:#fff;box-shadow:0 2px 0 rgba(8,45,91,.09)}
.btn.primary:hover{background:#11577f;border-color:#11577f}
.btn.secondary{background:#fff;color:#12577d;border-color:#b8d6e5}
.btn.secondary:hover{background:#edf9fe;border-color:#70b3d5}
.btn.danger{background:#fff2f4;color:#a42236;border-color:#efc1c9}
.small-link{color:#146a97}
.metric{border-color:#dfebf2;border-top:3px solid var(--brand-blue)}
.metric strong{color:#104d80}
.big-total{color:#105a91!important}
.tile-active{background:#eff9ff;border-color:#4ba4ce}

/* Tables and form controls */
th{background:#f0f7fb;color:#3d5d7c}
td{border-top-color:#e7eef3}
td strong,.record strong,.keyvals strong{color:#184268}
.table-scroll{border-color:#dfeaf1}
.field>span,.stage-plan-properties label{color:#244764}
.field input:not([type=checkbox]),.field textarea,.field select,.filters input,.filters select{background:#fff;border-color:#c6d9e6;color:#173e62}
.field input:focus,.field textarea:focus,.field select:focus,.filters input:focus,.filters select:focus{border-color:#228dca;box-shadow:0 0 0 3px rgba(34,141,202,.17)}
input[type=checkbox],input[type=radio]{accent-color:#176d9c}
.note-bank{background:#f2f9fc;border-color:#d2eaf4}
.toplinks a{color:#125989}
.stage-plan-hero,.stage-plan-editor,.stage-plan-form{border-color:#dce8ef}
.stage-plan-palette{background:#f2f9fd;border-color:#d6e7f1}
.stage-plan-palette-tool:hover{background:#e7f4fb;border-color:#5daccb}

/* Preserve established semantic badge colors: yellow=pending, purple=receipt, green=confirmed */
.tag.blue{background:#e6f5fc;color:#155d88}
.tag.purple{background:#ede5ff;color:#6336a6}
.alert-info{background:#eff9fd;border-color:#c7e8f4;color:#215c7c}
.alert-ok{background:#e8f8f1;border-color:#b6e4d0;color:#17664d}
.alert-error{background:#fff0f1;border-color:#f0c4ca;color:#a32338}

/* Responsive web app maintains same visual language without changing controls. */
@media(max-width:1080px){.brand strong{font-size:11px}.brand img{width:49px;height:49px}.brand{gap:9px}}
@media(max-width:820px){
  .topbar{background:#fff}
  .mobile-brand{font-size:10.5px;gap:7px}
  .mobile-brand img{width:34px;height:34px}
  .mobile-bottom{background:#fff;border-top:3px solid var(--brand-blue);box-shadow:0 -5px 22px rgba(13,49,93,.09)}
  .mobile-bottom a{color:#155783}
  .page-heading h1{font-size:clamp(18px,4.5vw,24px)}
  .welcome::after{width:54%;opacity:.14}
  .welcome .wave{width:90px;height:82px}
}
@media(max-width:520px){
  .page-heading h1{font-size:19px;line-height:1.3}
  .welcome h2{font-size:19px}
  .welcome .wave{width:64px;height:68px}
  .card>h2{padding-left:9px;border-left-width:3px}
  .auth-story h2{font-size:25px}
}
@media print{
  html,body{background:#fff!important}
  .welcome::after,.sidebar::before,.auth-story::before{display:none!important}
  .card,.metric{box-shadow:none}
}
/* Contrast safeguard on image-bearing hero panels. */
.welcome h2,.auth-story h2{color:#ffffff}
.welcome .wave{display:none}
.welcome>div:first-child{max-width:74%}
@media(max-width:620px){.welcome>div:first-child{max-width:100%}.welcome::after{opacity:.13}}
