:root {

    --bg-main: #f6f8fb;
    --card-bg: #ffffff;

    --border-soft: #e4e9f0;

    --text-main: #1f2937;
    --text-sub: #6b7280;

    --primary-soft: #5a8dee;

    --success-soft: #7fb8a4;

    --danger-soft: #e7a3a0;

    --btn-neutral: #eef2f6;

}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
}



.header {
    margin-bottom: 24px;
}

.header h1 {
    margin: 0 0 8px 0;
    font-size: 32px;
}

.subtitle {
    margin: 0;
    color: #666;
    font-size: 15px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.app {
    width: 96%;
    max-width: 1780px;
    margin: 0 auto;
    padding: 28px 36px 48px;
    position: relative;
}

.main-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    position: relative;
}

.card {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    border: 1px solid #e7edf5;
    border-radius: 24px;
    padding: 30px 28px 26px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
    min-height: 210px;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 18px;

    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}



.card-link .card {
    height: 100%;
}

.card-link:hover .card {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
    border-color: #d6e2f0;
}

.card h2 {
    margin: 0;
    padding-left: 24px;
    font-size: 28px;
    line-height: 1.25;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.card p {
    margin: 0;
    padding-left: 24px;
    color: #5b6472;
    line-height: 1.75;
    font-size: 16px;
    max-width: 80%;
}



.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-link .card {
    height: 100%;
}

.card-link:hover .card {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
    border-color: #d6e2f0;
}



.option-btn,
.primary-btn,
.back-btn {
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
}

.card button:hover,
.option-btn:hover,
.primary-btn:hover,
.back-btn:hover {
    opacity: 0.92;
}

.page-topbar {
    margin-bottom: 16px;
}

.back-btn {
    background-color: #e8ebef;
    color: #222;
}

.config-layout {
    display: grid;
    grid-template-columns: 1.8fr 0.75fr;
    gap: 20px;
}

.config-panel,
.summary-panel {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.config-panel h2,
.summary-panel h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.config-block {
    margin-bottom: 24px;
}

.config-block h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
}

.option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.option-btn {
    background-color: #f1f3f5;
    color: #222;
}

.option-btn.selected {
    background-color: #222;
    color: white;
}

.primary-btn {
    background-color: #1f6feb;
    color: white;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-item span {
    color: #666;
}

.summary-item strong {
    color: #222;
}

.total-income strong {
    font-size: 20px;
    color: #1f6feb;
}

hr {
    border: none;
    border-top: 1px solid #eaeaea;
    margin: 18px 0;
}

@media (max-width: 768px) {
    .app {
        padding: 16px;
    }

    .header h1 {
        font-size: 26px;
    }

    .main-grid {
        grid-template-columns: 1fr;
    }

    .config-layout {
        grid-template-columns: 1fr;
    }

    .card,
    .config-panel,
    .summary-panel {
        min-height: auto;
    }
}

.board-layout {
    width: 100%;
}

.board-main {
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
}

.board-info-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
    border: 1px solid #edf2f7;
}

.board-info-card h2 {
    margin: 0 0 18px 0;
    font-size: 24px;
    color: #0f172a;
}

.input-label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
}

.amount-input {
    width: 100%;
    max-width: 320px;
    padding: 12px 14px;
    font-size: 16px;
    border: 1px solid #d8dee4;
    border-radius: 10px;
    outline: none;
}

.amount-input:focus {
    border-color: #1f6feb;
}

.input-tip {
    margin-top: 10px;
    color: #777;
    font-size: 13px;
}

.bingo-board {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    width: min(94vw, 1180px);
    margin: 0 auto;

}

.bingo-cell {
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: 18px;

    aspect-ratio: 1 / 1;

    padding: 12px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    box-shadow: 0 4px 10px rgba(20, 30, 50, 0.04);

    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;

    cursor: pointer;
}

.bingo-cell:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    border-color: #b9c7d6;
}


.bingo-cell-title {

    font-size: 15px;

    font-weight: 600;

    color: var(--text-main);

    line-height: 1.35;

    text-align: center;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;

    overflow: hidden;

}

.bingo-cell-progress {

    font-size: 13px;

    color: var(--text-sub);

    text-align: center;

    margin-top: 8px;

}

