:root {
    --mata-navy: #17243c;
    --mata-navy-2: #0f192b;
    --mata-orange: #ff7a20;
    --mata-cream: #fff7e8;
    --mata-yellow: #f3e83b;
    --mata-coral: #ff4d5d;
    --mata-aqua: #53dfca;
    --mata-purple: #7657ff;
    --mata-white: #fffdfa;
    --mata-ink: #111522;
    --mata-muted: #697181;
    --mata-line: rgba(23, 36, 60, .16);
    --mata-soft-shadow: 0 18px 45px rgba(23, 36, 60, .09);
    --mata-hard-shadow: 5px 5px 0 var(--mata-navy);
    --tblr-primary: #ff7a20;
    --tblr-primary-rgb: 255, 122, 32;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--mata-navy);
}

body {
    color: var(--mata-ink);
    background:
        radial-gradient(circle at 15% 20%, rgba(83, 223, 202, .07), transparent 24rem),
        radial-gradient(circle at 85% 10%, rgba(243, 232, 59, .07), transparent 22rem),
        #f8f5ef;
    font-family: "Plus Jakarta Sans", sans-serif;
    letter-spacing: .008em;
    text-rendering: optimizeLegibility;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: 9998;
    opacity: .08;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .25) 0 1px, transparent 1.5px),
        radial-gradient(circle at 80% 40%, rgba(23, 36, 60, .22) 0 1px, transparent 1.5px);
    background-size: 9px 9px, 13px 13px;
    content: "";
    pointer-events: none;
    mix-blend-mode: multiply;
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.card-title {
    font-family: "Bricolage Grotesque", sans-serif;
    letter-spacing: -.012em;
}

a {
    color: inherit;
}

button,
a,
input,
select,
textarea,
summary {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--mata-purple);
    outline-offset: 3px;
}

::selection {
    color: var(--mata-navy);
    background: var(--mata-yellow);
}

.page {
    min-height: 100svh;
}

/* Sidebar */
.mata-sidebar {
    width: 264px;
    border: 0;
    background:
        radial-gradient(circle at 10% 8%, rgba(118, 87, 255, .3), transparent 14rem),
        linear-gradient(165deg, var(--mata-navy), var(--mata-navy-2)) !important;
    box-shadow: 10px 0 35px rgba(15, 25, 43, .13);
}

.mata-sidebar::before {
    position: absolute;
    right: -24px;
    bottom: 7%;
    color: rgba(255, 255, 255, .035);
    content: "M";
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 12rem;
    font-weight: 900;
    line-height: .7;
    pointer-events: none;
    transform: rotate(-8deg);
}

.mata-sidebar>.container-fluid {
    position: relative;
    z-index: 1;
    min-height: 100%;
    padding: 20px 14px;
}

.mata-sidebar-mobile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 8px 22px;
}

.mata-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: #fff;
    text-decoration: none;
}

.mata-brand:hover {
    color: #fff;
}

.mata-brand img {
    width: 46px;
    height: 46px;
    padding: 4px;
    border: 2px solid rgba(255, 255, 255, .6);
    border-radius: 15px;
    background: var(--mata-white);
    object-fit: contain;
    box-shadow: 4px 4px 0 var(--mata-orange);
    transform: rotate(-3deg);
}

.mata-brand strong,
.mata-brand small {
    display: block;
}

.mata-brand strong {
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: .91rem;
    font-weight: 800;
    letter-spacing: .025em;
    line-height: 1;
}

