@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Nunito+Sans:wght@400;600;700;800&display=swap');

:root {
    --dojo-ink: #17221d;
    --dojo-green: #203b31;
    --dojo-red: #bd3941;
    --dojo-paper: #f7f5ef;
    --dojo-muted: #68736e;
    --bs-primary: #bd3941;
    --bs-primary-rgb: 189, 57, 65;
    --bs-link-color: #a72e36;
    --bs-link-hover-color: #7f2027;
}

body { background: var(--dojo-paper); color: var(--dojo-ink); font-family: "Nunito Sans", "Noto Sans JP", sans-serif; }
a { text-underline-offset: 3px; }
.japanese-text, .japanese-title { font-family: "Noto Sans JP", sans-serif; }
.btn { border-radius: .65rem; font-weight: 700; }
.btn-primary { --bs-btn-bg: var(--dojo-red); --bs-btn-border-color: var(--dojo-red); --bs-btn-hover-bg: #a52f37; --bs-btn-hover-border-color: #a52f37; }
.form-control, .form-select { border-color: #d8d8d2; border-radius: .65rem; padding: .65rem .8rem; }
.form-control:focus, .form-select:focus { border-color: rgba(189,57,65,.6); box-shadow: 0 0 0 .25rem rgba(189,57,65,.12); }
.form-label { font-weight: 700; font-size: .9rem; }

.dojo-nav { background: var(--dojo-ink); box-shadow: 0 5px 20px rgba(20,30,25,.14); }
.navbar-brand { font-weight: 800; letter-spacing: -.02em; }
.brand-mon { width: 2rem; height: 2rem; border-radius: 50%; display: inline-grid; place-items: center; background: var(--dojo-red); color: #fff; font-family: "Noto Sans JP", sans-serif; }
.dojo-nav .nav-link { color: rgba(255,255,255,.72); font-weight: 600; }
.dojo-nav .nav-link:hover { color: #fff; }
.profile-link small { display: block; color: rgba(255,255,255,.45); line-height: 1; font-size: .67rem; text-transform: uppercase; letter-spacing: .08em; }

.eyebrow { color: var(--dojo-red); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.page-heading h1 { font-weight: 800; letter-spacing: -.035em; margin: .3rem 0 .25rem; }
.page-heading p { margin: 0; color: var(--dojo-muted); }
.section-card, .stat-card, .category-card, .content-card { background: #fff; border: 1px solid rgba(23,34,29,.08); border-radius: 1rem; box-shadow: 0 6px 24px rgba(23,34,29,.05); }
.section-card { padding: 1.4rem; }
.form-card { max-width: 920px; }

.hero-card { min-height: 280px; color: #fff; padding: clamp(1.5rem, 5vw, 3.5rem); border-radius: 1.35rem; overflow: hidden; position: relative; display: flex; align-items: center; background: radial-gradient(circle at 85% 30%, rgba(255,255,255,.1), transparent 24%), linear-gradient(125deg, #17221d, #29483d); box-shadow: 0 18px 40px rgba(23,34,29,.17); }
.hero-card > div:first-child { position: relative; z-index: 1; }
.hero-card .eyebrow { color: #edb7b9; }
.hero-card h1 { font-weight: 800; letter-spacing: -.04em; }
.hero-kanji { position: absolute; right: 5%; font: 700 clamp(6rem, 18vw, 12rem)/1 "Noto Sans JP", sans-serif; opacity: .055; writing-mode: vertical-rl; }
.stat-card { padding: 1.25rem 1.4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.stat-card span { color: var(--dojo-muted); font-size: .9rem; font-weight: 700; }
.stat-card strong { font-size: 1.75rem; }
.category-dot { width: .65rem; height: 2.5rem; border-radius: 1rem; flex: none; background: var(--dot); }
.belt-display { height: 4rem; border: 1px solid #d8d8d2; display: grid; place-items: center; position: relative; font-weight: 800; box-shadow: inset 0 -8px 0 rgba(0,0,0,.04); }
.belt-display::after { content: ""; width: 3rem; height: calc(100% + 12px); position: absolute; right: 17%; background: #eee; border: 1px solid #d8d8d2; }
.belt-display span { position: relative; z-index: 1; }

.category-card { padding: 1.25rem; position: relative; overflow: hidden; }
.category-accent { height: .3rem; position: absolute; inset: 0 0 auto; background: var(--category-color); }
.content-card { padding: 1.25rem; display: flex; flex-direction: column; }
.category-pill { font-size: .75rem; color: var(--dojo-muted); font-weight: 700; display: inline-flex; align-items: center; gap: .4rem; }
.category-pill i { width: .55rem; height: .55rem; border-radius: 50%; background: var(--dot); }
.japanese-title { font-size: 2rem; margin: 1.35rem 0 .3rem; font-weight: 700; }
.reading { color: #45534d; }
.translation { font-weight: 700; font-size: 1.05rem; margin-bottom: 0; }
.status { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; }
.status::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; }
.status.active::before { background: #25a367; }.status.inactive::before { background: #aaa; }
.table > :not(caption) > * > * { padding: 1rem 1.25rem; }
.table thead th { color: var(--dojo-muted); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; background: #fafaf8; }
.avatar-preview { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; border: 5px solid #fff; box-shadow: 0 5px 22px rgba(23,34,29,.15); }
.avatar-fallback { margin-inline: auto; display: grid; place-items: center; font-size: 3rem; font-weight: 800; color: #fff; background: var(--dojo-green); }

.guest-shell { min-height: 100vh; }
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr); }
.login-art { background: linear-gradient(145deg, rgba(23,34,29,.82), rgba(32,59,49,.93)), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.08'%3E%3Cpath d='M0 40h80M40 0v80'/%3E%3Ccircle cx='40' cy='40' r='18'/%3E%3C/g%3E%3C/svg%3E"); color: #fff; display: flex; align-items: flex-end; padding: clamp(2rem, 7vw, 7rem); }
.login-art-content { max-width: 650px; }
.login-art .eyebrow { color: #e8a9ad; }
.login-art h1 { font-size: clamp(2.5rem, 5vw, 5rem); font-weight: 800; letter-spacing: -.055em; line-height: 1.02; margin: 1rem 0 1.5rem; }
.login-art p { font-size: 1.2rem; color: rgba(255,255,255,.72); max-width: 500px; }
.belt-line { width: min(340px, 80%); height: .6rem; margin-top: 2.5rem; background: linear-gradient(to right, #f4f4f0 11%, #7dd3fc 11% 22%, #facc15 22% 33%, #fb923c 33% 44%, #2563eb 44% 55%, #16a34a 55% 66%, #7e22ce 66% 77%, #78350f 77% 88%, #111 88%); }
.login-panel { background: #fff; display: grid; place-items: center; padding: 2rem; }
.login-card { width: min(100%, 430px); }
.login-brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--dojo-ink); font-size: 1.35rem; font-weight: 800; text-decoration: none; margin-bottom: clamp(3rem, 8vh, 7rem); }

@media (max-width: 991.98px) {
    .login-page { grid-template-columns: 1fr; }
    .login-art { min-height: 35vh; padding: 2.5rem 2rem; }
    .login-art h1 { font-size: clamp(2.2rem, 8vw, 3.5rem); }
    .login-art p, .belt-line { display: none; }
    .login-panel { padding: 2.5rem 1.25rem; align-items: start; }
    .login-brand { margin-bottom: 2.5rem; }
    .dojo-nav form { margin-top: .75rem; }
}
@media (max-width: 575.98px) {
    .page-heading { align-items: flex-start; flex-direction: column; }
    .page-heading .btn { width: 100%; }
    .hero-card { min-height: 310px; align-items: flex-end; }
    .hero-card .btn { width: 100%; }
    .stat-card { align-items: flex-start; flex-direction: column; }
    .table > :not(caption) > * > * { padding: .8rem; }
}