@media (max-width: 768px) {
    .board-info-card {
        overflow-x: auto;
    }

    .bingo-board {
        min-width: 600px;
    }
}

.guarantee-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

.guarantee-main {
    background-color: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
}

.guarantee-label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    color: #666;
}

.guarantee-value-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.guarantee-total-display {
    font-size: 24px;
    font-weight: 700;
    color: #1f6feb;
}

.unit-text {
    font-size: 16px;
    color: #555;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 18px 0 10px;
    font-size: 14px;
}

.progress-bar {
    width: 100%;
    height: 14px;
    background-color: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background-color: #1f6feb;
    border-radius: 999px;
    transition: width 0.2s ease;
}

.guarantee-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
    font-size: 14px;
    color: #555;
}

.bomb-section {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.bomb-card {
    background-color: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
}

.bomb-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.bomb-value {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.bomb-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.bomb-btn {
    border: none;
    background-color: #222;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
}

.bomb-input {
    width: 70px;
    padding: 8px 10px;
    border: 1px solid #d8dee4;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
}

.bomb-total {
    font-size: 13px;
    color: #555;
}

@media (max-width: 768px) {
    .guarantee-top {
        grid-template-columns: 1fr;
    }

    .guarantee-detail-row {
        flex-direction: column;
    }

    .bomb-section {
        grid-template-columns: 1fr;
    }
}

.guarantee-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.mini-btn {
    border: none;
    background-color: #e8ebef;
    color: #222;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
}

.history-panel {
    margin-top: 12px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
}

.hidden {
    display: none;
}

.history-title {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 6px 8px;
    background-color: #f8fafc;
    border-radius: 8px;
}

.history-empty {
    font-size: 13px;
    color: #888;
}

.calculator-panel {
    margin-top: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
}

.calculator-display {
    border: 1px solid #d8dee4;
    border-radius: 8px;
    padding: 10px;
    font-size: 20px;
    text-align: right;
    margin-bottom: 10px;
    background: #f8fafc;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.calc-btn {
    border: none;
    background: #f1f3f5;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

.calc-op {
    background: #e8ebef;
    font-weight: 600;
}

.calculator-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.bingo-cell {
    position: relative;
}

.bingo-cell.completed {

    background: #eef7f4;

    border-color: var(--success-soft);

    box-shadow: 0 6px 16px rgba(110, 170, 150, 0.12);

}

.bingo-cell-top {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    flex: 1;
}

.bingo-cell-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    opacity: 0.8;
}

.task-btn {

    border: 1px solid var(--border-soft);

    border-radius: 10px;

    padding: 6px 10px;

    font-size: 12px;

    background: var(--btn-neutral);

    color: var(--text-main);

    cursor: pointer;

}

.task-btn.primary {
    background: #3b82f6;
    color: #ffffff;
}

.task-btn.warn {

    background: #e8efff;

    color: #3c5fbf;

    border: 1px solid #d6e1ff;

}

.task-btn.danger {

    background: #f6e7e6;

    color: #9c4441;

    border: 1px solid #f0d0cf;

}

.app-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.app-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.app-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(90vw, 420px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    padding: 20px;
}

.app-modal-header h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
}

.app-modal-body {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
}

.app-modal-footer {
    display: flex;
    justify-content: flex-end;
}

.task-detail-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.task-detail-name {
    font-size: 14px;
    color: #222;
    flex: 1;
}

.task-detail-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-detail-progress {
    min-width: 42px;
    text-align: center;
    font-size: 13px;
    color: #555;
}

.board-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.board-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-info-popover {
    position: relative;
    z-index: 20;
}

.order-info-card {
    position: absolute;
    top: 8px;
    right: 0;
    width: min(360px, 90vw);
    background: #ffffff;
    border: 1px solid #dfe5ec;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    padding: 18px;
}

.order-info-card h3 {
    margin: 0 0 14px 0;
    font-size: 18px;
}

.line-status-box {
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #f4f7fb;
    border: 1px solid #e4e9f0;
    border-radius: 12px;
    font-size: 14px;
    color: #334155;
}

.order-finish-area {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

#finish-order-btn {
    padding: 12px 28px;
    font-size: 16px;
    border-radius: 12px;
}

.teammate-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.income-list {
    display: flex;
    flex-direction: column;
}

.income-item {
    padding: 14px 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.income-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.income-amount {
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
}

.income-year {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 18px;
    margin-bottom: 10px;
}

.income-month {
    font-size: 18px;
    font-weight: 600;
    color: #334155;
    margin-left: 18px;
    margin-top: 10px;
    margin-bottom: 8px;
}

.income-day {
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    margin-left: 36px;
    margin-top: 8px;
    margin-bottom: 6px;
}

.income-item {
    margin-left: 54px;
}

.expense-form {
    margin-bottom: 24px;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
}

.expense-form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.expense-form-row label {
    font-size: 14px;
    color: #334155;
}

.expense-select,
.expense-textarea {
    width: 100%;
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    background: #ffffff;
    box-sizing: border-box;
}

.expense-textarea {
    min-height: 90px;
    resize: vertical;
}

.expense-form-actions {
    display: flex;
    justify-content: flex-end;
}

.record-context-menu {
    position: fixed;
    z-index: 99999;
    min-width: 140px;
    background: #ffffff;
    border: 1px solid #dfe5ec;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    padding: 6px;
}

.record-context-item {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
}

.record-context-item:hover {
    background: #f4f7fb;
}

.record-context-item.danger {
    color: #9c4441;
}

.income-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.app-modal-extra {
    margin-bottom: 16px;
}

.modal-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #475569;
}

.record-edit-fields {
    flex-direction: column;
    gap: 12px;
}

.record-edit-fields:not(.hidden) {
    display: flex;
}

.record-edit-fields.hidden {
    display: none !important;
}

#record-edit-modal .app-modal-content {
    width: min(92vw, 520px);
}