.mata-brand small {
    margin-top: 5px;
    color: rgba(255, 255, 255, .52);
    font-size: .54rem;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.mata-sidebar .navbar-collapse {
    display: flex;
    min-height: calc(100vh - 88px);
    flex-direction: column;
}

.mata-sidebar-label {
    width: 100%;
    margin: 10px 0 9px;
    padding: 0 14px;
    color: rgba(255, 255, 255, .42);
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.mata-sidebar .navbar-nav {
    width: 100%;
    gap: 4px;
}

.mata-sidebar .nav-link {
    position: relative;
    display: flex;
    min-height: 47px;
    align-items: center;
    gap: 11px;
    margin: 0;
    padding: 10px 12px;
    border: 1.5px solid transparent;
    border-radius: 14px;
    color: rgba(255, 255, 255, .67);
    font-weight: 700;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.mata-sidebar .nav-link:hover {
    border-color: rgba(255, 255, 255, .12);
    color: #fff;
    background: rgba(255, 255, 255, .06);
    transform: translateX(2px);
}

.mata-sidebar .active .nav-link {
    border-color: var(--mata-navy);
    color: var(--mata-navy);
    background: var(--mata-yellow);
    box-shadow: 4px 4px 0 var(--mata-orange);
}

.mata-sidebar .nav-link-icon {
    display: grid;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    place-items: center;
}

.mata-sidebar .nav-link-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.mata-sidebar .nav-link-icon svg path:first-child:last-child {
    fill: none;
}

.mata-sidebar .nav-link-title {
    font-size: .78rem;
}

.mata-active-dot {
    width: 7px;
    height: 7px;
    margin-left: auto;
    border: 1px solid var(--mata-navy);
    border-radius: 50%;
    background: var(--mata-orange);
}

.mata-sidebar-help {
    width: 100%;
    margin-top: auto;
    padding: 17px;
    border: 1.5px solid rgba(255, 255, 255, .17);
    border-radius: 17px;
    color: white;
    background: rgba(255, 255, 255, .055);
}

.mata-sidebar-help span {
    display: block;
    color: var(--mata-aqua);
    font-size: .57rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.mata-sidebar-help strong {
    display: block;
    margin-top: 7px;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: .93rem;
}

.mata-sidebar-help p {
    margin: 5px 0 0;
    color: rgba(255, 255, 255, .57);
    font-size: .66rem;
    line-height: 1.65;
}

/* Topbar and page heading */
.mata-topbar {
    position: relative;
    z-index: 1040;
    min-height: 72px;
    overflow: visible;
    border-bottom: 1px solid rgba(23, 36, 60, .1);
    background: rgba(255, 253, 250, .82);
    backdrop-filter: blur(18px);
}

.mata-topbar .container-xl {
    gap: 20px;
}

.mata-topbar-context span,
.mata-topbar-context strong {
    display: block;
}

.mata-topbar-context span {
    color: var(--mata-orange);
    font-size: .57rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.mata-topbar-context strong {
    margin-top: 3px;
    color: var(--mata-navy);
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: .91rem;
}

.mata-user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--mata-navy);
    text-decoration: none;
}

.mata-user-menu:hover {
    color: var(--mata-navy);
}

.mata-user-menu>span:nth-child(2) strong,
.mata-user-menu>span:nth-child(2) small {
    display: block;
}

.mata-user-menu>span:nth-child(2) strong {
    font-size: .72rem;
}

.mata-user-menu>span:nth-child(2) small {
    margin-top: 2px;
    color: var(--mata-muted);
    font-size: .61rem;
}

.mata-avatar {
    display: grid;
    width: 39px;
    height: 39px;
    place-items: center;
    border: 2px solid var(--mata-navy);
    border-radius: 13px;
    color: var(--mata-navy);
    background: var(--mata-aqua);
    box-shadow: 3px 3px 0 var(--mata-navy);
    font-family: "Bricolage Grotesque", sans-serif;
    font-weight: 900;
}

.mata-dropdown {
    z-index: 1050;
    overflow: hidden;
    min-width: 200px;
    margin-top: 11px !important;
    border: 1.5px solid var(--mata-navy);
    border-radius: 13px;
    box-shadow: 5px 5px 0 var(--mata-navy);
}

.mata-dropdown-heading {
    padding: 10px 14px 6px;
    color: var(--mata-muted);
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.page-body {
    padding: 30px 0 60px;
}

.mata-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 28px;
}

.mata-page-eyebrow,
.mata-section-kicker {
    display: block;
    margin-bottom: 6px;
    color: var(--mata-orange);
    font-size: .6rem;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.mata-page-heading h1 {
    margin: 0;
    color: var(--mata-navy);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 800;
    line-height: .97;
}

.mata-page-heading p {
    max-width: 680px;
    margin: 9px 0 0;
    color: var(--mata-muted);
    font-size: .82rem;
    line-height: 1.6;
}

.mata-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

.mata-page-actions form {
    margin: 0;
}

/* Shared controls and cards */
.card {
    border: 1.5px solid rgba(23, 36, 60, .18);
    border-radius: 19px;
    background: rgba(255, 253, 250, .95);
    box-shadow: var(--mata-soft-shadow);
}

.card-header {
    min-height: 64px;
    border-bottom-color: rgba(23, 36, 60, .12);
}

.card-title {
    color: var(--mata-navy);
    font-size: 1.02rem;
    font-weight: 800;
}

.btn {
    min-height: 41px;
    padding: 9px 15px;
    border: 1.5px solid rgba(23, 36, 60, .25);
    border-radius: 11px;
    color: var(--mata-navy);
    background: var(--mata-white);
    font-size: .7rem;
    font-weight: 800;
    box-shadow: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover {
    border-color: var(--mata-navy);
    color: var(--mata-navy);
    background: var(--mata-yellow);
    box-shadow: 3px 3px 0 var(--mata-navy);
    transform: translate(-1px, -1px);
}

.btn-sm {
    min-height: 33px;
    padding: 6px 10px;
    border-radius: 9px;
    font-size: .63rem;
}

.btn-primary {
    border-color: var(--mata-navy);
    color: var(--mata-navy);
    background: var(--mata-orange);
    box-shadow: 3px 3px 0 var(--mata-navy);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    border-color: var(--mata-navy) !important;
    color: var(--mata-navy) !important;
    background: var(--mata-yellow) !important;
    box-shadow: 4px 4px 0 var(--mata-navy) !important;
}

.btn-outline-danger {
    border-color: rgba(255, 77, 93, .4);
    color: #c82e3d;
    background: #fff6f7;
}

.btn-outline-danger:hover {
    border-color: var(--mata-coral);
    color: var(--mata-navy);
    background: var(--mata-coral);
}

.form-label {
    margin-bottom: 8px;
    color: var(--mata-navy);
    font-size: .67rem;
    font-weight: 800;
}

.form-label.required::after {
    margin-left: 4px;
    color: var(--mata-coral);
}

.mata-optional {
    display: inline-flex;
    margin-left: 5px;
    padding: 2px 6px;
    border-radius: 999px;
    color: #626b78;
    background: #eceff2;
    font-size: .5rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.form-control,
.form-select {
    min-height: 46px;
    padding: 10px 13px;
    border: 1.5px solid rgba(23, 36, 60, .2);
    border-radius: 12px;
    color: var(--mata-ink);
    background-color: #fff;
    font-family: inherit;
    font-size: .75rem;
}

textarea.form-control {
    min-height: 110px;
    line-height: 1.6;
}

.form-control::placeholder {
    color: #a1a7b0;
}

.form-control:hover,
.form-select:hover {
    border-color: rgba(23, 36, 60, .42);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--mata-purple);
    box-shadow: 0 0 0 4px rgba(118, 87, 255, .12);
}

.form-hint {
    margin-top: 7px;
    color: var(--mata-muted);
    font-size: .61rem;
    line-height: 1.55;
}

.form-hint code {
    color: var(--mata-navy);
    background: rgba(83, 223, 202, .28);
}

.mata-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
    padding: 14px 48px 14px 16px;
    border-width: 1.5px;
    border-radius: 14px;
    font-size: .7rem;
}

.mata-alert strong {
    white-space: nowrap;
}

.mata-alert.is-list {
    display: block;
}

.mata-alert ul {
    padding-left: 18px;
}

.alert-success {
    border-color: #2c8f73;
    color: #174f40;
    background: #dff8ed;
}

.alert-danger {
    border-color: #c83a48;
    color: #842430;
    background: #fff0f2;
}

.alert-info {
    border-color: #48829f;
    color: #24556e;
    background: #e7f6fd;
}

.mata-admin-footer {
    margin-top: auto;
    padding: 20px 0;
    border-top: 1px solid rgba(23, 36, 60, .1);
    color: var(--mata-muted);
    background: rgba(255, 253, 250, .55);
    font-size: .62rem;
}

.mata-admin-footer .container-xl {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

/* Dashboard */
.mata-welcome-card {
    position: relative;
    display: flex;
    min-height: 190px;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    overflow: hidden;
    padding: clamp(24px, 4vw, 42px);
    border: 2px solid var(--mata-navy);
    border-radius: 24px;
    color: var(--mata-navy);
    background:
        radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .7) 0 42px, transparent 43px),
        linear-gradient(135deg, var(--mata-aqua), var(--mata-yellow));
    box-shadow: 8px 8px 0 var(--mata-navy);
}

.mata-welcome-card::after {
    position: absolute;
    right: 18%;
    bottom: -45px;
    width: 120px;
    height: 120px;
    border: 18px solid rgba(23, 36, 60, .12);
    border-radius: 50%;
    content: "";
}

.mata-welcome-card h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 900;
    line-height: .95;
}

.mata-welcome-card p {
    max-width: 600px;
    margin: 12px 0 0;
    font-size: .8rem;
    line-height: 1.65;
}

.mata-welcome-sticker {
    position: relative;
    z-index: 2;
    display: grid;
    width: 112px;
    height: 112px;
    flex: 0 0 112px;
    place-items: center;
    border: 3px solid var(--mata-navy);
    border-radius: 50%;
    background: var(--mata-orange);
    box-shadow: 6px 6px 0 var(--mata-navy);
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: .85;
    text-align: center;
    transform: rotate(7deg);
}

.mata-stat {
    position: relative;
    min-height: 126px;
    overflow: hidden;
    border: 2px solid var(--mata-navy);
    box-shadow: 4px 4px 0 var(--mata-navy);
}

.mata-stat::after {
    position: absolute;
    right: -25px;
    bottom: -34px;
    width: 90px;
    height: 90px;
    border: 14px solid rgba(23, 36, 60, .13);
    border-radius: 50%;
    content: "";
}

.mata-stat .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mata-stat span {
    color: rgba(23, 36, 60, .66);
    font-size: .62rem;
    font-weight: 800;
}

.mata-stat strong {
    margin-top: 8px;
    color: var(--mata-navy);
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 2.15rem;
    line-height: 1;
}

.mata-stat-school {
    background: var(--mata-yellow);
}

.mata-stat-student {
    background: #ff9b83;
}

.mata-stat-book {
    background: #83d9ee;
}

.mata-stat-live {
    background: #8ce5b6;
}

.mata-stat-open {
    background: #b6a7ff;
}

.mata-process-card {
    border: 2px solid var(--mata-navy);
    box-shadow: 5px 5px 0 var(--mata-aqua);
}

.mata-process-item+.mata-process-item {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed rgba(23, 36, 60, .2);
}

.progress {
    height: 9px;
    border: 1px solid rgba(23, 36, 60, .12);
    border-radius: 999px;
    background: #e8e9ea;
}

.progress-bar {
    border-radius: inherit;
    background: linear-gradient(90deg, var(--mata-orange), var(--mata-yellow));
}

/* DataTables */
.mata-table-card {
    overflow: hidden;
}

.mata-table-intro {
    display: flex;
    min-height: 92px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 22px;
    border-bottom: 1px solid rgba(23, 36, 60, .12);
    background:
        linear-gradient(90deg, rgba(83, 223, 202, .12), transparent 45%),
        var(--mata-white);
}

.mata-table-intro h3 {
    margin: 0;
    color: var(--mata-navy);
    font-size: 1.25rem;
    font-weight: 850;
}

.mata-table-intro p {
    max-width: 510px;
    margin: 0;
    color: var(--mata-muted);
    font-size: .66rem;
    line-height: 1.55;
    text-align: right;
}

.mata-text-link {
    color: var(--mata-navy);
    font-size: .68rem;
    font-weight: 800;
    text-decoration: none;
}

.mata-text-link:hover {
    color: var(--mata-orange);
}

.mata-data-table {
    margin: 0 !important;
}

.mata-data-table thead th {
    padding: 13px 15px;
    border-bottom: 1.5px solid var(--mata-navy) !important;
    color: var(--mata-navy);
    background: #f4f1e9;
    font-size: .57rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.mata-data-table tbody td {
    padding: 14px 15px;
    border-bottom-color: rgba(23, 36, 60, .09);
    color: #313845;
    font-size: .68rem;
    vertical-align: middle;
}

.mata-data-table tbody tr:hover td {
    background: rgba(83, 223, 202, .07);
}

.mata-data-table tbody tr:last-child td {
    border-bottom: 0;
}

.mata-table-identity {
    display: flex;
    min-width: 210px;
    align-items: center;
    gap: 11px;
}

.mata-table-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1.5px solid var(--mata-navy);
    border-radius: 12px;
    background-color: white;
    background-position: center;
    background-size: cover;
    box-shadow: 2px 2px 0 var(--mata-navy);
}

.mata-table-avatar.is-letter {
    display: grid;
    place-items: center;
    color: var(--mata-navy);
    background: var(--mata-yellow);
    font-family: "Bricolage Grotesque", sans-serif;
    font-weight: 900;
}

.mata-table-identity strong,
.mata-table-identity small,
.mata-table-stack strong,
.mata-table-stack small {
    display: block;
}

.mata-table-identity strong,
.mata-table-stack strong {
    color: var(--mata-navy);
    font-weight: 800;
}

.mata-table-identity small,
.mata-table-stack small {
    margin-top: 3px;
    color: var(--mata-muted);
    font-size: .58rem;
}

.mata-table-actions {
    display: flex;
    min-width: max-content;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.mata-table-actions form {
    margin: 0;
}

.mata-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid rgba(23, 36, 60, .14);
    border-radius: 999px;
    font-size: .56rem;
    font-weight: 800;
}

.mata-status-pill>span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.mata-status-pill.is-active {
    color: #17644e;
    background: #dff8ed;
}

.mata-status-pill.is-active>span {
    background: #21a57d;
    box-shadow: 0 0 0 3px rgba(33, 165, 125, .13);
}

.mata-status-pill.is-inactive {
    color: #68707d;
    background: #eff0f2;
}

.mata-status-pill.is-inactive>span {
    background: #8f96a1;
}

.mata-order-column {
    width: 100px !important;
}

.mata-order-control {
    display: flex;
    min-width: 84px;
    align-items: center;
    gap: 7px;
}

.mata-order-control>span {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border: 1.5px solid var(--mata-navy);
    border-radius: 10px;
    color: var(--mata-navy);
    background: var(--mata-yellow);
    font-family: "Bricolage Grotesque", sans-serif;
    font-weight: 900;
}

.mata-order-control>div {
    display: grid;
    grid-template-columns: repeat(2, 23px);
    gap: 3px;
}

.mata-order-control form {
    margin: 0;
}

.mata-order-control button {
    display: grid;
    width: 23px;
    height: 25px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(23, 36, 60, .25);
    border-radius: 7px;
    color: var(--mata-navy);
    background: white;
    font-size: .72rem;
    font-weight: 900;
}

.mata-order-control button:hover {
    border-color: var(--mata-navy);
    background: var(--mata-aqua);
}

.mata-code-cell {
    color: var(--mata-purple) !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 800;
    letter-spacing: .06em;
}

.dt-container {
    padding: 0 18px 17px;
}

.dt-container .dt-layout-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 14px 0;
}

.dt-container .dt-layout-row.dt-layout-table {
    margin-right: -18px;
    margin-left: -18px;
}

.dt-container .dt-layout-cell {
    min-width: 0;
}

.dt-container .dt-search,
.dt-container .dt-length {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--mata-muted);
    font-size: .62rem;
}

