* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #101828;
    background:
        radial-gradient(circle at top left, rgba(79, 112, 255, 0.12), transparent 30%),
        radial-gradient(circle at top right, rgba(69, 182, 245, 0.14), transparent 28%),
        linear-gradient(180deg, rgba(247, 249, 251, 0.88), rgba(247, 249, 251, 0.82)),
        repeating-linear-gradient(0deg, transparent 0 39px, rgba(203, 213, 225, 0.38) 39px 40px),
        repeating-linear-gradient(90deg, transparent 0 119px, rgba(203, 213, 225, 0.38) 119px 120px),
        #f7f9fb;
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a {
    color: #175cd3;
    text-decoration: none;
}

.shell,
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 18px;
}

.hero {
    width: min(720px, 100%);
    text-align: center;
    padding: 56px 24px;
}

.brand-avatar {
    width: 84px;
    height: 84px;
    margin-bottom: 18px;
    border-radius: 16px;
}

.eyebrow {
    margin: 0 0 8px;
    color: #667085;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: 40px;
    line-height: 1.1;
}

.lead {
    margin: 16px 0 0;
    color: #475467;
    font-size: 17px;
}

.compact-lead {
    margin: 28px 0;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}

.auth-card {
    width: min(440px, 100%);
    padding: 34px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 18px 40px rgba(57, 105, 128, 0.14);
    backdrop-filter: blur(8px);
}

.dashboard-card {
    width: min(520px, 100%);
}

.brand-line {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.avatar {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
}

.avatar.large {
    width: 72px;
    height: 72px;
}

.profile-avatar {
    border-radius: 16px;
    object-fit: cover;
    background: #e7efff;
}

.profile-avatar-trigger {
    display: inline-flex;
    flex: 0 0 auto;
    cursor: pointer;
}

.profile-avatar-trigger input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.profile-avatar-trigger:hover .profile-avatar {
    box-shadow: 0 0 0 3px rgba(23, 92, 211, 0.16);
}

.brand-line h1 {
    font-size: 28px;
}

.form {
    display: grid;
    gap: 18px;
}

label {
    display: grid;
    gap: 8px;
    color: #344054;
    font-size: 22px;
    font-weight: 600;
}

input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    outline: none;
    color: #101828;
    background: #ffffff;
    font: inherit;
}

select,
textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    outline: none;
    color: #101828;
    background: #ffffff;
    font: inherit;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

input:focus {
    border-color: #175cd3;
    box-shadow: 0 0 0 3px rgba(23, 92, 211, 0.12);
}

.code-row {
    display: grid;
    grid-template-columns: 1fr 116px;
    gap: 10px;
}

small,
.muted {
    color: #667085;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.check input {
    width: 16px;
    height: 16px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.primary {
    color: #ffffff;
    background: #175cd3;
}

.secondary {
    color: #344054;
    background: #ffffff;
    border-color: #d0d5dd;
}

.compact {
    min-height: 46px;
    padding: 0 12px;
    white-space: nowrap;
}

.full {
    width: 100%;
}

.alert,
.success {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 21px;
}

.alert {
    color: #b42318;
    background: #fef3f2;
    border: 1px solid #fecdca;
}

.alert p {
    margin: 0;
}

.alert p + p {
    margin-top: 6px;
}

.success {
    color: #067647;
    background: #ecfdf3;
    border: 1px solid #abefc6;
}

.switch {
    margin: 22px 0 0;
    color: #667085;
    text-align: center;
}

@media (max-width: 520px) {
    .auth-card {
        padding: 24px;
    }

    h1 {
        font-size: 34px;
    }

    .code-row {
        grid-template-columns: 1fr;
    }

    .actions {
        flex-direction: column;
    }
}

.fishing-auth {
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.35), transparent 28%),
        linear-gradient(180deg, #7fc1f0 0%, #add9f8 48%, #fff8df 49%, #fff8df 100%);
    overflow-x: hidden;
}

.fishing-auth::before,
.fishing-auth::after {
    content: "";
    position: fixed;
    left: -8vw;
    right: -8vw;
    bottom: 0;
    height: 58vh;
    pointer-events: none;
    background: #fff9e8;
    z-index: 0;
}

.fishing-auth::before {
    border-radius: 50% 50% 0 0 / 18% 18% 0 0;
    transform: translateX(-24vw) translateY(5vh) rotate(4deg);
}

.fishing-auth::after {
    border-radius: 50% 50% 0 0 / 20% 20% 0 0;
    transform: translateX(30vw) translateY(5vh) rotate(-4deg);
}

.fishing-page {
    position: relative;
    z-index: 1;
    align-items: flex-start;
    padding-top: 34px;
}

.fishing-card {
    width: min(570px, calc(100vw - 36px));
    min-height: 540px;
    padding: 74px 84px 56px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 18px 40px rgba(57, 105, 128, 0.14);
    backdrop-filter: blur(10px);
}

.fishing-card.register-card {
    padding-top: 50px;
    min-height: 620px;
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 36px;
}

.auth-logo {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 8px;
}

.fishing-title {
    margin: 0;
    color: #080d18;
    text-align: center;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.15;
}

.fishing-card .form {
    gap: 24px;
}

.fishing-card input {
    height: 58px;
    padding: 0 28px;
    border: 1px solid rgba(148, 163, 184, 0.58);
    border-radius: 10px;
    color: #111827;
    background: rgba(255, 255, 250, 0.72);
    font-size: 20px;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.04);
}

