:root {
  --navy-950: #061525;
  --navy-900: #0a2036;
  --navy-800: #0e2c49;
  --blue-700: #1167ca;
  --blue-600: #1680e8;
  --blue-500: #2f9df5;
  --cyan-500: #12c5d8;
  --cyan-100: #dffafd;
  --green-500: #19bd7d;
  --violet-500: #7b61e8;
  --orange-500: #f29b38;
  --rose-500: #e6648d;
  --ink: #13253a;
  --muted: #6e7f91;
  --line: #dce6ef;
  --surface: #ffffff;
  --canvas: #f2f7fb;
  --shadow: 0 16px 42px rgba(17, 55, 91, .10);
  --shadow-soft: 0 6px 20px rgba(17, 55, 91, .07);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --sidebar: 252px;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; font-family: Inter, Aptos, 'Segoe UI', system-ui, -apple-system, sans-serif; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Connexion */
.login-body { background: var(--navy-950); color: white; overflow-x: hidden; position: relative; }
.login-body::before, .login-body::after { content: ''; position: fixed; border-radius: 50%; pointer-events: none; filter: blur(2px); }
.login-body::before { width: 720px; height: 720px; background: radial-gradient(circle, rgba(18,197,216,.21), transparent 68%); top: -300px; right: -160px; }
.login-body::after { width: 600px; height: 600px; background: radial-gradient(circle, rgba(22,128,232,.18), transparent 68%); bottom: -340px; left: -150px; }
.login-shell { width: min(1080px, calc(100% - 40px)); min-height: calc(100vh - 86px); margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(45px, 8vw, 110px); position: relative; z-index: 1; }
.login-brand h1 { margin: 14px 0 18px; font: 800 clamp(3.5rem, 7vw, 6rem)/.94 Inter, Aptos, 'Segoe UI', sans-serif; letter-spacing: -.07em; }
.login-brand > p:not(.eyebrow) { color: #a8c0d4; font-size: 1.12rem; max-width: 390px; line-height: 1.7; }
.eyebrow, .section-kicker { margin: 0; color: var(--cyan-500); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hospital-mark { width: 84px; height: 84px; padding: 11px; border-radius: 24px; display: grid; place-items: center; position: relative; background: white; box-shadow: 0 15px 32px rgba(18,197,216,.2); }
.hospital-mark::before, .hospital-mark::after { content: ''; position: absolute; border: 1px solid rgba(130,220,235,.16); border-radius: 29px; animation: ripple 2.8s infinite ease-out; }
.hospital-mark::before { inset: -11px; }.hospital-mark::after { inset: -25px; animation-delay: .7s; }
.hospital-mark img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; position: relative; z-index: 1; }
.privacy-pill { width: max-content; max-width: 100%; display: flex; align-items: center; gap: 9px; margin-top: 31px; padding: 10px 15px; border: 1px solid rgba(255,255,255,.1); border-radius: 99px; background: rgba(255,255,255,.045); color: #b8d1e4; font-size: .85rem; }
.privacy-pill .icon { color: var(--cyan-500); width: 17px; }
.login-card { background: rgba(255,255,255,.98); color: var(--ink); padding: clamp(27px, 4vw, 45px); border-radius: 30px; box-shadow: 0 35px 90px rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.5); }
.login-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; }
.login-card-head strong { display: block; font: 800 1.6rem Inter, Aptos, 'Segoe UI', sans-serif; letter-spacing: -.035em; }
.login-card-head small { display: block; color: var(--muted); margin-top: 3px; }
.mini-logo { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, var(--blue-600), var(--cyan-500)); }
.stack-form { display: grid; gap: 12px; }
.stack-form > label { font-weight: 700; font-size: .9rem; }
.password-field { height: 58px; display: flex; align-items: center; gap: 11px; padding: 0 15px; border: 1.5px solid var(--line); border-radius: var(--radius-md); transition: .2s; }
.password-field:focus-within { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(47,157,245,.11); }
.password-field .icon { color: var(--blue-600); }
.password-field input { border: 0; outline: 0; min-width: 0; flex: 1; background: transparent; font-size: 1rem; }
.reveal-password { border: 0; padding: 6px; background: none; color: var(--blue-700); font-weight: 700; font-size: .8rem; cursor: pointer; }
.secure-note { margin: 20px 0 0; text-align: center; color: #8a9aa9; font-size: .76rem; }
.login-footer { position: relative; z-index: 1; color: #688199; text-align: center; font-size: .75rem; line-height: 1.7; padding: 0 20px 20px; }
.login-footer strong { color: #91aabe; }
.login-footer small { font-size: .7rem; }

/* Éléments communs */
.btn { min-height: 43px; border: 0; border-radius: 12px; padding: 10px 17px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 800; font-size: .88rem; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { color: white; background: linear-gradient(135deg, var(--blue-700), var(--blue-500)); box-shadow: 0 9px 20px rgba(22,128,232,.22); }
.btn-primary:hover { box-shadow: 0 12px 25px rgba(22,128,232,.3); }
.btn-secondary { color: var(--blue-700); background: #e9f4fe; }
.btn-secondary:hover { background: #dcefff; }
.btn-success { color: white; background: linear-gradient(135deg, #0b9a68, var(--green-500)); box-shadow: 0 9px 20px rgba(25,189,125,.22); }
.btn-ghost { background: #f0f4f7; color: var(--muted); }
.btn-large { min-height: 56px; margin-top: 8px; justify-content: space-between; padding-inline: 20px; font-size: .98rem; }
.btn .icon { width: 18px; height: 18px; }
.alert { border-radius: 12px; padding: 12px 14px; font-weight: 700; font-size: .86rem; margin-bottom: 15px; }
.alert-error { color: #9d2446; background: #fde7ee; border: 1px solid #f8cada; }
.alert-success { color: #087a51; background: #e0f9ee; border: 1px solid #b6eed9; }
.page-alert { max-width: 1450px; margin: 0 auto 18px; display: flex; justify-content: space-between; align-items: center; }
.page-alert button { border: 0; background: none; color: currentColor; font-size: 1.3rem; cursor: pointer; }
.panel { background: var(--surface); border: 1px solid rgba(212,225,236,.85); border-radius: var(--radius-xl); box-shadow: var(--shadow-soft); }

/* Navigation */
.app-body { min-width: 320px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 20; color: #d6e7f4; background: var(--navy-950); display: flex; flex-direction: column; padding: 23px 15px 18px; overflow-y: auto; }
.sidebar::before { content: ''; position: absolute; width: 230px; height: 230px; border-radius: 50%; top: -130px; right: -105px; background: rgba(18,197,216,.09); }
.sidebar-brand { position: relative; display: flex; align-items: center; gap: 12px; padding: 4px 7px 28px; }
.sidebar-logo { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; color: var(--blue-600); background: white; box-shadow: 0 9px 20px rgba(0,0,0,.2); }
.sidebar-logo img { display: block; width: 31px; height: 31px; object-fit: contain; border-radius: 8px; }
.sidebar-brand strong { display: block; color: white; font: 800 .98rem Inter, Aptos, 'Segoe UI', sans-serif; }
.sidebar-brand small { color: #7290a9; font-size: .68rem; }
.sidebar-nav { display: grid; gap: 7px; }
.nav-item { min-height: 47px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: #8eabc1; font-size: .9rem; font-weight: 700; transition: .18s; }
.nav-item:hover { color: white; background: rgba(255,255,255,.055); }
.nav-item.active { color: white; background: linear-gradient(110deg, rgba(22,128,232,.38), rgba(18,197,216,.12)); box-shadow: inset 3px 0 var(--cyan-500); }
.nav-item .icon { width: 19px; }
.nav-item b { margin-left: auto; min-width: 23px; height: 23px; padding: 0 6px; border-radius: 8px; display: grid; place-items: center; color: white; background: var(--blue-600); font-size: .7rem; }
.sidebar-bottom { margin-top: auto; padding-top: 25px; }
.sidebar-signature { margin: 18px 8px 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); color: #617e95; font-size: .69rem; }
.sidebar-signature strong { color: #9bb4c8; }
.sidebar-signature small { display: block; margin-top: 5px; }
.main-content { min-height: 100vh; margin-left: var(--sidebar); padding: 0 clamp(22px, 3vw, 48px); }
.topbar { max-width: 1450px; margin: 0 auto; min-height: 116px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar h1 { margin: 5px 0 0; font: 800 clamp(1.65rem, 2.5vw, 2.15rem) Inter, Aptos, 'Segoe UI', sans-serif; letter-spacing: -.04em; }
.topbar .eyebrow { color: #8092a2; }
.topbar-actions { display: flex; align-items: center; gap: 15px; }
.live-status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.live-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--green-500); box-shadow: 0 0 0 5px rgba(25,189,125,.12); animation: pulse 2s infinite; }

/* Dashboard */
.dashboard-intro, .salon-summary, .history-toolbar { max-width: 1450px; margin: 0 auto 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.dashboard-intro p { margin: 5px 0 0; color: var(--muted); font-size: .88rem; }
.period-tabs { display: flex; align-items: center; padding: 4px; border-radius: 13px; background: #e4edf4; }
.period-tabs a { padding: 8px 13px; border-radius: 9px; color: #6e8293; font-size: .78rem; font-weight: 800; }
.period-tabs a.active { color: var(--blue-700); background: white; box-shadow: 0 3px 11px rgba(19,59,92,.1); }
.kpi-grid { max-width: 1450px; margin: 0 auto 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.kpi-card { min-height: 132px; position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 14px; padding: 22px; border-radius: var(--radius-lg); background: white; border: 1px solid rgba(212,225,236,.85); box-shadow: var(--shadow-soft); }
.kpi-card > div > span { display: block; color: var(--muted); font-size: .8rem; font-weight: 700; }
.kpi-card strong { display: block; margin: 5px 0 1px; font: 800 clamp(1.55rem, 2.2vw, 2.05rem) Inter, Aptos, 'Segoe UI', sans-serif; letter-spacing: -.05em; }
.kpi-card small { color: #93a1ae; font-size: .7rem; }
.kpi-icon { width: 43px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; color: var(--blue-600); border-radius: 13px; background: #e5f2fe; }
.kpi-icon.cyan { color: #0799aa; background: var(--cyan-100); }
.kpi-icon.violet { color: var(--violet-500); background: #eeeafe; }
.kpi-icon.orange { color: #de7d14; background: #fff0dd; }
.kpi-main { color: white; border: 0; background: linear-gradient(135deg, #0d67c7 0%, #1b91ec 62%, #18b5dc 100%); box-shadow: 0 17px 37px rgba(22,128,232,.22); }
.kpi-main::after { content: ''; position: absolute; width: 140px; height: 140px; border: 30px solid rgba(255,255,255,.06); border-radius: 50%; right: -55px; top: -55px; }
.kpi-main .kpi-icon { color: white; background: rgba(255,255,255,.17); }
.kpi-main > div > span, .kpi-main small { color: rgba(255,255,255,.72); }
.kpi-spark { position: absolute; display: flex; align-items: flex-end; gap: 3px; right: 18px; bottom: 20px; height: 25px; opacity: .5; }
.kpi-spark i { width: 4px; border-radius: 4px; background: white; }
.kpi-spark i:nth-child(1) { height: 8px; }.kpi-spark i:nth-child(2) { height: 14px; }.kpi-spark i:nth-child(3) { height: 11px; }.kpi-spark i:nth-child(4) { height: 22px; }.kpi-spark i:nth-child(5) { height: 18px; }
.charts-grid { max-width: 1450px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.chart-card { padding: 22px; min-height: 325px; }
.chart-wide { grid-column: span 2; min-height: 260px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 25px; }
.panel-head h2 { margin: 5px 0 0; font: 800 1.05rem Inter, Aptos, 'Segoe UI', sans-serif; letter-spacing: -.025em; }
.panel-icon { width: 21px; height: 21px; color: #98aaba; }
.donut-wrap { min-height: 215px; display: flex; align-items: center; justify-content: space-around; gap: 20px; }
.donut { --men: 50; width: 165px; height: 165px; border-radius: 50%; display: grid; place-items: center; position: relative; background: conic-gradient(var(--blue-600) 0 calc(var(--men) * 1%), var(--rose-500) calc(var(--men) * 1%) 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); animation: scaleIn .65s ease both; }
.donut::before { content: ''; position: absolute; inset: 27px; border-radius: 50%; background: white; box-shadow: 0 4px 15px rgba(28,64,96,.06); }
.donut > span { position: relative; text-align: center; }
.donut strong { display: block; font: 800 2rem Inter, Aptos, 'Segoe UI', sans-serif; letter-spacing: -.05em; }
.donut small { color: var(--muted); font-size: .7rem; }
.donut-legend { min-width: 170px; display: grid; gap: 13px; }
.donut-legend > div { display: grid; grid-template-columns: 9px 21px 1fr auto; align-items: center; gap: 8px; color: var(--muted); font-size: .8rem; }
.donut-legend strong { color: var(--ink); font-size: 1rem; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }.legend-dot.men { background: var(--blue-600); }.legend-dot.women { background: var(--rose-500); }
.bar-chart { display: grid; gap: 16px; }
.bar-chart.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 35px; }
.bar-label { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 6px; color: var(--muted); font-size: .76rem; }
.bar-label strong { color: var(--ink); }
.bar-track { height: 8px; background: #edf2f6; border-radius: 9px; overflow: hidden; }
.bar-fill { display: block; width: var(--bar-width); height: 100%; border-radius: inherit; animation: growBar .75s cubic-bezier(.2,.8,.2,1) both; }
.tone-blue { background: linear-gradient(90deg, var(--blue-700), var(--blue-500)); }.tone-violet { background: linear-gradient(90deg, #6550cf, #9e87f5); }.tone-cyan { background: linear-gradient(90deg, #079bad, var(--cyan-500)); }.tone-orange { background: linear-gradient(90deg, #dc7e17, #ffb35b); }.tone-green { background: linear-gradient(90deg, #0d9d69, #31d69a); }
.transport-bars { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 35px; }
.export-strip { max-width: 1450px; margin: 16px auto 0; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px dashed #b9cfe0; border-radius: var(--radius-lg); background: rgba(255,255,255,.52); }
.export-strip > div { display: flex; align-items: center; gap: 13px; }
.export-strip strong, .export-strip small { display: block; }.export-strip strong { font-size: .87rem; }.export-strip small { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.export-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--blue-600); border-radius: 12px; background: white; }
.empty-state { max-width: 1450px; min-height: 330px; margin: 0 auto; padding: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-icon { width: 68px; height: 68px; display: grid; place-items: center; margin-bottom: 15px; border-radius: 22px; color: var(--blue-600); background: linear-gradient(145deg, #e7f4ff, #e0fafb); }
.empty-icon .icon { width: 31px; height: 31px; }
.empty-state h2 { margin: 0 0 8px; font: 800 1.35rem Inter, Aptos, 'Segoe UI', sans-serif; }.empty-state p { margin: 0 0 20px; color: var(--muted); max-width: 480px; line-height: 1.6; }

/* Salon */
.salon-summary { padding: 14px 18px; border-radius: var(--radius-lg); background: var(--navy-900); color: white; box-shadow: 0 14px 30px rgba(7,30,51,.14); }
.salon-summary > div { display: flex; align-items: baseline; gap: 10px; }.salon-summary strong { font: 800 1.8rem Inter, Aptos, 'Segoe UI', sans-serif; }.salon-summary span:last-child { color: #9eb8cc; font-size: .85rem; }.salon-pulse { align-self: center; width: 9px; height: 9px; background: var(--green-500); border-radius: 50%; box-shadow: 0 0 0 6px rgba(25,189,125,.15); }
.patient-grid { max-width: 1450px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.patient-card { position: relative; overflow: hidden; padding: 20px; border-radius: var(--radius-xl); background: white; border: 1px solid rgba(212,225,236,.9); box-shadow: var(--shadow-soft); transition: transform .2s, box-shadow .2s; }
.patient-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.patient-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--blue-600), var(--cyan-500)); }
.patient-card-top { display: flex; align-items: center; gap: 11px; }
.patient-avatar { width: 47px; height: 47px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 15px; }.patient-avatar.male { color: var(--blue-600); background: #e4f2ff; }.patient-avatar.female { color: var(--rose-500); background: #fde9f0; }
.patient-id { display: block; color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .08em; }.patient-card h2 { margin: 2px 0 0; font: 800 .96rem Inter, Aptos, 'Segoe UI', sans-serif; }
.service-badge { margin-left: auto; padding: 6px 9px; border-radius: 8px; color: var(--blue-700); background: #e6f2fc; font-size: .69rem; font-weight: 800; white-space: nowrap; }.service-badge.small { margin: 0; display: inline-block; }
.patient-time { margin: 20px 0 15px; padding: 16px; display: flex; align-items: center; gap: 12px; border-radius: 15px; color: white; background: linear-gradient(125deg, var(--navy-900), #15466c); }
.patient-time > .icon { color: var(--cyan-500); width: 25px; height: 25px; }.patient-time small, .patient-time strong { display: block; }.patient-time small { color: #92aec3; font-size: .68rem; }.patient-time strong { margin-top: 3px; font: 800 1.45rem Inter, Aptos, 'Segoe UI', sans-serif; letter-spacing: -.03em; }
.patient-details { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; margin-bottom: 15px; }.patient-details > div { padding: 10px; border-radius: 11px; background: #f5f8fa; }.patient-details span, .patient-details strong, .patient-details small { display: block; }.patient-details span { color: var(--muted); font-size: .64rem; text-transform: uppercase; font-weight: 800; letter-spacing: .05em; }.patient-details strong { margin: 4px 0 1px; font-size: .79rem; }.patient-details small { color: #8d9caa; font-size: .65rem; line-height: 1.3; }
.btn-card { width: 100%; color: var(--blue-700); background: #eaf4fd; }.btn-card:hover { background: #dcedfb; }
.salon-empty { margin-top: 30px; }

/* Historique */
.search-field { width: min(430px, 100%); height: 45px; display: flex; align-items: center; gap: 9px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: white; }.search-field span { color: var(--muted); font-size: 1.4rem; }.search-field input { border: 0; outline: 0; flex: 1; min-width: 0; background: none; }
.table-panel { max-width: 1450px; margin: 0 auto; overflow: hidden; }.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: .78rem; } th, td { padding: 15px 16px; text-align: left; border-bottom: 1px solid #edf1f4; } th { color: var(--muted); background: #f7f9fb; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; } tbody tr:hover { background: #f9fcfe; }
.table-note { padding: 13px 17px; color: var(--muted); background: #fafcfd; font-size: .7rem; }.empty-state.compact { min-height: 330px; box-shadow: none; border: 0; }.empty-state.compact .btn { display: none; }

/* Process */
.process-hero { max-width: 1450px; margin: 0 auto 18px; min-height: 300px; padding: clamp(28px, 5vw, 65px); display: grid; grid-template-columns: 270px 1fr; align-items: center; gap: clamp(35px, 7vw, 100px); overflow: hidden; background: linear-gradient(135deg, #fff, #f4fbff); }
.process-hero h2 { margin: 10px 0 12px; font: 800 clamp(1.8rem, 4vw, 3.2rem)/1.08 Inter, Aptos, 'Segoe UI', sans-serif; letter-spacing: -.055em; }.process-hero p { color: var(--muted); max-width: 620px; line-height: 1.7; }
.process-art { width: 220px; height: 220px; margin: auto; border-radius: 50%; position: relative; display: grid; place-items: center; background: linear-gradient(145deg, var(--blue-600), var(--cyan-500)); box-shadow: 0 25px 60px rgba(22,128,232,.25); }.process-art span { color: white; }.process-art span .icon { width: 80px; height: 80px; stroke-width: 1.2; }.process-art i { position: absolute; inset: -14px; border: 1px solid rgba(22,128,232,.18); border-radius: 50%; }.process-art i:nth-of-type(2) { inset: -30px; }.process-art i:nth-of-type(3) { inset: -47px; }
.process-grid { max-width: 1450px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }.process-placeholder { min-height: 118px; display: flex; gap: 15px; align-items: center; padding: 20px; border-radius: var(--radius-lg); border: 1px dashed #bbcedd; background: rgba(255,255,255,.5); }.process-placeholder > span { color: var(--blue-500); font: 800 1.8rem Inter, Aptos, 'Segoe UI', sans-serif; opacity: .4; }.process-placeholder h3 { margin: 0 0 5px; font: 800 .95rem Inter, Aptos, 'Segoe UI', sans-serif; }.process-placeholder p { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.45; }

/* Fenêtres et formulaires */
.modal { width: min(650px, calc(100% - 28px)); max-height: calc(100vh - 30px); padding: 0; border: 0; border-radius: 25px; overflow: auto; color: var(--ink); box-shadow: 0 35px 100px rgba(0,20,40,.35); }
.modal::backdrop { background: rgba(3,18,33,.67); backdrop-filter: blur(7px); }
.modal[open] { animation: modalIn .22s ease both; }
.patient-form { padding: clamp(21px, 4vw, 33px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 25px; }.modal-head h2 { margin: 5px 0 0; font: 800 1.45rem Inter, Aptos, 'Segoe UI', sans-serif; letter-spacing: -.04em; }.modal-head > button { width: 38px; height: 38px; border: 0; border-radius: 12px; display: grid; place-items: center; color: var(--muted); background: #eef3f6; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }.field-span { grid-column: span 2; }
.form-grid > label, .sex-choice legend { color: #35495d; font-size: .79rem; font-weight: 800; }.form-grid label small { color: var(--muted); font-size: .66rem; float: right; font-weight: 500; }
.form-grid input:not([type=radio]), .form-grid select { width: 100%; height: 48px; margin-top: 7px; padding: 0 13px; outline: 0; color: var(--ink); border: 1.5px solid var(--line); border-radius: 11px; background: white; transition: .18s; }.form-grid input:focus, .form-grid select:focus { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(47,157,245,.1); }
.sex-choice { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.sex-choice legend { margin-bottom: 7px; }.sex-choice label { cursor: pointer; }.sex-choice input { position: absolute; opacity: 0; pointer-events: none; }.sex-choice span { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 1.5px solid var(--line); border-radius: 11px; color: var(--muted); transition: .18s; }
.sex-choice input[value="H"]:checked + span { color: var(--blue-700); border-color: var(--blue-500); background: #eaf5fe; box-shadow: 0 0 0 3px rgba(47,157,245,.08); }
.sex-choice input[value="F"]:checked + span { color: #c43f70; border-color: var(--rose-500); background: #fde9f0; box-shadow: 0 0 0 3px rgba(230,100,141,.09); }
.sex-choice .icon { width: 18px; }
.sex-chip { width: max-content; display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 8px; font-weight: 800; font-size: .7rem; }
.sex-chip .icon { width: 14px; height: 14px; }.sex-chip.male { color: var(--blue-700); background: #e4f2ff; }.sex-chip.female { color: #c43f70; background: #fde9f0; }
.age-note { display: block; margin-top: 4px; color: var(--muted); font-size: .68rem; }
.departure-field { padding: 12px; border-radius: 13px; background: #f0f8f6; border: 1px solid #d6eee5; }.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 25px; padding-top: 20px; border-top: 1px solid #edf1f4; }.split-actions { justify-content: space-between; }

.app-footer { max-width: 1450px; margin: 30px auto 0; padding: 20px 0 96px; text-align: center; color: #8b9ba9; font-size: .7rem; line-height: 1.7; }.app-footer strong { color: #61788d; }.app-footer small { font-size: .66rem; }
.export-actions { display: flex; gap: 8px; }
.mobile-nav { display: none; }

@keyframes ripple { 0% { transform: scale(.84); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.13); opacity: 0; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes scaleIn { from { transform: scale(.82); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes growBar { from { width: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(15px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .patient-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  :root { --sidebar: 0px; }
  .sidebar { display: none; }
  .main-content { margin: 0; padding: 0 16px; }
  .topbar { min-height: 92px; }
  .topbar .btn { display: none; }
  .live-status { display: none; }
  .mobile-nav { position: fixed; z-index: 30; inset: auto 10px max(8px, env(safe-area-inset-bottom)) 10px; height: 70px; padding: 7px 8px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; border-radius: 22px; color: #8399ab; background: rgba(7,26,46,.96); box-shadow: 0 14px 45px rgba(0,16,31,.28); backdrop-filter: blur(15px); }
  .mobile-nav a { position: relative; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .58rem; font-weight: 700; }.mobile-nav a.active { color: white; }.mobile-nav a.active .icon { color: var(--cyan-500); }.mobile-nav .icon { width: 20px; height: 20px; }.mobile-nav a b { position: absolute; top: 2px; right: 15%; min-width: 17px; height: 17px; display: grid; place-items: center; border-radius: 8px; color: white; background: var(--blue-600); font-size: .55rem; }
  .mobile-nav button { width: 51px; height: 51px; justify-self: center; border: 0; border-radius: 17px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, var(--blue-600), var(--cyan-500)); transform: translateY(-15px); box-shadow: 0 9px 24px rgba(18,197,216,.3); }.mobile-nav button .icon { width: 25px; height: 25px; }
  .app-footer { padding-bottom: 110px; }
  .login-shell { width: min(500px, calc(100% - 28px)); min-height: auto; padding: 40px 0 22px; grid-template-columns: 1fr; gap: 28px; }
  .login-brand { text-align: center; }.login-brand h1 { font-size: 3.2rem; }.login-brand > p:not(.eyebrow) { margin-inline: auto; }.hospital-mark, .privacy-pill { margin-left: auto; margin-right: auto; }.login-card { padding: 25px; }.login-footer { position: static; }
  .dashboard-intro { align-items: flex-start; flex-direction: column; }.period-tabs { width: 100%; overflow-x: auto; }.period-tabs a { flex: 1; min-width: max-content; text-align: center; }
  .charts-grid { grid-template-columns: 1fr; }.chart-wide { grid-column: auto; }.bar-chart.two-columns, .transport-bars { grid-template-columns: 1fr; }
  .patient-grid { grid-template-columns: 1fr; }
  .process-hero { grid-template-columns: 1fr; text-align: center; }.process-art { width: 150px; height: 150px; }.process-art span .icon { width: 58px; height: 58px; }.process-hero p { margin-inline: auto; }.process-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .main-content { padding: 0 12px; }
  .topbar { min-height: 83px; }.topbar .eyebrow { font-size: .62rem; }.topbar h1 { font-size: 1.48rem; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 9px; }.kpi-card { min-height: 128px; padding: 15px; display: block; }.kpi-icon { width: 37px; height: 37px; margin-bottom: 9px; }.kpi-card strong { font-size: 1.45rem; }.kpi-spark { display: none; }
  .chart-card { padding: 18px; }.donut-wrap { flex-direction: column; }.donut { width: 145px; height: 145px; }.donut-legend { width: 100%; }
  .export-strip, .history-toolbar { align-items: stretch; flex-direction: column; }.export-strip .btn, .history-toolbar .btn { width: 100%; }
  .salon-summary { padding: 14px; }.salon-summary .btn { min-width: 44px; font-size: 0; padding: 10px; }.salon-summary .btn .icon { margin: 0; }.salon-summary span:last-child { font-size: .73rem; }
  .form-grid { grid-template-columns: 1fr; }.field-span { grid-column: auto; }.split-actions { flex-direction: column-reverse; }.split-actions .btn { width: 100%; }.modal-actions:not(.split-actions) { flex-direction: column-reverse; }.modal-actions .btn { width: 100%; }
  .patient-details { grid-template-columns: 1fr 1fr; }.process-hero { padding: 35px 20px; }.process-art { width: 120px; height: 120px; }.process-art i:nth-of-type(3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