.dt-container .dt-search input,
.dt-container .dt-length select {
    min-height: 38px;
    border: 1.5px solid rgba(23, 36, 60, .2);
    border-radius: 10px;
    color: var(--mata-ink);
    background: white;
    font-family: inherit;
    font-size: .66rem;
}

.dt-container .dt-search input {
    width: min(260px, 45vw);
    margin-left: 0 !important;
    padding: 8px 11px;
}

.dt-container .dt-length select {
    min-width: 65px;
    padding: 7px 25px 7px 9px;
}

.dt-container .dt-info {
    color: var(--mata-muted);
    font-size: .61rem;
}

.dt-container .pagination {
    gap: 4px;
}

.dt-container .page-link {
    display: grid;
    min-width: 33px;
    min-height: 33px;
    padding: 6px;
    place-items: center;
    border: 1px solid rgba(23, 36, 60, .17);
    border-radius: 9px !important;
    color: var(--mata-navy);
    background: white;
    font-size: .61rem;
    font-weight: 800;
}

.dt-container .page-item.active .page-link {
    border-color: var(--mata-navy);
    color: var(--mata-navy);
    background: var(--mata-yellow);
    box-shadow: 2px 2px 0 var(--mata-navy);
}

.dt-container .dt-processing {
    z-index: 5;
    padding: 14px 20px;
    border: 1.5px solid var(--mata-navy);
    border-radius: 12px;
    color: var(--mata-navy);
    background: var(--mata-yellow);
    box-shadow: 4px 4px 0 var(--mata-navy);
    font-size: .7rem;
    font-weight: 800;
}

/* Filters, import panels, and forms */
.mata-filter-card {
    border: 1.5px dashed rgba(23, 36, 60, .25);
    background: rgba(255, 253, 250, .7);
    box-shadow: none;
}

.mata-import-card {
    overflow: hidden;
    box-shadow: none;
}