.fishing-card select,
.fishing-card textarea {
    border: 1px solid rgba(148, 163, 184, 0.58);
    color: #111827;
    background: rgba(255, 255, 250, 0.72);
    font-size: 18px;
}

.fishing-card select {
    height: 58px;
    padding: 0 28px;
    border-radius: 10px;
}

.fishing-card textarea {
    border-radius: 10px;
}

.fishing-card input::placeholder {
    color: #6b7280;
}

.fishing-card input:focus {
    border-color: #45a7ed;
    box-shadow: 0 0 0 4px rgba(69, 167, 237, 0.14);
}

.fishing-card .button {
    min-height: 58px;
    border-radius: 10px;
    font-size: 20px;
}

.fishing-card .primary {
    background: linear-gradient(180deg, #54b8f5 0%, #2f98e7 100%);
    box-shadow: 0 10px 18px rgba(47, 152, 231, 0.26);
}

.fishing-card .secondary {
    color: #ffffff;
    background: linear-gradient(180deg, #5bbbf3 0%, #329de9 100%);
    border-color: transparent;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: -2px;
    color: #0f172a;
    font-size: 20px;
}

.login-options a,
.fishing-card .switch a {
    color: #126fcb;
}

.fishing-card .check {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #111827;
    font-size: 20px;
    font-weight: 500;
}

.fishing-card .check input {
    width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 5px;
}

.login-captcha-row {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 12px;
}

.captcha-chip {
    min-height: 58px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    color: #263238;
    background:
        linear-gradient(90deg, rgba(113, 203, 70, 0.72) 0 30%, transparent 30% 35%, rgba(85, 171, 225, 0.72) 35% 65%, transparent 65% 70%, rgba(220, 136, 123, 0.74) 70% 100%),
        #f9f3db;
    font-size: 14px;
    font-weight: 800;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.captcha-chip:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.fishing-card small {
    min-height: 18px;
    padding-left: 18px;
    color: #64748b;
    font-size: 13px;
}

.fishing-card .code-row {
    grid-template-columns: 1fr 140px;
}

.fishing-card .compact {
    min-height: 58px;
    padding: 0 16px;
    font-size: 16px;
}

.fishing-card .alert {
    border-radius: 12px;
}

.fishing-card .switch {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 20px;
}

.register-card .switch {
    justify-content: center;
    gap: 8px;
}

.dashboard-card {
    width: min(650px, calc(100vw - 36px));
}

.dashboard-actions {
    display: grid;
    gap: 12px;
    margin: 18px 0;
}

.levels-card {
    width: 100%;
    padding: 20px;
}

.level-list {
    display: grid;
    gap: 14px;
}

.level-item {
    position: relative;
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 18px;
    padding: 18px 18px 18px 20px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.level-item::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 0;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #54b8f5 0%, #2f98e7 100%);
    opacity: 0.86;
}

.level-icon {
    width: 88px;
    height: 88px;
}

.level-item h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.level-item p {
    margin: 8px 0 0;
    color: #334155;
    line-height: 1.68;
    font-size: 14px;
}

.level-item .muted {
    color: #175cd3;
    font-size: 13px;
    font-weight: 700;
}

.level-item:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 112, 255, 0.24);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

@media (max-width: 620px) {
    .fishing-page {
        padding-top: 20px;
    }

    .fishing-card,
    .fishing-card.register-card {
        min-height: auto;
        padding: 42px 24px 34px;
        border-radius: 34px;
    }

    .fishing-title {
        margin-bottom: 28px;
        font-size: 34px;
    }

    .fishing-card input,
    .fishing-card .button,
    .captcha-chip {
        height: 52px;
        min-height: 52px;
        font-size: 17px;
    }

    .login-options,
    .fishing-card .check,
    .fishing-card .switch {
        font-size: 16px;
    }

    .login-captcha-row,
    .fishing-card .code-row {
        grid-template-columns: 1fr;
    }

    .level-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .level-item::before {
        top: 12px;
        right: 50%;
        bottom: auto;
        left: 50%;
        width: 72px;
        height: 4px;
        transform: translateX(-50%);
    }

    .level-icon {
        margin: 0 auto;
    }
}

.app-shell-body {
    overflow: hidden;
}

.app-shell {
    position: relative;
    z-index: 1;
    width: 100vw;
    height: 100vh;
    margin: 0;
    display: grid;
    grid-template-rows: 64px 1fr;
    border: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: none;
    backdrop-filter: blur(8px);
    overflow: hidden;
}

.sidebar-float-toggle {
    position: absolute;
    left: 18px;
    top: 78px;
    z-index: 5;
    display: none;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(47, 111, 237, 0.22);
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(180deg, #54b8f5 0%, #2f98e7 100%);
    box-shadow: 0 8px 14px rgba(47, 152, 231, 0.22);
    cursor: pointer;
    font: inherit;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.app-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 0 18px 0 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(248, 250, 252, 0.9);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}

.app-user {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 10px;
    grid-column: 3;
}

.app-brand {
    grid-column: 1;
}

.header-logout {
    margin: 0;
}

.header-logout-button {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 12px;
    color: #dc2626;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 18px;
    font-weight: 800;
}

.app-brand,
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 6px 12px;
    border: 0;
    border-radius: 0;
    color: #111827;
    background: transparent;
    font-weight: 800;
}

.app-brand {
    padding: 6px 0;
}

.app-brand img,
.user-chip img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.app-brand img {
    border-radius: 8px;
}

.app-body {
    min-height: 0;
    display: grid;
    grid-template-columns: 318px 1fr;
}

.app-sidebar {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 12px;
    padding: 14px 14px 16px;
    border-right: 1px solid rgba(148, 163, 184, 0.35);
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 250, 255, 0.8));
    backdrop-filter: blur(10px);
}