#record-edit-modal .app-modal-body {
    max-height: 65vh;
    overflow-y: auto;
}

.stats-card {
    grid-column: 1 / -1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.stat-block {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px;
}

.stat-title {
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #131414 !important;
}

.net-value {
    color: #615029;
}

.stats-switch-row {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.stats-tab-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(1, 0, 17, 0.575);
    color: #fff;
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: 0.5s ease;
}

.stats-tab-btn.active {
    background: rgb(139, 16, 16);
    border-color: rgba(75, 35, 35, 0.24);
}

.stats-grid.single-mode {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.income-value {
    color: #3ddc84 !important;
}

.expense-value {
    color: #dc3d3d !important;
}

.net-value {
    color: #161817 !important;
}

.stats-mode-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.stats-mode-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(1, 0, 17, 0.575);
    color: #fff;
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: 0.5s ease;
}

.stats-mode-btn.active {
    background: rgb(139, 16, 16);
    border-color: rgba(255, 255, 255, 0.24);
}

.stats-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.stats-breakdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(234, 243, 241, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.925);
}

.stats-breakdown-name {
    background: rgb(250, 247, 247);
    font-size: 14px;
}

.stats-breakdown-value {
    font-weight: 700;
    color: #050505;
}

.stats-breakdown-empty {
    color: #317973;
    padding: 12px 0;
}

.stats-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.stats-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.stats-breakdown-name {
    color: #334155;
    font-size: 14px;
}

.stats-breakdown-value {
    color: #0f172a;
    font-weight: 700;
}

.stats-breakdown-empty {
    color: #888;
    font-size: 14px;
    padding: 8px 0;
}

.detail-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}


.task-board-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.bingo-cell {
    border: 1px solid #333;
    border-radius: 12px;
    padding: 12px;
    min-height: 100px;
    cursor: pointer;
    user-select: none;
}

.bingo-cell.completed {
    border-color: #00b894;
}

.bingo-cell-top {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bingo-cell-title {
    font-weight: 700;
    line-height: 1.3;
}

.bingo-cell-progress {
    font-size: 14px;
    opacity: 0.8;
}

.bingo-cell-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.detail-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.detail-top-actions,
.detail-bottom-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    align-items: flex-end;
}

.task-board-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.bingo-cell {
    border: 1px solid #333;
    border-radius: 12px;
    padding: 12px;
    min-height: 100px;
    cursor: pointer;
    user-select: none;
}

.bingo-cell.completed {
    border-color: #00b894;
}