.mata-import-card summary {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 20px;
    cursor: pointer;
    list-style: none;
}

.mata-import-card summary::-webkit-details-marker {
    display: none;
}

.mata-import-card summary strong,
.mata-import-card summary small {
    display: block;
}

.mata-import-card summary strong {
    color: var(--mata-navy);
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: .92rem;
}

.mata-import-card summary small {
    margin-top: 4px;
    color: var(--mata-muted);
    font-size: .61rem;
}

.mata-import-card summary>span:last-child {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1.5px solid var(--mata-navy);
    border-radius: 50%;
    color: var(--mata-navy);
    background: var(--mata-yellow);
    font-size: 1rem;
    font-weight: 900;
    transition: transform .2s ease;
}

.mata-import-card[open] summary>span:last-child {
    transform: rotate(45deg);
}

.mata-form-section {
    overflow: hidden;
}

.mata-form-section .card-body {
    padding: clamp(22px, 3vw, 32px);
}

.mata-form-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 27px;
    padding-bottom: 20px;
    border-bottom: 1px dashed rgba(23, 36, 60, .2);
}

.mata-form-heading>span {
    display: grid;
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    place-items: center;
    border: 1.5px solid var(--mata-navy);
    border-radius: 10px;
    color: var(--mata-navy);
    background: var(--mata-aqua);
    box-shadow: 2px 2px 0 var(--mata-navy);
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: .68rem;
    font-weight: 900;
    transform: rotate(-2deg);
}

.mata-form-heading h3 {
    margin: 0;
    color: var(--mata-navy);
    font-size: 1.15rem;
    font-weight: 850;
}

.mata-form-heading p {
    margin: 5px 0 0;
    color: var(--mata-muted);
    font-size: .65rem;
    line-height: 1.55;
}

.mata-form-heading.is-compact {
    align-items: center;
}

.mata-form-heading.is-compact p {
    margin-top: 4px;
}

.mata-form-sticky {
    position: sticky;
    top: 96px;
}

.mata-form-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding: 18px 0 0;
    border-top: 1px dashed rgba(23, 36, 60, .2);
}

.mata-switch-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1.5px solid rgba(23, 36, 60, .17);
    border-radius: 13px;
    background: #fff;
    cursor: pointer;
}

.mata-switch-card:hover {
    border-color: var(--mata-purple);
}

.mata-switch-card input {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 42px;
    border: 1.5px solid var(--mata-navy);
    border-radius: 999px;
    background: #dfe1e5;
    appearance: none;
    cursor: pointer;
}

.mata-switch-card input::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 15px;
    height: 15px;
    border: 1px solid var(--mata-navy);
    border-radius: 50%;
    background: white;
    content: "";
    transition: left .18s ease;
}

.mata-switch-card input:checked {
    background: var(--mata-aqua);
}

.mata-switch-card input:checked::after {
    left: 21px;
}

.mata-switch-card strong,
.mata-switch-card small {
    display: block;
}

.mata-switch-card strong {
    color: var(--mata-navy);
    font-size: .68rem;
}

.mata-switch-card small {
    margin-top: 3px;
    color: var(--mata-muted);
    font-size: .56rem;
    line-height: 1.5;
}

.mata-file-preview {
    position: relative;
    display: grid;
    min-height: 170px;
    margin-bottom: 20px;
    place-items: center;
    overflow: hidden;
    border: 1.5px solid var(--mata-navy);
    border-radius: 15px;
    background: linear-gradient(135deg, var(--mata-cream), rgba(83, 223, 202, .35));
}

.mata-file-preview img {
    width: 100%;
    height: 170px;
    padding: 18px;
    object-fit: contain;
}

.mata-file-preview.is-portrait img {
    height: 260px;
    padding: 0;
    object-fit: cover;
}

.mata-file-preview span {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 5px 8px;
    border: 1px solid var(--mata-navy);
    border-radius: 999px;
    color: var(--mata-navy);
    background: var(--mata-yellow);
    font-size: .53rem;
    font-weight: 800;
}

.mata-file-drop {
    display: flex;
    min-height: 135px;
    align-items: center;
    gap: 16px;
    padding: 22px;
    border: 2px dashed rgba(23, 36, 60, .32);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(83, 223, 202, .1), rgba(243, 232, 59, .1));
    cursor: pointer;
}

.mata-file-drop:hover {
    border-color: var(--mata-purple);
    background: rgba(118, 87, 255, .06);
}

.mata-file-drop input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.mata-file-drop-icon {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    place-items: center;
    border: 2px solid var(--mata-navy);
    border-radius: 16px;
    color: var(--mata-navy);
    background: var(--mata-yellow);
    box-shadow: 4px 4px 0 var(--mata-navy);
    font-size: 1.5rem;
}

.mata-file-drop strong,
.mata-file-drop small {
    display: block;
}

.mata-file-drop strong {
    color: var(--mata-navy);
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: .9rem;
}

.mata-file-drop small {
    margin-top: 6px;
    color: var(--mata-muted);
    font-size: .6rem;
    line-height: 1.5;
}

.mata-current-file,
.mata-info-card,
.mata-recommendation {
    padding: 14px;
    border: 1.5px solid rgba(23, 36, 60, .17);
    border-radius: 13px;
    background: rgba(83, 223, 202, .12);
}

.mata-current-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-size: .66rem;
}

.mata-current-file strong {
    color: var(--mata-navy);
}

.mata-info-card strong,
.mata-recommendation strong {
    color: var(--mata-navy);
    font-size: .68rem;
}

.mata-info-card p,
.mata-recommendation p {
    margin: 6px 0 0;
    color: var(--mata-muted);
    font-size: .59rem;
    line-height: 1.6;
}

.mata-code-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
}

.mata-code-result strong,
.mata-code-result span {
    display: block;
}

.mata-code-result span {
    margin-top: 4px;
    font-size: .62rem;
}

.mata-code-result code {
    padding: 8px 11px;
    border: 1.5px solid var(--mata-navy);
    border-radius: 9px;
    color: var(--mata-navy);
    background: var(--mata-yellow);
    font-size: 1rem;
    font-weight: 900;
}

/* Yearbook cards and processing pages */
.mata-book-card {
    overflow: hidden;
    border: 2px solid var(--mata-navy);
    box-shadow: 5px 5px 0 var(--mata-navy);
    transition: transform .22s ease, box-shadow .22s ease;
}

.mata-book-card:hover {
    box-shadow: 8px 8px 0 var(--mata-orange);
    transform: translateY(-3px);
}

.mata-book-cover {
    position: relative;
    display: flex;
    height: 190px;
    align-items: flex-end;
    overflow: hidden;
    padding: 22px;
    color: white;
    background:
        radial-gradient(circle at 80% 18%, var(--mata-yellow) 0 34px, transparent 35px),
        linear-gradient(145deg, var(--mata-purple), var(--mata-navy));
}

.mata-book-cover::before {
    position: absolute;
    inset: 14px;
    border: 1.5px dashed rgba(255, 255, 255, .45);
    border-radius: 13px;
    content: "";
}

.mata-book-cover::after {
    position: absolute;
    top: 18px;
    right: 27px;
    color: var(--mata-navy);
    content: "✦";
    font-size: 1.8rem;
}

.mata-book-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .45;
    object-fit: cover;
}