.sheet-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 12px 0 14px;
    border: 1px solid rgba(79, 112, 255, 0.12);
    border-radius: 16px;
    color: #1d4ed8;
    background: linear-gradient(135deg, rgba(79, 112, 255, 0.08), rgba(69, 182, 245, 0.08));
    gap: 12px;
    font-size: 16px;
    font-weight: 800;
}

.sheet-title span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    line-height: 1.35;
}

.sheet-title span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(180deg, #54b8f5 0%, #2f98e7 100%);
    box-shadow: 0 0 0 4px rgba(47, 152, 231, 0.12);
}

.sheet-create {
    min-width: 0;
}

.sheet-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 50%;
    color: #1d4ed8;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(235, 243, 255, 0.96));
    box-shadow: 0 8px 16px rgba(47, 111, 237, 0.08);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sheet-add-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(79, 112, 255, 0.12);
    border-radius: 16px;
    color: #1d4ed8;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(238, 246, 255, 0.88));
    font-size: 14px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sheet-add-text {
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.sheet-add-form:hover {
    border-color: rgba(79, 112, 255, 0.22);
    box-shadow: 0 10px 24px rgba(47, 111, 237, 0.08);
    transform: translateY(-1px);
}

.sheet-add-form:hover .sheet-add-text,
.sheet-add-form:hover .sheet-add {
    color: #175cd3;
}

.sheet-add-form:hover .sheet-add {
    border-color: rgba(79, 112, 255, 0.36);
    box-shadow: 0 10px 18px rgba(47, 111, 237, 0.12);
    transform: translateY(-1px);
}

.sheet-login-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    color: #175cd3;
    font-size: 14px;
    font-weight: 700;
}

.sidebar-toggle {
    justify-self: end;
    width: 30px;
    height: 30px;
    margin-bottom: 2px;
    border: 1px solid rgba(47, 111, 237, 0.22);
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(180deg, #4f90f8 0%, #377de8 100%);
    cursor: pointer;
    font: inherit;
    font-size: 21px;
    font-weight: 800;
    line-height: 1;
}

.side-nav {
    display: grid;
    align-content: start;
    gap: 8px;
    overflow: auto;
    padding-right: 2px;
}

.side-nav-group {
    display: grid;
    gap: 8px;
}

.side-nav a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 56px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 12px;
    color: #111827;
    background: rgba(255, 255, 255, 0.72);
    font-size: 18px;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.side-nav a:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 10px 18px rgba(47, 111, 237, 0.08);
}

.side-nav a::before {
    content: attr(data-index);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-right: 14px;
    border-radius: 8px;
    color: #2f6fed;
    background: #e7efff;
    font-size: 14px;
    font-weight: 800;
}

.side-nav a.is-active {
    color: #1d4ed8;
    background: linear-gradient(135deg, rgba(231, 239, 255, 0.96), rgba(223, 243, 255, 0.9));
    border-color: #84a7ff;
    box-shadow: inset 0 0 0 1px rgba(47, 111, 237, 0.2), 0 10px 18px rgba(47, 111, 237, 0.08);
}

.side-nav a.sheet-disabled {
    opacity: 0.72;
}

.sheet-card {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto 24px;
    align-items: center;
    min-height: 44px;
    padding: 0 8px 0 0;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.sheet-card:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 10px 18px rgba(47, 111, 237, 0.08);
}

.sheet-card.is-active {
    background: linear-gradient(135deg, rgba(231, 239, 255, 0.96), rgba(223, 243, 255, 0.9));
    border-color: #84a7ff;
    box-shadow: inset 0 0 0 1px rgba(47, 111, 237, 0.2), 0 10px 18px rgba(47, 111, 237, 0.08);
}

.sheet-card.is-active::after {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 0;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #54b8f5 0%, #2f98e7 100%);
}

.side-nav .sheet-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    margin-left: 10px;
    border: 0;
    border-radius: 8px;
    color: #2f6fed;
    background: #e7efff;
    font-size: 13px;
    font-weight: 800;
    box-shadow: none;
}

.side-nav .sheet-open::before {
    content: attr(data-index);
    display: inline;
    width: auto;
    height: auto;
    margin: 0;
    border-radius: 0;
    color: inherit;
    background: transparent;
    font-size: inherit;
    font-weight: inherit;
}

.sheet-name-form {
    min-width: 0;
    margin: 0;
}