.bingo-cell-top {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bingo-cell-title {
    font-weight: 700;
    line-height: 1.3;
}

.bingo-cell-progress {
    font-size: 14px;
    opacity: 0.8;
}

.bingo-cell-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.app-modal-root:empty {
    display: none;
}

.app-modal-root {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 99999;
    box-sizing: border-box;
}

.custom-modal {
    width: min(720px, 92vw);
    max-height: 85vh;
    overflow: auto;
    background: #ffffff;
    color: #111111;
    border: 1px solid #d9d9d9;
    border-radius: 16px;
    padding: 20px;
    box-sizing: border-box;
    margin: 0 auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.custom-modal .modal-input,
.custom-modal input.modal-input,
#app-modal-root .modal-input,
#app-modal-root input.modal-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #cfcfcf;
    background: #ffffff !important;
    color: #111111 !important;
    box-sizing: border-box;
    -webkit-text-fill-color: #111111;
    appearance: none;
}

.custom-modal .modal-input::placeholder,
#app-modal-root .modal-input::placeholder {
    color: #777777;
}

.custom-modal .modal-input:focus,
#app-modal-root .modal-input:focus {
    outline: none;
    border-color: #999999;
    background: #ffffff !important;
    color: #111111 !important;
}

.custom-modal h3 {
    margin-top: 0;
    margin-bottom: 16px;
}

.custom-modal button {
    color: inherit;
}

.custom-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
}

.modal-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #333;
    background: #1b1b1b;
    color: #fff;
}

.subtask-list {
    display: grid;
    gap: 12px;
}

.subtask-item {
    border: 1px solid #333;
    border-radius: 12px;
    padding: 12px;
}

.subtask-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.subtask-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}


.detail-info-anchor {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
    position: relative;
}

.ghost-btn {
    border: 1px solid #d9d9d9;
    background: #ffffff;
    color: #111111;
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
}

.order-info-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
    padding: 14px;
    display: none;
    z-index: 50;
}



.order-info-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f5;
    color: #111111;
}

.order-info-row:last-child {
    border-bottom: none;
}

.bingo-dashboard-card,
.board-panel-card {
    background: #ffffff;
    border: 1px solid #e8ebf0;
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    padding: 20px;
}

.bingo-dashboard-card {
    margin-bottom: 20px;
}

.guarantee-main-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.guarantee-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.guarantee-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.guarantee-block-right {
    align-items: flex-end;
}

.guarantee-label {
    font-size: 14px;
    color: #6b7280;
}

.guarantee-value-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.guarantee-input {
    width: 160px;
    border: none;
    outline: none;
    font-size: 30px;
    font-weight: 700;
    color: #111827;
    background: transparent;
    border-bottom: 2px solid #dbe2ea;
    padding: 4px 2px;
}

.guarantee-value {
    font-size: 30px;
    font-weight: 700;
    color: #111827;
}

.guarantee-unit {
    font-size: 18px;
    color: #6b7280;
}

.guarantee-progress-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guarantee-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #374151;
    font-size: 14px;
}

.guarantee-progress-bar {
    width: 100%;
    height: 14px;
    background: #edf2f7;
    border-radius: 999px;
    overflow: hidden;
}

.guarantee-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
    transition: width 0.2s ease;
}

