/* Daniel Music Hub — ivory, ink & brass */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 500; font-display: swap; src: url('../vendor/fonts/fraunces-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 600; font-display: swap; src: url('../vendor/fonts/fraunces-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../vendor/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../vendor/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../vendor/fonts/inter-latin-600-normal.woff2') format('woff2'); }

:root {
  --ink: #1E2235;
  --ink-2: #2B3048;
  --ink-soft: #4A4F66;
  --muted: #7A7E8E;
  --ivory: #F7F3EC;
  --paper: #FFFFFF;
  --line: #E7E1D6;
  --line-2: #D9D1C2;
  --brass: #B8862F;
  --brass-2: #D3A64F;
  --brass-tint: #F6ECD8;
  --green: #2E8B6E; --green-t: #E3F2EC;
  --red: #C25B4A;   --red-t: #F8E6E2;
  --amber: #B7791F; --amber-t: #FBF0DC;
  --blue: #3E6FB0;  --blue-t: #E5EDF8;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(30,34,53,.05), 0 4px 16px rgba(30,34,53,.05);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14.5px/1.55 var(--sans); color: var(--ink); background: var(--ivory); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration-color: var(--brass); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: 28px; } h2 { font-size: 21px; } h3 { font-size: 17px; } h4 { font-size: 15px; }
p { margin: 0 0 .8em; }
code { background: var(--brass-tint); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .nowrap { white-space: nowrap; }
.right { text-align: right; } .center { text-align: center; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: #D9DBE5; padding: 0 0 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.keys { height: 16px; background-color: #F7F3EC;
  background-image:
    linear-gradient(90deg, transparent 11px, #14172A 11px 20px, transparent 20px 27px, #14172A 27px 36px, transparent 36px 59px, #14172A 59px 68px, transparent 68px 75px, #14172A 75px 84px, transparent 84px 91px, #14172A 91px 100px, transparent 100px),
    repeating-linear-gradient(90deg, #F7F3EC 0 15px, #C9C1B2 15px 16px);
  background-size: 112px 10px, 100% 100%; background-repeat: repeat-x, no-repeat; border-bottom: 3px solid var(--brass); }
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 18px; color: #fff; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--brass); display: grid; place-items: center; font-family: var(--serif); font-size: 20px; color: var(--ink); font-weight: 600; }
.brand-name { font-family: var(--serif); font-size: 17px; line-height: 1.15; color: inherit; }
.brand small { display: block; color: #9EA2B5; font-size: 11.5px; font-family: var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; padding: 6px 12px; gap: 2px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #7D8197; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: #D9DBE5; text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--ink-2); color: #fff; }
.nav a.active { background: var(--ink-2); color: #fff; box-shadow: inset 3px 0 0 var(--brass); }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav .count { margin-left: auto; background: var(--brass); color: var(--ink); font-size: 11px; font-weight: 600; border-radius: 10px; padding: 0 7px; }
.sidebar-foot { margin-top: auto; padding: 14px 20px 0; border-top: 1px solid var(--ink-2); font-size: 13px; }
.sidebar-foot a { color: #9EA2B5; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 34px 6px; }
.topbar h1 { margin: 0; }
.topbar .sub { color: var(--muted); margin-top: 3px; }
.content { padding: 16px 34px 50px; }
.btn.menu-btn { display: none; }

/* ---------- cards & grids ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.card.flush { padding: 0; } .card.flush .card-head { padding: 18px 22px 0; }
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
.stack > * + * { margin-top: 18px; }
.stat { padding: 18px 20px; }
.stat .label { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; }
.stat .value { font-family: var(--serif); font-size: 28px; margin-top: 4px; }
.stat .hint { font-size: 12.5px; color: var(--muted); }
.stat.accent { background: var(--ink); color: #fff; border-color: var(--ink); }
.stat.accent .label, .stat.accent .hint { color: #A9ADC0; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); font: 500 14px var(--sans); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--ink-soft); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); }
.btn-brass { background: var(--brass); border-color: var(--brass); color: #fff; }
.btn-brass:hover { background: #A47628; }
.btn-danger { color: var(--red); border-color: #E8C3BC; }
.btn-sm { padding: 5px 11px; font-size: 13px; border-radius: 7px; }
.btn-lg { padding: 13px 22px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-decoration-color: var(--brass); cursor: pointer; font: inherit; }
label { display: block; font-weight: 500; font-size: 13.5px; color: var(--ink-soft); }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  display: block; width: 100%; margin-top: 5px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 9px; font: 14.5px var(--sans); color: var(--ink); background: #FFFDF9; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brass-2); outline-offset: 0; border-color: var(--brass); }
textarea { min-height: 90px; resize: vertical; }
textarea.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; min-height: 160px; }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; color: var(--ink); }
.check input { margin-top: 3px; accent-color: var(--ink); width: 16px; height: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 18px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid h3 { margin: 10px 0 -2px; padding-top: 10px; border-top: 1px solid var(--line); }
.form-grid h3:first-child { border: 0; padding: 0; margin-top: 0; }
.help { font-size: 12.5px; color: var(--muted); font-weight: 400; margin-top: 4px; }
.inline-form { display: inline; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.filters a { padding: 6px 13px; border-radius: 20px; border: 1px solid var(--line-2); text-decoration: none; font-size: 13px; background: var(--paper); }
.filters a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.search { display: flex; gap: 8px; }
.search input { margin: 0; }

/* ---------- tables & lists ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #FBF8F3; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #FBF8F3; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; }
.empty .glyph { font-size: 28px; display: block; margin-bottom: 6px; }

.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 600; font-size: 13px; flex: none; background: var(--brass); }
.avatar.lg { width: 58px; height: 58px; font-size: 20px; font-family: var(--serif); }
.person { display: flex; align-items: center; gap: 11px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; line-height: 1.6; }
.badge-green { background: var(--green-t); color: var(--green); }
.badge-red { background: var(--red-t); color: var(--red); }
.badge-amber { background: var(--amber-t); color: var(--amber); }
.badge-blue { background: var(--blue-t); color: var(--blue); }
.badge-grey { background: #EEEBE5; color: #6E6A62; }
.chan { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-right: 8px; }
.chan i { width: 7px; height: 7px; border-radius: 50%; background: #CFCAC0; display: inline-block; }
.chan.sent i { background: var(--green); } .chan.failed i { background: var(--red); } .chan.queued i { background: var(--amber); }

/* ---------- alerts ---------- */
.alert { padding: 11px 15px; border-radius: 10px; margin-bottom: 12px; border: 1px solid; font-size: 14px; }
.alert-success { background: var(--green-t); border-color: #BFE0D3; color: #1F6B53; }
.alert-error { background: var(--red-t); border-color: #EBC5BD; color: #9B3F30; }
.alert-warning { background: var(--amber-t); border-color: #EED7AE; color: #8A5A12; }
.alert-info { background: var(--blue-t); border-color: #C6D7EE; color: #2D5490; }

/* ---------- class / lesson bits ---------- */
.when { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 54px; height: 58px; border-radius: 10px; background: var(--brass-tint); flex: none; }
.when b { font-family: var(--serif); font-size: 21px; line-height: 1; }
.when span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--brass); font-weight: 600; }
.next-class { background: var(--ink); color: #fff; border-color: var(--ink); position: relative; overflow: hidden; }
.next-class::after { content: ''; position: absolute; right: -30px; bottom: -20px; width: 220px; height: 70px; opacity: .1;
  background: repeating-linear-gradient(90deg, #fff 0 18px, transparent 18px 22px); transform: rotate(-8deg); }
.next-class .muted { color: #A9ADC0; }
.next-class h2 { font-size: 24px; }
.meet-btn { background: #fff; color: var(--ink); border-color: #fff; }
.ratings { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.rating { background: #FBF8F3; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.rating .r-label { font-size: 12px; color: var(--muted); }
.stars { color: var(--brass); letter-spacing: 2px; font-size: 15px; }
.star-input { display: flex; gap: 1px; flex-direction: row-reverse; justify-content: flex-end; margin-top: 6px; }
.star-input input { display: none !important; }
.star-input label { font-size: 19px; color: #D8D1C3; cursor: pointer; line-height: 1; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--brass); }
.rich p { margin: 0 0 .6em; } .rich ul { margin: 0 0 .8em; padding-left: 20px; } .rich h4 { margin-top: 1em; }
.sheet { background: #FFFEFB; border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow-x: auto; }
.sheet svg { max-width: 100%; height: auto; }
.abc-audio { margin-top: 8px; }
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.video { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.video iframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; }
.video .cap { background: var(--paper); padding: 8px 12px; font-size: 13px; font-weight: 500; }
.note-card { display: block; text-decoration: none; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); transition: border-color .15s, transform .15s; }
.note-card:hover { border-color: var(--brass); transform: translateY(-1px); }
.note-card .song { color: var(--brass); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-color: var(--brass); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 7px 12px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; padding: 5px 11px; border-radius: 20px; background: #EEEBE5; }
.status-pill.on { background: var(--green-t); color: var(--green); }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.timeline { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 18px; }
.timeline .item { position: relative; padding-bottom: 18px; }
.timeline .item::before { content: ''; position: absolute; left: -24px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--brass); border: 2px solid var(--paper); }

/* messages */
.inbox { display: grid; grid-template-columns: 340px 1fr; min-height: 520px; }
.inbox-list { border-right: 1px solid var(--line); overflow-y: auto; max-height: 75vh; }
.inbox-list a { display: block; padding: 13px 18px; border-bottom: 1px solid var(--line); text-decoration: none; }
.inbox-list a.on { background: var(--brass-tint); }
.inbox-list a.unread .subj { font-weight: 700; }
.inbox-list .subj { font-size: 14px; }
.inbox-list .meta { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.inbox-read { padding: 26px 30px; }
.msg-body { white-space: pre-wrap; line-height: 1.65; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(30,34,53,.45); display: none; align-items: flex-start; justify-content: center; padding: 5vh 16px; z-index: 50; overflow-y: auto; }
.modal.open { display: flex; }
.modal .card { width: 100%; max-width: 620px; }
.modal .close { background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--muted); }

/* calendar */
.fc { --fc-border-color: var(--line); --fc-today-bg-color: #FBF3E3; --fc-page-bg-color: var(--paper); font-size: 13.5px; }
.fc .fc-toolbar-title { font-family: var(--serif); font-size: 20px; }
.fc .fc-button-primary { background: var(--paper); color: var(--ink); border-color: var(--line-2); text-transform: capitalize; box-shadow: none !important; }
.fc .fc-button-primary:not(:disabled).fc-button-active, .fc .fc-button-primary:not(:disabled):active { background: var(--ink); color: #fff; border-color: var(--ink); }
.fc .fc-button-primary:hover { background: #F3EEE5; color: var(--ink); }
.fc-event { border-radius: 6px; padding: 1px 3px; cursor: pointer; }
.fc .ev-cancelled { text-decoration: line-through; opacity: .7; }
.fc .ev-completed { opacity: .75; }
.fc .fc-daygrid-event-dot { border-color: var(--brass); }
.fc-col-header-cell-cushion, .fc-daygrid-day-number { text-decoration: none; color: var(--ink-soft); }

/* auth */
.auth-body { background: var(--ink); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px 16px;
  background-image: radial-gradient(circle at 20% 0%, #2E3452 0, transparent 50%); }
.auth-wrap { width: 100%; max-width: 420px; }
.auth-wrap.wide { max-width: 720px; }
.auth-brand { display: flex; align-items: center; gap: 14px; color: #fff; margin-bottom: 20px; }
.auth-brand .brand-name { font-size: 24px; }
.auth-brand .muted { color: #A9ADC0; }
.keys-mark { width: 50px; height: 50px; border-radius: 12px; background: repeating-linear-gradient(90deg, #F7F3EC 0 9px, var(--ink) 9px 11px); position: relative; overflow: hidden; border: 3px solid var(--brass); }
.keys-mark::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 58%; background: repeating-linear-gradient(90deg, transparent 0 6px, var(--ink) 6px 12px, transparent 12px 22px); }
.auth-wrap .card { padding: 28px; }
.auth-switch { text-align: center; margin-top: 16px; color: #A9ADC0; font-size: 13.5px; }
.auth-switch a { color: #fff; }
.steps li { margin-bottom: 6px; }
.invoice-paper { max-width: 640px; }
.inv-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; border-top: 2px solid var(--ink); margin-top: 12px; }
.inv-total b { font-family: var(--serif); font-size: 26px; }

/* client switcher */
.switcher { display: flex; gap: 8px; flex-wrap: wrap; }
.switcher a { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 30px; border: 1px solid var(--line-2); background: var(--paper); text-decoration: none; font-weight: 500; }
.switcher a.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.switcher .avatar { width: 28px; height: 28px; font-size: 11px; }

@media (max-width: 1080px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g-main { grid-template-columns: 1fr; }
  .ratings { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; z-index: 40; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .btn.menu-btn { display: inline-flex; }
  .topbar, .content { padding-left: 18px; padding-right: 18px; }
  .topbar { flex-wrap: wrap; }
  .g-2, .g-3, .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .inbox { grid-template-columns: 1fr; }
  .inbox-list { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .ratings { grid-template-columns: repeat(2, minmax(0,1fr)); }
  h1 { font-size: 23px; }
}
@media print {
  .sidebar, .topbar .btn, .no-print { display: none !important; }
  .shell { display: block; } body { background: #fff; } .card { box-shadow: none; }
}

/* abcjs audio controls: undo the global form styling */
.abcjs-inline-audio { border-radius: 8px; }
.abcjs-inline-audio input.abcjs-midi-tempo { display: inline-block; width: 44px; margin: 0 2px; padding: 0 3px; font-size: 12px; border-radius: 3px; border: 0; background: #fff; color: var(--ink); }