.sheet-name-display {
    display: block;
    min-width: 0;
    padding: 0 6px;
    color: #111827;
    font-size: 15px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sheet-name-form input {
    display: none;
    height: 34px;
    min-width: 0;
    padding: 0 6px;
    border: 0;
    border-radius: 8px;
    color: #111827;
    background: transparent;
    font-size: 15px;
    font-weight: 700;
    cursor: text;
}

.sheet-card.is-editing .sheet-name-display {
    display: none;
}

.sheet-card.is-editing .sheet-name-form input {
    display: block;
}

.sheet-name-form input:focus {
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(47, 111, 237, 0.18);
}

.sheet-online-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 22px;
    padding: 0 7px;
    border: 1px solid rgba(22, 163, 74, 0.16);
    border-radius: 999px;
    color: #15803d;
    background: rgba(240, 253, 244, 0.9);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.sheet-delete-form {
    margin: 0;
}

.sheet-delete {
    opacity: 0;
    pointer-events: none;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid rgba(220, 38, 38, 0.18);
    border-radius: 50%;
    color: #b91c1c;
    background: rgba(255, 255, 255, 0.86);
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}

.sheet-card:hover .sheet-delete,
.sheet-delete:focus {
    opacity: 1;
    pointer-events: auto;
}

.sheet-delete:hover {
    color: #ffffff;
    background: #dc2626;
}

.sidebar-logout {
    margin: 0;
}

.sidebar-logout-button {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(220, 38, 38, 0.22);
    border-radius: 12px;
    color: #b91c1c;
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.app-confirm {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 24px;
}

.app-confirm[hidden] {
    display: none !important;
}

.app-confirm__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(4px);
}

.app-confirm__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    width: min(420px, calc(100vw - 36px));
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 255, 0.96));
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.app-confirm__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(220, 38, 38, 0.16);
    border-radius: 14px;
    color: #dc2626;
    background: #fef2f2;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}

.app-confirm__content {
    min-width: 0;
}

.app-confirm__content h2 {
    margin: 0;
    color: #111827;
    font-size: 20px;
    line-height: 1.25;
}

.app-confirm__content p {
    margin: 8px 0 0;
    color: #475467;
    font-size: 14px;
    line-height: 1.65;
}

.app-confirm__content p span {
    color: #111827;
    font-weight: 800;
}

.app-confirm__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.app-confirm__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
}

.app-confirm__button.secondary {
    color: #344054;
    border-color: rgba(148, 163, 184, 0.44);
    background: rgba(255, 255, 255, 0.92);
}

.app-confirm__button.danger {
    color: #ffffff;
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 10px 18px rgba(220, 38, 38, 0.22);
}

.app-confirm__button:hover {
    transform: translateY(-1px);
}

.app-content {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.86), rgba(248, 250, 252, 0.86)),
        repeating-linear-gradient(0deg, transparent 0 39px, rgba(203, 213, 225, 0.28) 39px 40px),
        repeating-linear-gradient(90deg, transparent 0 119px, rgba(203, 213, 225, 0.28) 119px 120px);
}

.sidebar-collapsed .app-body {
    grid-template-columns: 0 1fr;
}

.sidebar-collapsed .app-sidebar {
    padding: 0;
    border-right: 0;
}

.sidebar-collapsed .side-nav,
.sidebar-collapsed .sidebar-toggle,
.sidebar-collapsed .sheet-title,
.sidebar-collapsed .sheet-create {
    display: none;
}

.sidebar-collapsed .sidebar-float-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-collapsed .app-sidebar {
    overflow: hidden;
}

.content-hero,
.panel-card {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 16px 36px rgba(57, 105, 128, 0.08);
}

.page-inner {
    height: 100%;
    min-height: 0;
    padding: 22px;
}

.content-hero {
    padding: 22px 24px;
    margin-bottom: 18px;
}

.dashboard-page,
.levels-page,
.apply-page {
    display: grid;
    gap: 18px;
    align-content: start;
    min-height: 100%;
}

.dashboard-page {
    grid-template-rows: minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.dashboard-hero,
.levels-page .content-hero,
.apply-page .content-hero {
    position: relative;
    overflow: hidden;
}

.dashboard-hero::after,
.levels-page .content-hero::after,
.apply-page .content-hero::after {
    content: "";
    position: absolute;
    right: -42px;
    top: -28px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 112, 255, 0.12), transparent 64%);
    pointer-events: none;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.hero-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid rgba(47, 111, 237, 0.12);
    border-radius: 999px;
    color: #1d4ed8;
    background: rgba(47, 111, 237, 0.08);
    font-size: 12px;
    font-weight: 700;
}