.guarantee-tools {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bomb-card-row {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.bomb-stat-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bomb-stat-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bomb-name {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.bomb-bonus {
    font-size: 14px;
    color: #2563eb;
    font-weight: 600;
}

.bomb-stat-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bomb-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #d4dce6;
    background: #ffffff;
    cursor: pointer;
    font-size: 18px;
    color: #111827;
}

.bomb-count {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.board-panel-header {
    margin-bottom: 16px;
}

.board-panel-title {
    margin: 0;
    font-size: 22px;
    color: #111827;
}

.task-board-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.bingo-cell {
    border: 1px solid #e6eaf0;
    border-radius: 16px;
    padding: 14px;
    min-height: 110px;
    cursor: pointer;
    user-select: none;
    background: #fcfdff;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.bingo-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}

.bingo-cell.completed {
    border-color: #60a5fa;
    background: #eff6ff;
}

.bingo-cell-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bingo-cell-title {
    font-weight: 700;
    line-height: 1.45;
    color: #111827;
    font-size: 14px;
}

.bingo-cell-progress {
    font-size: 13px;
    color: #6b7280;
}

.bingo-cell-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.history-list {
    display: grid;
    gap: 10px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
    color: #111111;
}

.history-empty {
    color: #6b7280;
}

.calc-grid {
    display: grid;
    gap: 14px;
}

.calc-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #111111;
}

.calc-preview {
    margin-top: 16px;
    font-size: 18px;
    color: #111111;
}

@media (max-width: 900px) {
    .guarantee-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .guarantee-block-right {
        align-items: flex-start;
    }

    .bomb-card-row {
        grid-template-columns: 1fr;
    }

    .task-board-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


.guarantee-twin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}

.guarantee-side-card {
    background: #ffffff;
    border: 1px solid #e8ebf0;
    border-radius: 18px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.guarantee-side-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    justify-content: center;
}

.guarantee-side-card-left .guarantee-side-inner {
    align-items: center;
}

.guarantee-side-card-right .guarantee-side-inner {
    align-items: center;
}

.guarantee-value-wrap-large {
    max-width: 100%;
    justify-content: center;
}

.guarantee-input {
    width: min(260px, 86%);
    max-width: 100%;
    text-align: center;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.guarantee-tools-left {
    justify-content: center;
}

.calc-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.finish-hint {
    font-size: 14px;
    color: #6b7280;
}

.finish-hint.success {
    color: #059669;
    font-weight: 700;
}

.board-finish-row {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.board-finish-btn {
    min-width: 180px;
    min-height: 46px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 18px;
    box-sizing: border-box;
}

.history-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-time {
    font-size: 13px;
    color: #6b7280;
}

.task-btn {
    border: 1px solid #d9dee7;
    background: #ffffff;
    color: #111827;
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
}

.task-btn.warn {
    color: #b45309;
}

@media (max-width: 900px) {
    .guarantee-twin-grid {
        grid-template-columns: 1fr;
    }
}

.primary-btn,
.back-btn,
.ghost-btn,
.bomb-btn,
.task-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
}


.calc-apply-btn {
    min-width: 120px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.custom-modal-actions .back-btn,
.custom-modal-actions .primary-btn {
    min-width: 100px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}


.confirm-modal {
    max-width: 520px;
}

.confirm-message {
    color: #111111;
    line-height: 1.6;
    margin-bottom: 16px;
}

.confirm-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #374151;
    margin-bottom: 10px;
}

.confirm-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.calc-grid {
    display: grid;
    gap: 14px;
}

.calc-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #111111;
}

.calc-apply-btn {
    min-width: 120px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.primary-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.income-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 8px;
    color: #64748b;
    font-size: 14px;
}

.income-money-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 12px;
    margin-bottom: 8px;
}

.income-money-row .summary-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
}

.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 99999;
    box-sizing: border-box;
}

.confirm-modal {
    width: min(520px, 92vw);
    background: #ffffff;
    color: #111111;
    border: 1px solid #d9dee7;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.confirm-message {
    line-height: 1.6;
    color: #374151;
    margin-top: 8px;
    margin-bottom: 16px;
}

.confirm-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #374151;
    margin-bottom: 16px;
}

.confirm-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.save-status-text {
    font-size: 13px;
    margin-left: 8px;
    color: #475569;
    line-height: 1;
    display: inline-flex;
    align-items: flex-end;
    height: 42px;
    padding-bottom: 2px;
}

.save-status-text.unsaved,
.save-status-text.saved {
    color: #475569;
}

/* 保存按钮点击状态 */
.primary-btn.saving {
    opacity: 0.7;
    pointer-events: none;
}

/* 保存成功闪一下 */
.primary-btn.saved-flash {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.detail-topbar {
    margin-bottom: 0;
}

.detail-order-info {
    margin-top: 0;
}

.detail-info-anchor {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
    position: relative;
}

.order-info-popover {
    display: none;
}

.detail-info-anchor .ghost-btn:hover+.order-info-popover,
.detail-info-anchor .ghost-btn:focus+.order-info-popover,
.detail-info-anchor .order-info-popover:hover {
    display: block;
}

.detail-top-actions .primary-btn,
.detail-top-actions .back-btn,
.detail-info-anchor .ghost-btn {
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}




/* ===== 顶部合并成一个板块 ===== */

#detail-topbar {
    margin-bottom: 12px !important;
}

