:root {
    --studio-ink: #20343d;
    --studio-muted: #586b75;
    --studio-accent: #146c60;
    --studio-border: #dce4e7;
    --studio-canvas: #f5f7fa;
    --bs-primary-rgb: 20, 108, 96;
    --bs-link-color-rgb: 20, 108, 96;
    --bs-link-hover-color-rgb: 13, 81, 72;
    --bs-link-color: #146c60;
    --bs-link-hover-color: #0d5148;
}
* { box-sizing: border-box; }
body { color: var(--studio-ink); background: var(--studio-canvas); margin: 0; display: flex; flex-direction: column; min-height: 100vh; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.6; }
main { flex: 1; padding-block: 2rem 4rem; min-width: 0; }
.container { max-width: 1240px; }
h1,h2,h3,h4,h5,h6 { color: var(--studio-ink); line-height: 1.25; }
h1 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); font-weight: 750; letter-spacing: -.045em; }
h2 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.025em; }
h3,.h5,.card-title { font-weight: 650; }
.text-muted { color: var(--studio-muted) !important; }
.eyebrow { font-size: .7rem; font-weight: 750; letter-spacing: .16em; color: var(--studio-accent); margin-bottom: .65rem; text-transform: uppercase; }
.navbar { background: #142d36; padding-block: .8rem; border-bottom: 1px solid #ffffff14; }
.navbar-brand { font-size: 1.25rem; font-weight: 750; letter-spacing: -.035em; display: flex; align-items: center; gap: .65rem; }
.brand-mark { display: inline-flex; gap: 3px; align-items: center; height: 30px; padding: 0 8px; border-radius: 9px; background: #ffffff14; }
.brand-mark i { width: 3px; background: #94dfcd; border-radius: 2px; height: 10px; }
.brand-mark i:nth-child(2),.brand-mark i:nth-child(4) { height: 18px; }
.brand-mark i:nth-child(3) { height: 25px; }
.navbar-nav { gap: .25rem; align-items: center; }
.navbar .nav-link { color: #c4d1d6; font-size: .875rem; border-radius: 7px; padding: .55rem .8rem !important; }
.navbar .nav-link:hover,.navbar .nav-link.active { background: #ffffff12; color: #fff; }
.navbar .dropdown-menu { border: 1px solid var(--studio-border); border-radius: 12px; padding: .5rem; box-shadow: 0 12px 32px #142d3620; }
.navbar .dropdown-item { border-radius: 6px; padding: .5rem .8rem; }
.studio-intro,.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.75rem; }
.studio-intro p:last-child,.page-heading p:last-child { margin-bottom: 0; max-width: 65ch; }
.card { border: 1px solid var(--studio-border); box-shadow: 0 2px 4px #20343d03; border-radius: 14px; overflow: hidden; }
.card-body { padding: 1.5rem; }
.card-header { background: #fff; border-bottom: 1px solid var(--studio-border); padding: 1rem 1.5rem; }
.card-title { margin-bottom: 1rem; }
.btn { font-weight: 600; font-size: .875rem; padding: .6rem 1rem; border-radius: 8px; line-height: 1.4; }
.btn-sm { font-size: .8rem; padding: .4rem .7rem; }
.btn-primary,.nav-pills .nav-link.active { background-color: var(--studio-accent); border-color: var(--studio-accent); }
.btn-primary:hover,.btn-primary:focus { background: #0d5148; border-color: #0d5148; }
.btn-outline-primary { color: var(--studio-accent); border-color: #91bbb2; }
.btn-outline-primary:hover { background: var(--studio-accent); border-color: var(--studio-accent); }
.btn-outline-secondary { color: #455e69; border-color: #c3ced4; }
.btn-outline-danger { color: #ae3445; border-color: #e1b4bc; }
.btn-group { gap: .3rem; flex-wrap: wrap; }
.btn-group > .btn { border-radius: 7px !important; }
.form-label { font-size: .875rem; font-weight: 600; }
.form-control,.form-select { border-color: #cdd8de; border-radius: 8px; padding: .65rem .8rem; color: var(--studio-ink); }
.form-control::placeholder { color: #71818a; }
.form-control:focus,.form-select:focus { border-color: var(--studio-accent); box-shadow: 0 0 0 3px #146c601a; }
.form-text { color: var(--studio-muted); font-size: .8rem; line-height: 1.6; }
.form-check-input:checked { background-color: var(--studio-accent); border-color: var(--studio-accent); }
.nav-tabs { gap: .5rem; border-bottom: 1px solid var(--studio-border); }
.nav-tabs .nav-link { border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--studio-muted); padding: .8rem 1rem; font-weight: 600; }
.nav-tabs .nav-link.active { color: var(--studio-accent); border-color: var(--studio-accent); background: transparent; }
.nav-pills .nav-link { border-radius: 8px; color: var(--studio-muted); font-weight: 600; font-size: .875rem; }
.nav-pills .nav-link.active { color: #fff; }
.table { margin-bottom: 0; vertical-align: middle; --bs-table-hover-bg: #f5f9f8; }
.table > :not(caption) > * > * { padding: 1rem; }
.table thead th { background: #f8fafb; color: var(--studio-muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; white-space: nowrap; border-bottom-color: var(--studio-border); }
.table td { border-color: #edf0f2; font-size: .875rem; }
.table td:first-child a { font-weight: 650; }
.table-responsive { border-radius: 12px; }
.badge { border-radius: 6px; font-size: .7rem; font-weight: 650; padding: .45em .65em; }
.badge.bg-success { background: #e2f3eb !important; color: #22664d; }
.badge.bg-secondary { background: #edf1f4 !important; color: #526570; }
.badge.bg-info { background: #e5f0f8 !important; color: #245b7f; }
.badge.bg-warning { background: #fff0d4 !important; color: #865719; }
.badge.bg-danger { background: #fbe8ec !important; color: #9e3446; }
.alert { border-radius: 10px; font-size: .875rem; padding: 1rem 1.2rem; }
.alert-info { color: #285b6a; background: #edf6fa; border-color: #cce3ec; }
.alert-warning { color: #79551b; background: #fff8e8; border-color: #f1dfb2; }
.modal-content { border-radius: 16px; border: 0; }
.modal-header,.modal-footer { border-color: var(--studio-border); padding: 1rem 1.5rem; }
.modal-body { padding: 1.5rem; }
.footer { padding-block: 1.25rem; border-top: 1px solid var(--studio-border); color: var(--studio-muted); font-size: .75rem; background: #fff; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer details summary { cursor: pointer; }
.footer details[open] { flex-basis: 100%; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
code { color: #345967; }
audio { max-width: 100%; }
:focus-visible { outline: 3px solid var(--studio-accent); outline-offset: 3px; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 10000; background: white; padding: .75rem; }
.skip-link:focus { top: 1rem; }
.empty-state { text-align: center; padding: 3rem 1.5rem; background: #fafcfb; border: 1px dashed #cbdad5; border-radius: 12px; }
.empty-state .empty-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; background: #e5f2ed; color: var(--studio-accent); border-radius: 16px; font-size: 1.3rem; margin-bottom: 1rem; }
.stats-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-bottom: 1.75rem; }
.stat { background: #fff; border: 1px solid var(--studio-border); border-radius: 12px; padding: 1rem 1.25rem; }
.stat strong { display: block; font-size: 1.65rem; font-weight: 700; letter-spacing: -.04em; line-height: 1.2; }
.stat span { color: var(--studio-muted); font-size: .8rem; }
.toolbar { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-block: 1.25rem; }
.toolbar .form-control { flex: 1 1 200px; width: auto; }
.toolbar .form-select { flex: 0 1 200px; width: auto; }
.admin-navigation { background: #fff; border: 1px solid var(--studio-border); border-radius: 12px; padding: .4rem; display: flex; gap: .5rem; margin-bottom: 2rem; }
.admin-navigation .nav-link { flex: 1; padding: .8rem 1rem; }
.admin-navigation small { display: block; font-weight: 400; font-size: .75rem; opacity: .8; margin-top: .15rem; }
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; max-width: 1000px; margin: 2rem auto; }
.auth-story h1 { max-width: 12ch; font-size: clamp(2.5rem,5vw,3.6rem); }
.auth-story p { max-width: 42ch; }
.auth-story .auth-note { border-left: 3px solid #94bfb4; padding-left: 1rem; margin-top: 2rem; font-size: .875rem; color: var(--studio-muted); }
.auth-card .card-body { padding: 2rem; }
.auth-divider { display: flex; align-items: center; gap: 1rem; color: var(--studio-muted); font-size: .75rem; margin: 1.5rem 0; }
.auth-divider::before,.auth-divider::after { content: ''; height: 1px; background: var(--studio-border); flex: 1; }
.library-tools { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.library-tools .form-control { max-width: 300px; }
@media (max-width: 991px) { .navbar-nav { align-items: stretch; padding-top: 1rem; } .navbar .dropdown-menu { box-shadow: none; } .auth-layout { gap: 2rem; } }
@media (max-width: 767px) {
    main { padding-block: 1.25rem 2.5rem; }
    .studio-intro,.page-heading { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .card-body,.card-header,.modal-body { padding: 1rem; }
    .stats-strip { gap: .5rem; }
    .stat { padding: .85rem; }
    .stat strong { font-size: 1.3rem; }
    .stat span { font-size: .7rem; }
    .auth-layout { grid-template-columns: 1fr; gap: 1rem; margin: .5rem auto; }
    .auth-story h1 { max-width: none; font-size: 2rem; }
    .auth-story .auth-note { display: none; }
    .auth-card .card-body { padding: 1.5rem; }
    .admin-navigation { gap: .2rem; }
    .admin-navigation .nav-link { padding: .6rem .4rem; text-align: center; font-size: .8rem; }
    .admin-navigation small { display: none; }
    .table td { white-space: nowrap; }
    .table td:first-child { white-space: normal; min-width: 150px; overflow-wrap: anywhere; }
    .page-heading h1,.page-heading h2 { overflow-wrap: anywhere; }
    .footer-inner { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

[hidden] { display: none !important; }
@media (max-width: 767px) {
    .admin-users-table td:first-child { min-width: 95px; }
    .admin-users-table > :not(caption) > * > * { padding: .7rem; }
    .admin-users-table .badge { white-space: normal; }
    .library-table, .library-table tbody { display: block; }
    .library-table thead { display: none; }
    .library-table tbody tr { display: grid; grid-template-columns: 1fr; padding: 1rem 0; border-bottom: 1px solid var(--studio-border); }
    .library-table tbody tr:last-child { border-bottom: 0; }
    .library-table td { display: block; border: 0; padding: .3rem 0; white-space: normal; }
    .library-table td:nth-child(2), .library-table td:nth-child(4) { display: none; }
    .library-table .btn-group { margin-top: .5rem; }
}

.event-row { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--studio-border); }
.event-row:last-child { border-bottom: 0; }
.admin-navigation { flex-wrap: wrap; }
.admin-navigation .nav-link { min-width: 130px; }
@media (max-width:767px) { .event-row { padding: 1rem; } .admin-navigation .nav-link { flex: 1 1 30%; min-width: 95px; } }