.dashboard-workspace {
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.dashboard-workspace .sheet-grid-page {
    min-height: 0;
    overflow: hidden;
    border-radius: 16px;
}

.dashboard-workspace .sheet-grid-header {
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.dashboard-workspace .sheet-grid-header span,
.dashboard-workspace .sheet-grid-rows span {
    border-right-color: rgba(148, 163, 184, 0.22);
}

.dashboard-workspace .sheet-grid-header span:first-child {
    border-top-left-radius: 16px;
}

.dashboard-workspace .sheet-grid-header span:last-child {
    border-top-right-radius: 16px;
}

.dashboard-workspace .sheet-grid-rows {
    background: linear-gradient(180deg, #f8fbff 0%, #f1f5fb 100%);
    border-right: 1px solid rgba(148, 163, 184, 0.24);
}

.dashboard-workspace .sheet-grid-canvas {
    background:
        linear-gradient(rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.98)),
        repeating-linear-gradient(0deg, transparent 0 39px, rgba(148, 163, 184, 0.22) 39px 40px),
        repeating-linear-gradient(90deg, transparent 0 119px, rgba(148, 163, 184, 0.22) 119px 120px);
}

.content-hero h1 {
    font-size: 30px;
}

.content-hero p:last-child {
    margin: 12px 0 0;
    color: #475467;
    font-size: 17px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.panel-card {
    padding: 20px;
}

.panel-card h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

.panel-card p {
    color: #475467;
    line-height: 1.7;
}

.level-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #111827;
    font-weight: 800;
}

.level-summary img {
    width: 64px;
    height: 64px;
}

.big-number {
    margin: 0;
    color: #126fcb !important;
    font-size: 44px;
    font-weight: 900;
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(440px, 680px) minmax(360px, 1fr);
    gap: 28px;
    align-items: start;
    height: 100%;
    min-height: 0;
}

.profile-page {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.profile-panel {
    max-width: none;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 250, 255, 0.82));
}

.profile-heading {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 18px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.profile-heading h2 {
    margin: 4px 0 8px;
}

.profile-heading-copy {
    min-width: 0;
}

.profile-heading .eyebrow {
    margin-bottom: 6px;
    color: #175cd3;
    font-size: 13px;
    letter-spacing: 0.14em;
}

.profile-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.profile-meta-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(47, 111, 237, 0.12);
    border-radius: 999px;
    color: #1d4ed8;
    background: rgba(47, 111, 237, 0.08);
    font-size: 12px;
    font-weight: 700;
}

.profile-name-input {
    width: 100%;
    max-width: none;
    height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 14px;
    color: #101828;
    background: rgba(255, 255, 255, 0.82);
    font-size: 28px;
    font-weight: 900;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.profile-name-input[readonly] {
    cursor: default;
}

.profile-name-input:not([readonly]),
.profile-name-input:focus {
    border-color: #84a7ff;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.12);
}

.profile-heading p {
    margin: 8px 0 0;
    font-size: 14px;
}

.profile-level-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.profile-level-row p {
    margin: 0;
}

.profile-level-text {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(23, 92, 211, 0.12);
    border-radius: 999px;
    color: #175cd3;
    background: rgba(23, 92, 211, 0.08);
    font-weight: 800;
}

.profile-post-count-text {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(47, 111, 237, 0.12);
    border-radius: 999px;
    color: #1d4ed8 !important;
    background: rgba(47, 111, 237, 0.08);
    font-weight: 800;
}

.profile-next-level-text {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 0 12px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    color: #b45309 !important;
    background: rgba(255, 251, 235, 0.92);
    font-size: 13px !important;
    font-weight: 800;
}

.profile-avatar-trigger {
    align-self: start;
}

.profile-avatar {
    border: 4px solid rgba(255, 255, 255, 0.92);
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 14px 30px rgba(47, 111, 237, 0.12), 0 0 0 1px rgba(148, 163, 184, 0.16);
}

.profile-avatar-trigger:hover .profile-avatar {
    box-shadow: 0 18px 36px rgba(47, 111, 237, 0.16), 0 0 0 1px rgba(148, 163, 184, 0.16);
}

.profile-panel label {
    gap: 10px;
    color: #344054;
    font-size: 14px;
    font-weight: 700;
}

.profile-panel input:not(.profile-name-input),
.profile-panel select,
.profile-panel textarea {
    border: 1px solid rgba(148, 163, 184, 0.42);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.profile-panel input:not(.profile-name-input):focus,
.profile-panel select:focus,
.profile-panel textarea:focus {
    border-color: #4f8df6;
    box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.1);
}

.profile-panel textarea {
    min-height: 128px;
    padding: 16px 18px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.7;
}

.profile-panel textarea::placeholder {
    font-size: 15px;
    font-weight: 600;
}

.profile-panel select {
    min-height: 48px;
    padding: 0 16px;
}

.profile-panel .button.primary.full {
    min-height: 52px;
    border-radius: 14px;
    background: linear-gradient(180deg, #4f90f8 0%, #2f6fed 100%);
    box-shadow: 0 14px 24px rgba(47, 111, 237, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.profile-panel .button.primary.full:hover {
    background: linear-gradient(180deg, #5a9aff 0%, #2d68df 100%);
    box-shadow: 0 16px 28px rgba(47, 111, 237, 0.26);
    transform: translateY(-1px);
}

.profile-level-panel {
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(244, 248, 255, 0.76));
}

.profile-level-header {
    margin-bottom: 18px;
}

.profile-level-header .eyebrow {
    margin-bottom: 6px;
    color: #175cd3;
    font-size: 13px;
    letter-spacing: 0.14em;
}

.profile-level-header h2 {
    margin: 0;
    font-size: 28px;
}

.profile-level-list {
    display: grid;
    gap: 14px;
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
}

.profile-level-item {
    position: relative;
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 14px;
    padding: 16px 16px 16px 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.profile-level-item::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 0;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #54b8f5 0%, #2f98e7 100%);
    opacity: 0.86;
}

.profile-level-item img {
    width: 60px;
    height: 60px;
}

.profile-level-item h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.profile-level-item p {
    margin: 6px 0 0;
    color: #475467;
    line-height: 1.65;
    font-size: 14px;
}

.profile-level-item .muted {
    color: #175cd3;
    font-size: 13px;
    font-weight: 700;
}

.profile-level-item:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 112, 255, 0.24);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.dashboard-card {
    width: 100%;
}

.sheet-grid-page {
    min-height: 100%;
    display: grid;
    grid-template-rows: 46px 1fr;
}

.sheet-grid-header {
    display: grid;
    grid-template-columns: 70px repeat(13, minmax(90px, 1fr));
    height: 46px;
    border-bottom: 1px solid #d8dee9;
    background: #f8fafc;
}

.sheet-grid-header span,
.sheet-grid-rows span {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-size: 15px;
    font-weight: 700;
    border-right: 1px solid #d8dee9;
}

.sheet-grid-header span:first-child {
    background: #f1f5f9;
}

.sheet-grid-body {
    display: grid;
    grid-template-columns: 70px 1fr;
    min-height: 0;
}

.sheet-grid-rows {
    display: grid;
    grid-auto-rows: 40px;
    border-right: 1px solid #d8dee9;
    background: #f8fafc;
}

.sheet-grid-rows span {
    border-right: 0;
    border-bottom: 1px solid #d8dee9;
    font-weight: 600;
}

.sheet-grid-canvas {
    position: relative;
    min-width: 0;
    min-height: 0;
    background:
        linear-gradient(#ffffff, #ffffff),
        repeating-linear-gradient(0deg, transparent 0 39px, #d8dee9 39px 40px),
        repeating-linear-gradient(90deg, transparent 0 119px, #d8dee9 119px 120px);
    background-blend-mode: normal;
}

.sheet-selected-cell {
    position: absolute;
    left: 0;
    top: 0;
    width: 120px;
    height: 40px;
    border: 2px solid #3b82f6;
    background: rgba(59, 130, 246, 0.18);
}

.sheet-focus-note {
    position: absolute;
    color: #ef4444;
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
    user-select: none;
    pointer-events: none;
}

.sheet-focus-note.top-note {
    left: 220px;
    top: 70px;
}

.sheet-focus-note.admin-note {
    left: 270px;
    top: 150px;
}

.sheet-focus-note::before {
    content: "";
    position: absolute;
    left: -180px;
    top: 18px;
    width: 160px;
    height: 4px;
    background: #ef4444;
    transform: rotate(-0.5deg);
}

.excel-workspace {
    display: grid;
    grid-template-rows: auto 1fr;
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.excel-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.excel-tool,
.excel-color-tool,
.excel-toggle-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(148, 163, 184, 0.42);
    border-radius: 8px;
    color: #111827;
    background: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 700;
}

.excel-tool,
.excel-toggle-tool {
    cursor: pointer;
    min-width: 76px;
}

.excel-tool:hover,
.excel-toggle-tool:hover {
    border-color: rgba(47, 111, 237, 0.36);
    color: #175cd3;
}

.excel-color-tool,
.excel-toggle-tool {
    gap: 10px;
}


.excel-toggle-tool input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #2f6fed;
    cursor: pointer;
}

.excel-color-tool select {
    min-width: 54px;
    width: 54px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 6px;
    color: #111827;
    background: #ffffff;
    font: inherit;
    cursor: pointer;
}

.excel-color-tool input {
    width: 28px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}

.excel-status {
    margin-left: auto;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.excel-scroll {
    position: relative;
    height: 100%;
    min-height: 0;
    overflow: auto;
    background: #ffffff;
}

.cell-user-popover {
    position: fixed;
    z-index: 40;
    display: grid;
    grid-template-columns: 108px minmax(150px, 1fr);
    align-items: center;
    gap: 22px;
    width: min(360px, calc(100vw - 24px));
    min-height: 156px;
    padding: 22px 24px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.96));
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.68) inset;
    backdrop-filter: blur(12px);
}

.cell-user-popover[hidden] {
    display: none;
}

.cell-user-popover::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 28px;
    width: 14px;
    height: 14px;
    border-left: 1px solid rgba(148, 163, 184, 0.28);
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.98);
    transform: rotate(45deg);
}

.cell-user-popover::after {
    content: "单元格编辑人";
    position: absolute;
    left: 24px;
    top: -13px;
    padding: 4px 10px;
    border: 1px solid rgba(47, 111, 237, 0.12);
    border-radius: 999px;
    color: #175cd3;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(47, 111, 237, 0.08);
    font-size: 12px;
    font-weight: 900;
}

.cell-user-popover img {
    width: 108px;
    height: 108px;
    border: 4px solid #ffffff;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(180deg, #eef4ff, #ffffff);
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.88), 0 12px 24px rgba(47, 111, 237, 0.12);
}

.cell-user-details {
    display: grid;
    gap: 26px;
    min-width: 0;
}

.cell-user-details > div {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.cell-user-label {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.cell-user-details strong {
    min-width: 0;
    color: #111827;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cell-user-details > div:first-child strong {
    font-size: 20px;
}

.cell-user-details > div:last-child strong {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(47, 111, 237, 0.12);
    border-radius: 999px;
    color: #175cd3;
    background: rgba(47, 111, 237, 0.08);
    font-size: 14px;
}

.cell-user-popover {
    display: inline-grid;
    grid-template-columns: 58px minmax(110px, max-content);
    align-items: center;
    gap: 12px;
    width: auto;
    min-height: 0;
    max-width: min(320px, calc(100vw - 24px));
    padding: 8px 12px 8px 8px;
    border: 1px solid rgba(47, 111, 237, 0.16);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(235, 244, 255, 0.96));
    box-shadow: 0 14px 28px rgba(47, 111, 237, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
}

.cell-user-popover[hidden] {
    display: none !important;
}

.cell-user-popover::before,
.cell-user-popover::after {
    display: none;
}

.cell-user-popover img {
    width: 58px;
    height: 58px;
    border: 3px solid #ffffff;
    background: linear-gradient(180deg, #eef4ff, #ffffff);
    box-shadow: 0 0 0 2px rgba(47, 111, 237, 0.16), 0 10px 18px rgba(47, 111, 237, 0.12);
}

.cell-user-details {
    display: grid;
    align-items: center;
    min-width: 0;
}

.cell-user-line {
    display: grid;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.cell-user-details strong {
    display: inline-block;
    max-width: 180px;
    color: #111827;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.2;
    text-shadow: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cell-user-details span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    min-height: 22px;
    padding: 0 10px;
    border: 1px solid rgba(47, 111, 237, 0.14);
    border-radius: 999px;
    color: #175cd3;
    background: rgba(47, 111, 237, 0.08);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 0 0 auto;
}

.excel-grid {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    min-width: max-content;
    table-layout: fixed;
    background: #ffffff;
}

.excel-grid th,
.excel-grid td {
    width: var(--cell-width, 92px);
    min-width: var(--cell-width, 92px);
    max-width: var(--cell-width, 92px);
    height: var(--cell-height, 34px);
    min-height: var(--cell-height, 34px);
    border-right: 1px solid #d8dee9;
    border-bottom: 1px solid #d8dee9;
    color: #111827;
    font-size: 14px;
    line-height: 1.35;
}

.excel-grid th {
    position: sticky;
    z-index: 2;
    top: 0;
    color: #475569;
    background: #f1f5f9;
    text-align: center;
    font-weight: 800;
    user-select: none;
}

.excel-grid tbody th {
    left: 0;
    top: auto;
    z-index: 1;
    width: 56px;
    min-width: 56px;
}

.excel-grid thead th:first-child {
    left: 0;
    z-index: 3;
    width: 56px;
    min-width: 56px;
}

.excel-grid td {
    position: relative;
    z-index: 0;
    padding: 6px 8px;
    vertical-align: top;
    background: #ffffff;
    outline: none;
    max-height: var(--cell-height, 34px);
    overflow: hidden;
    white-space: pre-wrap;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.excel-grid.is-wrap-text td {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.excel-grid td.is-editing {
    white-space: pre-wrap !important;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.excel-cell-editor {
    position: absolute;
    z-index: 30;
    box-sizing: border-box;
    margin: 0;
    padding: 6px 8px;
    border: 2px solid #2563eb;
    border-radius: 0;
    outline: none;
    background: #ffffff;
    color: #111827;
    font: inherit;
    font-size: 14px;
    line-height: 1.35;
    resize: none;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.excel-cell-measure {
    position: fixed;
    left: -10000px;
    top: 0;
    z-index: -1;
    box-sizing: border-box;
    min-height: 34px;
    padding: 6px 8px;
    font-size: 14px;
    line-height: 1.35;
    white-space: pre-wrap;
    visibility: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.excel-resize-handle {
    position: absolute;
    z-index: 4;
    display: block;
    opacity: 0;
    transition: opacity 0.12s ease;
}

.excel-grid th:hover .excel-resize-handle,
.excel-resize-handle:hover {
    opacity: 1;
}

.excel-resize-handle-col {
    top: 0;
    right: -3px;
    width: 7px;
    height: 100%;
    cursor: col-resize;
}

.excel-resize-handle-row {
    right: 0;
    bottom: -3px;
    width: 100%;
    height: 7px;
    cursor: row-resize;
}

.excel-resize-handle::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: #2f6fed;
}

.excel-resize-handle-col::after {
    top: 7px;
    bottom: 7px;
    left: 3px;
    width: 2px;
}

.excel-resize-handle-row::after {
    left: 8px;
    right: 8px;
    top: 3px;
    height: 2px;
}

.is-resizing-excel,
.is-resizing-excel * {
    user-select: none !important;
}

.excel-grid td:focus {
    z-index: 3;
    box-shadow: inset 0 0 0 2px #2f6fed;
}

.excel-grid td:hover {
    z-index: 2;
    background-image: linear-gradient(rgba(47, 111, 237, 0.08), rgba(47, 111, 237, 0.08));
}

.excel-grid td.is-selected {
    z-index: 2;
    box-shadow: inset 0 0 0 2px #2f6fed;
    background-image: linear-gradient(rgba(47, 111, 237, 0.1), rgba(47, 111, 237, 0.1));
}

.excel-grid td.is-remote-editing {
    z-index: 4;
    overflow: visible;
    box-shadow: inset 0 0 0 2px var(--presence-color, #059669);
}

.excel-grid td.is-remote-editing::after {
    content: attr(data-presence-label);
    position: absolute;
    right: 4px;
    top: -24px;
    z-index: 8;
    max-width: 160px;
    padding: 3px 7px;
    border-radius: 6px;
    color: #ffffff;
    background: var(--presence-color, #059669);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.18);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}


.excel-grid td.is-merged {
    box-shadow: inset 0 0 0 1px rgba(47, 111, 237, 0.24);
}

.cell-lock-tooltip {
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    padding: 7px 10px 7px 7px;
    border: 1px solid rgba(47, 111, 237, 0.16);
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(235, 244, 255, 0.96));
    box-shadow: 0 12px 24px rgba(47, 111, 237, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.82);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) translateX(-4px);
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.cell-lock-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.cell-lock-tooltip::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 50%;
    width: 14px;
    height: 14px;
    border-left: 1px solid rgba(47, 111, 237, 0.16);
    border-bottom: 1px solid rgba(47, 111, 237, 0.16);
    background: rgba(255, 255, 255, 0.98);
    transform: translateY(-50%) rotate(45deg);
}

.cell-lock-avatar {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    object-fit: cover;
    object-position: center center;
    background: linear-gradient(180deg, #eef4ff, #ffffff);
    box-shadow: 0 0 0 2px rgba(47, 111, 237, 0.16), 0 8px 16px rgba(47, 111, 237, 0.12);
}

.cell-lock-text {
    position: relative;
    z-index: 1;
    display: grid;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.cell-lock-text strong {
    color: #111827;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
    text-shadow: none;
}

.cell-lock-text span {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    width: fit-content;
    padding: 0 9px;
    border: 1px solid rgba(47, 111, 237, 0.14);
    border-radius: 999px;
    color: #175cd3;
    background: rgba(47, 111, 237, 0.08);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.excel-grid td.is-locked-by-other {
    cursor: not-allowed;
    color: #334155;
    overflow: visible;
}

.excel-grid td.is-locked-by-other {
    background-color: rgba(255, 255, 255, 0.95);
    background-image:
        repeating-linear-gradient(
            135deg,
            rgba(148, 163, 184, 0.08) 0,
            rgba(148, 163, 184, 0.08) 1px,
            transparent 1px,
            transparent 8px
        );
}

.dashboard-home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
    gap: 18px;
    min-height: 0;
    height: 100%;
}

.author-message-board,
.author-ranking-board {
    display: grid;
    align-content: start;
    gap: 16px;
    min-height: 0;
    padding: 20px;
    overflow: auto;
}

.author-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.author-panel-head h1,
.author-panel-head h2 {
    margin: 0;
    color: #111827;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.2;
}

.author-panel-head span {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.author-message-form {
    display: grid;
    gap: 10px;
}

.author-message-form textarea {
    width: 100%;
    min-height: 116px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 8px;
    outline: none;
    color: #111827;
    background: #ffffff;
    font: inherit;
    resize: vertical;
}

.author-message-form textarea:focus {
    border-color: #2f6fed;
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

.author-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.author-form-actions span,
.author-form-error {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.author-form-error {
    color: #dc2626;
    font-weight: 800;
}

.author-form-actions button,
.author-like-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: #2f6fed;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.author-like-button {
    min-height: 30px;
    padding: 0 10px;
    background: #0f766e;
}

.author-like-button:disabled {
    cursor: default;
    opacity: 0.62;
}

.author-message-list,
.author-ranking-list {
    display: grid;
    gap: 12px;
}

.author-message-item,
.author-ranking-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
}

.author-ranking-item {
    grid-template-columns: 30px 40px minmax(0, 1fr);
}

.author-message-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef2f7;
}

.author-message-main,
.author-ranking-main {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.author-message-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.author-message-meta strong,
.author-ranking-main strong {
    color: #111827;
    font-size: 14px;
    font-weight: 900;
}

.author-message-meta span {
    color: #94a3b8;
    font-size: 12px;
    white-space: nowrap;
}

.author-message-main p,
.author-ranking-main p {
    margin: 0;
    color: #334155;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.author-ranking-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: #1d4ed8;
    background: rgba(47, 111, 237, 0.1);
    font-size: 14px;
    font-weight: 900;
}

.author-empty-state {
    padding: 22px;
    border: 1px dashed rgba(148, 163, 184, 0.42);
    border-radius: 8px;
    color: #64748b;
    text-align: center;
}

@media (max-width: 980px) {
    .dashboard-home-grid {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
}


@media (max-width: 820px) {
    .app-body {
        grid-template-columns: 1fr;
    }

    .app-content {
        padding: 18px;
    }

    .app-sidebar {
        border-right: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .profile-layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .profile-panel,
    .profile-level-panel {
        padding: 18px;
    }

    .profile-heading {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .profile-name-input {
        font-size: 24px;
    }

    .profile-meta-row {
        gap: 6px;
    }

    .side-nav a {
        min-height: 48px;
        font-size: 15px;
    }

    .app-brand span,
    .user-chip span {
        display: none;
    }

    .sheet-grid-header {
        grid-template-columns: 56px repeat(13, minmax(72px, 1fr));
    }

    .sheet-grid-body {
        grid-template-columns: 56px 1fr;
    }

    .sheet-grid-rows {
        grid-auto-rows: 34px;
    }

    .sheet-selected-cell {
        width: 90px;
        height: 34px;
    }

    .sheet-focus-note {
        font-size: 28px;
    }
}

.home-card {
    display: flex;
    flex-direction: column;
}

.home-lead {
    margin: 0;
    color: #344054;
    text-align: center;
    font-size: 20px;
    line-height: 1.7;
}

.home-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

.home-tags span {
    padding: 8px 12px;
    border: 1px solid rgba(69, 167, 237, 0.2);
    border-radius: 999px;
    color: #126fcb;
    background: rgba(255, 255, 255, 0.58);
    font-size: 14px;
    font-weight: 700;
}

.home-actions {
    display: grid;
    width: 100%;
    gap: 12px;
    margin-top: 34px;
}

.home-icp {
    display: inline-flex;
    align-self: center;
    margin-top: auto;
    padding-top: 32px;
    color: #667085;
    font-size: 13px;
    line-height: 1.5;
}

.home-icp:hover {
    color: #126fcb;
}

@media (max-width: 620px) {
    .home-lead {
        font-size: 17px;
    }

    .home-tags {
        margin-top: 22px;
    }

    .home-tags span {
        font-size: 13px;
    }

    .home-icp {
        padding-top: 24px;
        font-size: 12px;
    }
}