.mata-book-cover div {
    position: relative;
    z-index: 1;
}

.mata-book-cover span,
.mata-book-cover strong {
    display: block;
}

.mata-book-cover span {
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.mata-book-cover strong {
    margin-top: 4px;
    color: var(--mata-yellow);
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 1.7rem;
}

.badge {
    padding: 6px 9px;
    border: 1px solid rgba(23, 36, 60, .12);
    border-radius: 999px;
    font-size: .54rem;
    font-weight: 800;
}

.mata-status-draft {
    color: #5c626c;
    background: #eceef1;
}

.mata-status-uploading,
.mata-status-queued {
    color: #745d06;
    background: #fff4bd;
}

.mata-status-processing {
    color: #235f7d;
    background: #dff3fc;
}

.mata-status-ready {
    color: #22684f;
    background: #ddf6e9;
}

.mata-status-published {
    color: #fff;
    background: var(--mata-navy);
}

.mata-status-failed {
    color: #8b2834;
    background: #ffe1e5;
}

.mata-status-archived {
    color: #594a8b;
    background: #e9e3ff;
}

.mata-mini-stat {
    padding: 18px 20px;
    border: 1.5px solid rgba(23, 36, 60, .18);
    box-shadow: 3px 3px 0 rgba(23, 36, 60, .14);
}

.mata-mini-stat span,
.mata-mini-stat strong {
    display: block;
}

.mata-mini-stat span {
    color: var(--mata-muted);
    font-size: .6rem;
    font-weight: 700;
}

.mata-mini-stat strong {
    margin-top: 5px;
    color: var(--mata-navy);
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 1.6rem;
}

.mata-error {
    max-height: 220px;
    overflow: auto;
    white-space: pre-wrap;
    font-size: .6rem;
}

.mata-upload-card {
    overflow: hidden;
    border: 2px solid var(--mata-navy);
    text-align: center;
    box-shadow: 7px 7px 0 var(--mata-aqua);
}

.mata-upload-icon {
    display: grid;
    width: 74px;
    height: 86px;
    margin: 0 auto 22px;
    place-items: center;
    border: 2px solid var(--mata-navy);
    border-radius: 8px 8px 18px;
    color: var(--mata-navy);
    background: var(--mata-orange);
    box-shadow: 8px 8px 0 var(--mata-yellow);
    font-weight: 900;
    transform: rotate(-3deg);
}

.mata-dropzone {
    position: relative;
    display: flex;
    min-height: 170px;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(23, 36, 60, .35);
    border-radius: 18px;
    background: var(--mata-cream);
    cursor: pointer;
}

.mata-dropzone:hover {
    border-color: var(--mata-purple);
    background: rgba(118, 87, 255, .06);
}

.mata-dropzone input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mata-dropzone strong,
.mata-dropzone small {
    display: block;
}

.mata-dropzone strong {
    color: var(--mata-navy);
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 1rem;
}

.mata-dropzone small {
    margin-top: 6px;
    color: var(--mata-muted);
    font-size: .65rem;
}

.empty-row {
    padding: 50px !important;
    color: var(--mata-muted);
    text-align: center;
}

/* Authentication — matched to the landing page */
html.mata-auth-root {
    width: 100%;
    min-height: 100%;
    background: linear-gradient(145deg, var(--mata-purple), var(--mata-navy));
}

.mata-auth {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    margin: 0;
    background: linear-gradient(145deg, var(--mata-purple), var(--mata-navy));
}

.mata-auth::before {
    opacity: .14;
    mix-blend-mode: normal;
}

.mata-auth-page {
    position: relative;
    display: grid;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    place-items: center;
    overflow: hidden;
    padding: 100px 22px 50px;
}

.mata-auth-page::before,
.mata-auth-page::after {
    position: absolute;
    border: 3px solid var(--mata-navy);
    content: "";
    pointer-events: none;
}

.mata-auth-page::before {
    top: 15%;
    left: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--mata-yellow);
    transform: rotate(12deg);
}

.mata-auth-page::after {
    right: -40px;
    bottom: 8%;
    width: 135px;
    height: 90px;
    border-radius: 22px;
    background: var(--mata-aqua);
    transform: rotate(-12deg);
}

.mata-auth-brand {
    position: absolute;
    top: 20px;
    left: 28px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
}

.mata-auth-brand:hover {
    color: white;
}

.mata-auth-brand img {
    width: 50px;
    height: 50px;
    padding: 5px;
    border: 2px solid var(--mata-navy);
    border-radius: 15px;
    background: var(--mata-white);
    box-shadow: 4px 4px 0 var(--mata-orange);
    object-fit: contain;
}

.mata-auth-brand strong,
.mata-auth-brand small {
    display: block;
}

.mata-auth-brand strong {
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: .88rem;
    letter-spacing: .025em;
}

.mata-auth-brand small {
    margin-top: 3px;
    color: rgba(255, 255, 255, .6);
    font-size: .52rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.mata-auth-shell {
    position: relative;
    z-index: 3;
    display: grid;
    width: min(980px, 100%);
    grid-template-columns: .9fr 1.1fr;
    overflow: hidden;
    border: 3px solid var(--mata-navy);
    border-radius: 28px;
    background: var(--mata-cream);
    box-shadow: 12px 12px 0 var(--mata-orange);
}

.mata-auth-art {
    position: relative;
    display: flex;
    min-height: 590px;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 28px;
    color: white;
    background:
        linear-gradient(180deg, rgba(23, 36, 60, .1), rgba(23, 36, 60, .92)),
        url("../images/about-team.webp") center/cover no-repeat;
}

.mata-auth-art::before {
    position: absolute;
    top: 8%;
    left: -4%;
    color: rgba(255, 255, 255, .18);
    content: "MATA";
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 8rem;
    font-weight: 900;
    transform: rotate(-10deg);
}

.mata-auth-eyebrow {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1.5px solid currentColor;
    border-radius: 999px;
    font-size: .56rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.mata-auth-eyebrow::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mata-yellow);
    content: "";
}

.mata-auth-art>div {
    position: relative;
    z-index: 1;
}

.mata-auth-art h1 {
    margin: 0;
    font-size: clamp(2.8rem, 5vw, 4.8rem);
    font-weight: 900;
    line-height: .86;
}

.mata-auth-art p {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, .76);
    font-size: .75rem;
    line-height: 1.75;
}

.mata-auth-form {
    padding: clamp(30px, 5vw, 60px);
}

.mata-auth-form-heading>span {
    color: var(--mata-orange);
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.mata-auth-form-heading h2 {
    margin: 8px 0 0;
    color: var(--mata-navy);
    font-size: 2.35rem;
    font-weight: 850;
}

.mata-auth-form-heading p {
    margin: 7px 0 22px;
    color: var(--mata-muted);
    font-size: .68rem;
    line-height: 1.6;
}

.mata-auth-field {
    margin-top: 17px;
}

.mata-auth-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--mata-navy);
    font-size: .61rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.mata-auth-field input {
    width: 100%;
    min-height: 51px;
    padding: 11px 14px;
    border: 2px solid var(--mata-navy);
    border-radius: 12px;
    color: var(--mata-ink);
    background: white;
    font: inherit;
    font-size: .73rem;
}

.mata-auth-field input:focus {
    border-color: var(--mata-purple);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(118, 87, 255, .12);
}