#detail-order-info {
    display: none !important;
}

.detail-toolbar-card {
    background: #ffffff;
    border: 1px solid #e8ebf0;
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.detail-top-actions {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 !important;
}

.detail-info-anchor {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    position: relative !important;
    margin: 0 !important;
}

.detail-top-actions .primary-btn,
.detail-top-actions .back-btn,
.detail-info-anchor .ghost-btn {
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

.save-status-text {
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 !important;
    margin-left: 6px !important;
    font-size: 13px !important;
    color: #475569 !important;
    line-height: 1 !important;
}

.save-status-text.unsaved,
.save-status-text.saved {
    color: #475569 !important;
}

/* 只允许按钮本身触发 */
.order-info-popover {
    display: none;
}

.detail-info-anchor .ghost-btn:hover+.order-info-popover,
.detail-info-anchor .ghost-btn:focus+.order-info-popover,
.detail-info-anchor .order-info-popover:hover {
    display: block;
}

#memo-fab {
    position: absolute;
    top: -14px;
    right: -14px;

    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;

    background: rgba(31, 111, 235, 0.82);
    color: #fff;

    font-size: 20px;
    font-weight: 600;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
    z-index: 30;

    transition: all 0.15s ease;
}

#memo-fab:hover {
    transform: translateY(-2px);
}

#memo-fab:active {
    transform: scale(0.96);
}

#saved-card {
    position: relative;
}

.stats-card {
    grid-column: 1 / -1;
    min-height: 260px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    border: 1px solid #e7edf5;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
    padding: 30px 28px 26px;
}

.stats-card h2 {
    margin: 0 0 18px 0;
    font-size: 28px;
    line-height: 1.25;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.stats-tab-btn,
.stats-mode-btn {
    border: 1px solid #d7e0ea;
    background: #ffffff;
    color: #334155;
    border-radius: 12px;
    padding: 9px 15px;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.stats-tab-btn:hover,
.stats-mode-btn:hover {
    background: #f8fbff;
    border-color: #bfd0e4;
    color: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.stats-tab-btn:active,
.stats-mode-btn:active {
    transform: scale(0.97);
}

.stats-tab-btn.active,
.stats-mode-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.card-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    line-height: 1.25;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.card-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eef4ff;
    font-size: 18px;
    flex-shrink: 0;
}

.card h2 {
    padding-left: 0;
}

.card p {
    padding-left: 0;
}

#saved-card-wrap {
    position: relative;
}

#memo-fab {
    position: absolute;
    top: -129px;
    right: -66px;
    width: 72px;
    height: 72px;
    border: none;
    border-radius: 50%;

    background: rgba(31, 111, 235, 0.82);
    color: #ffffff;

    font-size: 18px;
    font-weight: 700;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    z-index: 30;

    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#memo-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}

#memo-fab:active {
    transform: scale(0.96);
}

.memo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.memo-layout {
    display: block;
}

.memo-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.memo-item {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    border: 1px solid #e7edf5;
    border-radius: 18px;
    padding: 18px 18px 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.memo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.10);
    border-color: #d6e2f0;
}

.memo-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 10px;
}

.memo-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
    color: #0f172a;
}

.memo-time {
    flex-shrink: 0;
    font-size: 13px;
    color: #64748b;
}

.memo-preview {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #5b6472;
}