.mata-password-field {
    position: relative;
}

.mata-password-field input {
    padding-right: 96px;
}

.mata-password-field button {
    position: absolute;
    top: 50%;
    right: 9px;
    padding: 6px 8px;
    border: 0;
    border-radius: 7px;
    color: var(--mata-navy);
    background: var(--mata-yellow);
    font-size: .57rem;
    font-weight: 900;
    transform: translateY(-50%);
}

.mata-auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    color: var(--mata-muted);
    font-size: .63rem;
    cursor: pointer;
}

.mata-auth-remember input {
    width: 17px;
    height: 17px;
    accent-color: var(--mata-purple);
}

.mata-auth-submit {
    display: flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: space-between;
    margin-top: 19px;
    padding: 11px 15px;
    border: 2px solid var(--mata-navy);
    border-radius: 12px;
    color: var(--mata-navy);
    background: var(--mata-orange);
    box-shadow: 4px 4px 0 var(--mata-navy);
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: .7rem;
    font-weight: 900;
}

.mata-auth-submit:hover {
    background: var(--mata-yellow);
    transform: translate(-1px, -1px);
}

.mata-auth-submit span {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border: 1.5px solid var(--mata-navy);
    border-radius: 50%;
    background: white;
}

.mata-auth-back {
    display: inline-flex;
    margin-top: 24px;
    color: var(--mata-navy);
    font-size: .62rem;
    font-weight: 800;
    text-decoration: none;
}

.mata-auth-back:hover {
    color: var(--mata-orange);
}

/* Responsive */
@media (min-width: 992px) {
    .page-wrapper {
        margin-left: 264px;
    }
}

@media (max-width: 1199px) {
    .mata-form-sticky {
        position: static;
    }
}

@media (max-width: 991px) {
    .mata-sidebar {
        width: 100%;
        min-height: auto;
    }

    .mata-sidebar>.container-fluid {
        min-height: auto;
        padding: 10px 14px;
    }

    .mata-sidebar-mobile-row {
        padding: 0;
    }

    .mata-brand img {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .mata-sidebar .navbar-collapse {
        min-height: auto;
        padding: 15px 0 5px;
    }

    .mata-sidebar-help {
        display: none;
    }

    .mata-topbar {
        min-height: 64px;
    }

    .page-body {
        padding-top: 24px;
    }

    .mata-auth-shell {
        grid-template-columns: 1fr;
    }

    .mata-auth-art {
        min-height: 330px;
    }
}

@media (max-width: 767px) {
    .mata-page-heading {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 22px;
    }

    .mata-page-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .mata-page-actions>.btn,
    .mata-page-actions>form {
        flex: 1 1 auto;
    }

    .mata-page-actions>form .btn {
        width: 100%;
    }

    .mata-welcome-card {
        min-height: 165px;
    }

    .mata-welcome-sticker {
        width: 88px;
        height: 88px;
        flex-basis: 88px;
        font-size: 1rem;
    }

    .mata-table-intro {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .mata-table-intro p {
        text-align: left;
    }

    .dt-container .dt-layout-row:not(.dt-layout-table) {
        align-items: stretch;
        flex-direction: column;
    }

    .dt-container .dt-search,
    .dt-container .dt-length {
        justify-content: space-between;
    }

    .dt-container .dt-search input {
        width: 100%;
    }

    .dt-container .dt-layout-end {
        margin-left: 0 !important;
    }

    .mata-form-footer {
        position: sticky;
        z-index: 20;
        bottom: 0;
        margin-right: -12px;
        margin-left: -12px;
        padding: 12px;
        border: 1px solid rgba(23, 36, 60, .12);
        border-radius: 14px 14px 0 0;
        background: rgba(255, 253, 250, .93);
        backdrop-filter: blur(15px);
    }

    .mata-code-result {
        align-items: flex-start;
        flex-direction: column;
    }

    .mata-admin-footer .container-xl {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 560px) {
    .mata-topbar-context {
        display: none;
    }

    .mata-page-heading h1 {
        font-size: 2.25rem;
    }

    .mata-welcome-card {
        padding: 23px;
    }

    .mata-welcome-sticker {
        display: none;
    }

    .mata-form-section .card-body {
        padding: 20px 17px;
    }

    .mata-form-heading {
        gap: 11px;
    }

    .mata-file-drop {
        align-items: flex-start;
        flex-direction: column;
    }

    .mata-auth-page {
        padding: 85px 12px 30px;
    }

    .mata-auth-brand {
        top: 16px;
        left: 18px;
    }

    .mata-auth-brand img {
        width: 42px;
        height: 42px;
    }

    .mata-auth-shell {
        border-radius: 20px;
        box-shadow: 7px 7px 0 var(--mata-orange);
    }

    .mata-auth-art {
        min-height: 250px;
        padding: 22px;
    }

    .mata-auth-art h1 {
        font-size: 2.65rem;
    }

    .mata-auth-form {
        padding: 25px 20px 28px;
    }

    .mata-auth-form-heading h2 {
        font-size: 1.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Admin shell hotfix: keep the canvas continuous and restore mobile collapse. */
html {
    min-height: 100%;
    background: #f8f5ef;
}

body.mata-admin {
    min-height: 100vh;
    min-height: 100svh;
}

body.mata-admin>.page {
    min-height: 100vh;
    min-height: 100svh;
    background:
        radial-gradient(circle at 15% 20%, rgba(83, 223, 202, .07), transparent 24rem),
        radial-gradient(circle at 85% 10%, rgba(243, 232, 59, .07), transparent 22rem),
        #f8f5ef;
}

body.mata-admin .page-wrapper {
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    flex-direction: column;
    background: transparent;
}

body.mata-admin .page-body {
    width: 100%;
    flex: 1 0 auto;
}

body.mata-admin .mata-admin-footer {
    flex: 0 0 auto;
}

@media (min-width: 992px) {
    body.mata-admin .mata-sidebar .navbar-collapse {
        display: flex !important;
    }
}

@media (max-width: 991px) {
    body.mata-admin .mata-sidebar {
        position: relative;
        z-index: 1030;
        width: 100%;
        min-height: 0;
        max-height: 100svh;
    }

    body.mata-admin .mata-sidebar::before {
        display: none;
    }

    body.mata-admin .mata-sidebar .navbar-collapse.collapse:not(.show) {
        display: none !important;
    }

    body.mata-admin .mata-sidebar .navbar-collapse.collapse.show {
        display: flex !important;
        max-height: calc(100svh - 62px);
        overflow: hidden !important;
    }

    body.mata-admin .mata-sidebar .navbar-collapse.collapsing {
        display: block !important;
        overflow: hidden;
    }

    body.mata-admin .page-wrapper {
        min-height: calc(100vh - 62px);
        min-height: calc(100svh - 62px);
        margin-left: 0 !important;
    }
}

/*
 * Sidebar viewport fix
 * The sidebar never becomes a separate scroll area. The right page remains
 * the only vertically scrollable canvas.
 */
body.mata-admin .mata-sidebar {
    overflow: hidden !important;
    overscroll-behavior: none;
    scrollbar-width: none;
}

body.mata-admin .mata-sidebar::-webkit-scrollbar,
body.mata-admin .mata-sidebar .navbar-collapse::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

@media (min-width: 992px) {
    body.mata-admin .mata-sidebar {
        height: 100vh;
        height: 100svh;
        max-height: 100vh;
        max-height: 100svh;
    }

    body.mata-admin .mata-sidebar>.container-fluid {
        display: flex;
        height: 100%;
        min-height: 0;
        flex-direction: column;
        overflow: hidden;
    }

    body.mata-admin .mata-sidebar-mobile-row {
        flex: 0 0 auto;
    }

    body.mata-admin .mata-sidebar .navbar-collapse {
        width: 100%;
        height: auto;
        min-height: 0;
        flex: 1 1 auto;
        overflow: hidden !important;
        overscroll-behavior: none;
        scrollbar-width: none;
    }

    body.mata-admin .mata-sidebar .navbar-nav,
    body.mata-admin .mata-sidebar-help {
        flex: 0 0 auto;
    }
}

@media (min-width: 992px) and (max-height: 700px) {
    body.mata-admin .mata-sidebar-help {
        display: none;
    }

    body.mata-admin .mata-sidebar>.container-fluid {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    body.mata-admin .mata-sidebar-mobile-row {
        padding-bottom: 14px;
    }

    body.mata-admin .mata-sidebar .nav-link {
        min-height: 43px;
        padding-top: 8px;
        padding-bottom: 8px;
    }
}

/*
 * Authentication viewport lock
 * Keep the login as a centered, single-screen composition at every browser
 * zoom level. The card is allowed to shrink with the viewport, never to grow
 * the document and create page scrollbars.
 */
html.mata-auth-root,
html.mata-auth-root body.mata-auth {
    width: 100%;
    height: 100%;
    min-height: 100%;
    margin: 0;
    overflow: hidden;
    overscroll-behavior: none;
}

html.mata-auth-root body.mata-auth {
    position: fixed;
    inset: 0;
}

body.mata-auth .mata-auth-page {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 18px clamp(18px, 3vw, 48px);
    overflow: hidden;
}

body.mata-auth .mata-auth-shell {
    width: min(980px, calc(100% - 24px));
    height: min(590px, calc(100% - 24px));
    min-height: 0;
    max-height: calc(100% - 24px);
}

body.mata-auth .mata-auth-art {
    height: 100%;
    min-height: 0;
}

body.mata-auth .mata-auth-form {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 4.3vw, 54px);
}

@media (min-width: 992px) and (max-height: 720px) {
    body.mata-auth .mata-auth-brand {
        top: 14px;
    }

    body.mata-auth .mata-auth-brand img {
        width: 44px;
        height: 44px;
    }

    body.mata-auth .mata-auth-art {
        padding: 24px;
    }

    body.mata-auth .mata-auth-art h1 {
        font-size: clamp(2.7rem, 4.2vw, 4rem);
    }

    body.mata-auth .mata-auth-art p {
        margin-top: 12px;
    }

    body.mata-auth .mata-auth-form {
        padding: 24px clamp(32px, 4vw, 48px);
    }

    body.mata-auth .mata-auth-form-heading h2 {
        font-size: 2.05rem;
    }

    body.mata-auth .mata-auth-form-heading p {
        margin: 5px 0 14px;
    }

    body.mata-auth .mata-auth-field {
        margin-top: 12px;
    }

    body.mata-auth .mata-auth-field input {
        min-height: 46px;
    }

    body.mata-auth .mata-auth-remember {
        margin-top: 11px;
    }

    body.mata-auth .mata-auth-submit {
        min-height: 46px;
        margin-top: 13px;
    }

    body.mata-auth .mata-auth-back {
        margin-top: 14px;
    }
}

@media (max-width: 991px) {
    body.mata-auth .mata-auth-page {
        padding: 72px 14px 14px;
    }

    body.mata-auth .mata-auth-shell {
        width: min(620px, calc(100% - 10px));
        height: min(650px, 100%);
        max-height: 100%;
        grid-template-columns: 1fr;
        grid-template-rows: minmax(135px, .34fr) minmax(0, .66fr);
    }

    body.mata-auth .mata-auth-art {
        min-height: 0;
        padding: 20px 24px;
    }

    body.mata-auth .mata-auth-art h1 {
        max-width: 520px;
        font-size: clamp(2.15rem, 7vw, 3.4rem);
    }

    body.mata-auth .mata-auth-art p {
        max-width: 520px;
        margin-top: 9px;
        line-height: 1.45;
    }

    body.mata-auth .mata-auth-form {
        padding: 24px clamp(24px, 7vw, 50px);
    }
}

@media (max-width: 560px) {
    body.mata-auth .mata-auth-page {
        padding: 68px 10px 10px;
    }

    body.mata-auth .mata-auth-brand {
        top: 12px;
        left: 15px;
    }

    body.mata-auth .mata-auth-brand img {
        width: 39px;
        height: 39px;
        border-radius: 11px;
    }

    body.mata-auth .mata-auth-brand strong {
        font-size: .76rem;
    }

    body.mata-auth .mata-auth-brand small {
        font-size: .45rem;
    }

    body.mata-auth .mata-auth-shell {
        height: min(620px, 100%);
        grid-template-rows: minmax(105px, .24fr) minmax(0, .76fr);
        border-radius: 18px;
    }

    body.mata-auth .mata-auth-art {
        justify-content: flex-end;
        padding: 15px 18px;
        background-position: center 43%;
    }

    body.mata-auth .mata-auth-eyebrow,
    body.mata-auth .mata-auth-art p {
        display: none;
    }

    body.mata-auth .mata-auth-art h1 {
        font-size: clamp(1.75rem, 9vw, 2.35rem);
        line-height: .9;
    }

    body.mata-auth .mata-auth-form {
        padding: 20px 18px;
    }

    body.mata-auth .mata-auth-form-heading h2 {
        font-size: clamp(1.65rem, 8vw, 1.95rem);
    }

    body.mata-auth .mata-auth-form-heading p {
        margin-bottom: 10px;
    }

    body.mata-auth .mata-auth-field {
        margin-top: 10px;
    }

    body.mata-auth .mata-auth-field input {
        min-height: 44px;
    }

    body.mata-auth .mata-auth-remember {
        margin-top: 9px;
    }

    body.mata-auth .mata-auth-submit {
        min-height: 44px;
        margin-top: 11px;
    }

    body.mata-auth .mata-auth-back {
        margin-top: 12px;
    }
}

@media (max-height: 610px) {
    body.mata-auth .mata-auth-page {
        padding-top: 56px;
        padding-bottom: 8px;
    }

    body.mata-auth .mata-auth-brand {
        top: 8px;
    }

    body.mata-auth .mata-auth-shell {
        height: 100%;
        grid-template-rows: minmax(82px, .2fr) minmax(0, .8fr);
    }

    body.mata-auth .mata-auth-form {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    body.mata-auth .mata-auth-form-heading>span,
    body.mata-auth .mata-auth-form-heading p,
    body.mata-auth .mata-auth-back {
        display: none;
    }
}
/* Data transfer: import/export dibuat seperti langkah kerja, bukan form teknis. */
.mata-transfer-card .card-body{padding:18px 20px 20px}.mata-transfer-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}.mata-transfer-steps>div{display:flex;gap:10px;align-items:flex-start;padding:12px;border:1.5px solid rgba(23,36,60,.1);border-radius:13px;background:rgba(255,253,250,.76)}.mata-transfer-steps>div>b{display:grid;place-items:center;flex:0 0 28px;height:28px;border:1.5px solid var(--mata-navy);border-radius:9px;background:var(--mata-aqua);color:var(--mata-navy);font-size:.7rem;box-shadow:2px 2px 0 var(--mata-navy)}.mata-transfer-steps strong,.mata-transfer-file>span{display:block;color:var(--mata-navy);font-size:.78rem;font-weight:800}.mata-transfer-steps small,.mata-transfer-file small,.mata-transfer-template-row span{display:block;margin-top:3px;color:var(--mata-muted);font-size:.69rem;line-height:1.45}.mata-transfer-template-row{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:14px;padding:11px 12px;border:1px dashed rgba(23,36,60,.16);border-radius:12px;background:rgba(83,223,202,.055)}.mata-transfer-template-row span{margin:0;max-width:620px}.mata-transfer-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end}.mata-transfer-form.is-two-column{grid-template-columns:minmax(200px,.7fr) minmax(260px,1fr) auto}.mata-transfer-file{display:block}.mata-transfer-file>span{margin-bottom:6px}.mata-transfer-file .form-control,.mata-transfer-file .form-select{min-height:44px}.mata-transfer-form>.btn{min-height:44px;white-space:nowrap}@media(max-width:991px){.mata-transfer-steps{grid-template-columns:1fr}.mata-transfer-form,.mata-transfer-form.is-two-column{grid-template-columns:1fr}.mata-transfer-template-row{align-items:flex-start;flex-direction:column}}

/* Import ramah admin: workbook Excel dengan panduan + upload 2 langkah. */
.mata-import-easy summary{padding:15px 18px}.mata-import-summary-copy{display:flex;align-items:center;gap:11px;min-width:0}.mata-import-summary-copy>span:last-child{min-width:0}.mata-import-summary-copy strong,.mata-import-summary-copy small{display:block}.mata-import-summary-copy strong{font-size:.86rem;color:var(--mata-navy)}.mata-import-summary-copy small{margin-top:3px;color:var(--mata-muted);font-size:.72rem;line-height:1.45}.mata-import-format-badge{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:52px;height:28px;padding:0 9px;border:1.5px solid var(--mata-navy);border-radius:9px;background:var(--mata-aqua);color:var(--mata-navy);font-size:.62rem;font-weight:900;letter-spacing:.05em;box-shadow:2px 2px 0 var(--mata-navy)}.mata-import-easy .card-body{padding:18px}.mata-import-easy-grid{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:14px}.mata-import-easy-step{padding:17px;border:1.5px solid rgba(23,36,60,.1);border-radius:16px;background:rgba(255,255,255,.78)}.mata-import-easy-step.is-upload{background:linear-gradient(180deg,rgba(73,215,199,.055),rgba(255,255,255,.9))}.mata-import-step-heading{display:flex;align-items:flex-start;gap:11px;margin-bottom:14px}.mata-import-step-heading>b{display:grid;place-items:center;flex:0 0 32px;height:32px;border:1.5px solid var(--mata-navy);border-radius:10px;background:var(--mata-yellow,#fff22d);color:var(--mata-navy);font-size:.75rem;box-shadow:2px 2px 0 var(--mata-navy)}.mata-import-step-heading strong,.mata-import-step-heading small{display:block}.mata-import-step-heading strong{color:var(--mata-navy);font-size:.82rem;font-weight:900}.mata-import-step-heading small{margin-top:3px;color:var(--mata-muted);font-size:.7rem;line-height:1.5}.mata-import-template-btn{width:100%;min-height:46px;justify-content:center;background:var(--mata-navy);border-color:var(--mata-navy);color:#fff!important;font-weight:800}.mata-import-template-btn:hover{transform:translateY(-1px)}.mata-import-feature-list{display:grid;gap:7px;margin-top:12px}.mata-import-feature-list>span{display:block;padding:7px 9px;border-radius:9px;background:#f6f8f9;color:#40506a;font-size:.69rem;line-height:1.4}.mata-friendly-import-form{display:grid;gap:11px}.mata-friendly-select>span{display:block;margin-bottom:6px;color:var(--mata-navy);font-size:.75rem;font-weight:850}.mata-friendly-select>span b{color:#f36f21}.mata-friendly-select small{display:block;margin-top:5px;color:var(--mata-muted);font-size:.67rem}.mata-friendly-select .form-select{min-height:46px;font-weight:700;color:var(--mata-navy);background-color:#fff}.mata-friendly-file{position:relative;display:flex;align-items:center;gap:12px;min-height:82px;padding:14px;border:1.5px dashed rgba(23,36,60,.24);border-radius:14px;background:#fff;cursor:pointer;transition:border-color .16s ease,background .16s ease,transform .16s ease}.mata-friendly-file:hover,.mata-friendly-file.is-dragging{border-color:var(--mata-aqua);background:rgba(73,215,199,.065)}.mata-friendly-file.is-dragging{transform:translateY(-1px)}.mata-friendly-file.has-file{border-style:solid;border-color:rgba(25,173,151,.55);background:rgba(73,215,199,.08)}.mata-friendly-file input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.mata-friendly-file-icon{display:grid;place-items:center;flex:0 0 52px;height:52px;border-radius:13px;background:var(--mata-navy);color:#fff;font-size:.68rem;font-weight:900;letter-spacing:.03em;box-shadow:3px 3px 0 var(--mata-aqua)}.mata-friendly-file>span:last-child{min-width:0}.mata-friendly-file strong,.mata-friendly-file small{display:block}.mata-friendly-file strong{color:var(--mata-navy);font-size:.78rem}.mata-friendly-file small{margin-top:4px;color:var(--mata-muted);font-size:.68rem;line-height:1.4;word-break:break-word}.mata-import-result-note{display:grid;gap:2px;padding:10px 12px;border:1px solid rgba(23,36,60,.08);border-radius:11px;background:#f7f9fa}.mata-import-result-note strong{font-size:.7rem;color:var(--mata-navy)}.mata-import-result-note span{font-size:.66rem;line-height:1.45;color:var(--mata-muted)}.mata-import-submit{min-height:46px;font-weight:850}.mata-import-legacy-note{margin-top:12px;padding-top:11px;border-top:1px dashed rgba(23,36,60,.12);color:var(--mata-muted);font-size:.67rem;line-height:1.45}.mata-import-example-file{display:flex;align-items:center;gap:9px;padding:12px;border-radius:12px;background:#14213a;color:#fff}.mata-import-example-file>span{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:var(--mata-aqua);color:var(--mata-navy);font-size:1rem}.mata-import-example-file strong{font-size:.75rem}.mata-import-easy-grid.is-music .mata-friendly-file-icon{font-size:1.1rem}@media(max-width:991px){.mata-import-easy-grid{grid-template-columns:1fr}}@media(max-width:575px){.mata-import-easy .card-body{padding:13px}.mata-import-easy-step{padding:13px}.mata-import-summary-copy{align-items:flex-start}.mata-import-format-badge{min-width:46px}.mata-friendly-file{align-items:flex-start}.mata-friendly-file-icon{flex-basis:44px;height:44px}}