.memo-empty {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

.memo-textarea {
    min-height: 360px;
    resize: vertical;
    line-height: 1.7;
}

.three-way-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.three-way-actions .back-btn,
.three-way-actions .ghost-btn,
.three-way-actions .primary-btn {
    min-width: 110px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.three-way-actions .primary-btn {
    background: #3b82f6;
    color: #ffffff;
}

.record-year-divider {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 20px;
    margin-bottom: 10px;
}

.record-month-divider {
    font-size: 18px;
    font-weight: 600;
    color: #334155;
    margin-left: 18px;
    margin-top: 10px;
    margin-bottom: 8px;
}

.record-day-divider {
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    margin-left: 36px;
    margin-top: 8px;
    margin-bottom: 6px;
}

.income-item {
    margin-left: 54px;
}

.filter-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.filter-header-row h2 {
    margin: 0;
}

.income-calendar-modal {
    width: min(760px, 94vw);
}

.calendar-current-selection {
    margin-bottom: 16px;
    font-size: 15px;
    color: #374151;
}

.calendar-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.calendar-stage-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.calendar-body-placeholder {
    min-height: 220px;
    border: 1px dashed #cfd8e3;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    margin-bottom: 18px;
}


.calendar-body {
    min-height: 220px;
    margin-bottom: 18px;
}

.calendar-grid {
    display: grid;
    gap: 12px;
}

.year-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.month-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.day-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-cell {
    min-height: 48px;
    border: 1px solid #d7e0ea;
    background: #ffffff;
    color: #334155;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.calendar-cell:hover {
    background: #f8fbff;
    border-color: #bfd0e4;
    transform: translateY(-1px);
}

.calendar-cell.has-data {
    font-weight: 700;
    color: #0f172a;
}

.calendar-cell.selected {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.filter-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-status-text {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
}

.finish-section {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 12px !important;
    margin-top: 16px !important;
    width: 100% !important;
}

.finish-section .finish-hint {
    width: 100% !important;
    text-align: center !important;
    margin: 0 !important;
}

.finish-section .primary-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.bingo-dashboard-card .finish-section,
.task-card .finish-section {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

/* 登录圆按钮 */
#auth-fab {
    position: absolute;

    top: 10px;
    left: -122px;

    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;

    background: #ECEFF1;
    color: #0f0f0f;

    font-size: 18px;
    font-weight: 700;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);

    z-index: 50;
}

.home-header {
    position: relative;

    padding-left: 0px;
    /* 给按钮空间 */
    padding-top: 100px;
    /* 🔥 这一行就是你要的：上方空间 */
    padding-bottom: 10px;
}

.auth-menu {
    position: fixed;
    /* 🔥 改成 fixed（关键） */

    background: #fff;
    border-radius: 10px;
    padding: 10px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);

    display: flex;
    flex-direction: column;
    gap: 8px;

    z-index: 100;

    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: all 0.2s ease;
}

.auth-menu.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.auth-menu button {
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    background: #f3f4f6;
    border-radius: 6px;
}

.auth-menu-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-menu-user {
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    background: #eff6ff;
    border-radius: 6px;
    white-space: nowrap;
}

.auth-menu button:hover {
    background: #e5e7eb;
}





/* 弹窗背景 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.3);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 200;

    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
}

.modal.show {
    opacity: 1;
    pointer-events: auto;
}

/* 弹窗盒子 */
.modal-box {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    width: 260px;

    display: flex;
    flex-direction: column;
    gap: 10px;

    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.modal.show .modal-box {
    transform: translateY(0);
}

.modal-box input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.modal-box button {
    padding: 8px;
    border: none;
    background: #1f6feb;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}


.modal-box h3 {
    margin: 0 0 6px;
}

.modal-box input {
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
}

.modal-box input:focus {
    border-color: #1f6feb;
}

.modal-box button {
    padding: 10px;
    border: none;
    background: #1f6feb;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
}

.settings-current-id {
    padding: 10px;
    background: #eef4ff;
    border-radius: 8px;
    font-weight: 600;
    color: #1f2937;
}

.settings-avatar-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-avatar-preview {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #dbeafe;
    overflow: hidden;
    align-self: center;
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-avatar-preview img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
    user-select: none;
    pointer-events: none;
}

.settings-range-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    color: #374151;
}

#auth-fab.has-avatar {
    padding: 0;
    overflow: hidden;
    font-size: 0;
}

#auth-fab.has-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.settings-avatar-preview {
  cursor: pointer;
}

.avatar-viewer-box {
  background: #fff;
  padding: 24px;
  border-radius: 16px;
  min-width: 320px;
  min-height: 320px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;

  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.modal.show .avatar-viewer-box {
  transform: translateY(0);
}

.avatar-viewer-close {
  align-self: flex-end;
  border: none;
  background: #1f6feb;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.avatar-viewer-circle {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  background: #dbeafe;

  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-viewer-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#calendar-fab {
    position: absolute;
    top: -95px;
    right: -122px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    z-index: 10;
}

#calendar-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.34);
}