body {
    background-color: #f5f6f8;
}

.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.stat-card .value {
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-card .label {
    color: #6c757d;
    font-size: 0.85rem;
}

/* ---- 左サイドバー ---- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background-color: #212529;
    min-height: 100vh;
    position: relative;
}

/* ---- メニューバーの表示/非表示 ---- */
.sidebar-hide-btn {
    position: absolute;
    top: .35rem;
    right: .4rem;
    z-index: 2;
    background: none;
    border: none;
    color: #8d949b;
    font-size: 1.1rem;
    line-height: 1;
    padding: .15rem .35rem;
    cursor: pointer;
}

.sidebar-hide-btn:hover { color: #fff; }

/* 隠しているときだけ出る、再表示用のボタン */
.sidebar-show-btn {
    display: none;
    position: fixed;
    top: .5rem;
    left: .5rem;
    z-index: 1050;
    background: #212529;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: .3rem .6rem;
    font-size: 1rem;
    cursor: pointer;
    opacity: .85;
}

.sidebar-show-btn:hover { opacity: 1; }

@media (min-width: 992px) {
    body.sidebar-collapsed .sidebar { display: none; }
    body.sidebar-collapsed .sidebar-show-btn { display: block; }
    /* 再表示ボタンと中身が重ならないよう、少しだけ余白を足す */
    body.sidebar-collapsed .main-content > .container,
    body.sidebar-collapsed .main-content > .container-fluid { padding-top: 2.6rem; }
}

/* 印刷には出さない */
@media print {
    .sidebar-hide-btn, .sidebar-show-btn { display: none !important; }
}

/* 画面が長い(日報の表やAIチャットなど)ときも、メニューが常に見えるように固定する */
@media (min-width: 992px) {
    .sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        min-height: 0;
        align-self: flex-start;
    }
}

.brand-g {
    color: #e74c3c;
    font-size: 1.15em;
}

.login-brand {
    font-weight: 800;
    letter-spacing: .03em;
    color: #212529;
}

.login-brand .brand-g {
    color: #e74c3c;
}

.sidebar-store {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ---- サービス切り替え(サイドバー最上部) ---- */
.service-switcher {
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.service-current {
    display: flex;
    align-items: center;
    gap: .6rem;
    width: 100%;
    background: none;
    border: none;
    border-left: 4px solid var(--service-color, #e74c3c);
    padding: .85rem 1rem;
    text-align: left;
    cursor: pointer;
}

.service-current:hover,
.service-switcher.is-open .service-current {
    background: rgba(255, 255, 255, .06);
}

.service-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--service-color, #e74c3c);
    color: #fff;
    font-weight: 800;
    font-size: .8rem;
    flex-shrink: 0;
}

.service-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.service-text strong {
    font-size: .95rem;
    color: #fff;
    letter-spacing: .02em;
}

.service-text small {
    font-size: .68rem;
    color: rgba(255, 255, 255, .55);
}

.service-wip {
    display: inline-block;
    background: #e8a33d;
    color: #40280a;
    font-size: .58rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0 .4rem;
    vertical-align: middle;
    margin-left: .15rem;
}

.service-caret {
    margin-left: auto;
    color: rgba(255, 255, 255, .6);
    font-size: .8rem;
    transition: transform .15s ease-in-out;
}

.service-switcher.is-open .service-caret {
    transform: rotate(180deg);
}

.service-menu {
    display: none;
    background: #16181c;
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: .35rem;
}

.service-switcher.is-open .service-menu {
    display: block;
}

.service-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .6rem;
    border-radius: 6px;
    text-decoration: none;
}

.service-item:hover {
    background: rgba(255, 255, 255, .08);
}

.service-item.is-active {
    background: rgba(255, 255, 255, .12);
}

.service-item .service-logo {
    width: 28px;
    height: 28px;
    font-size: .7rem;
}

.service-item-manager {
    --service-color: #e74c3c;
}

.service-item-pos {
    --service-color: #c9a227;
}

.service-item-ai {
    --service-color: #4f8ecc;
}

.service-item-shift {
    --service-color: #3fa66a;
}

/* ---- サービスごとのアクセントカラー ---- */
.sidebar-service-manager {
    --service-color: #e74c3c;
}

.sidebar-service-pos {
    --service-color: #c9a227;
}

.sidebar-service-ai {
    --service-color: #4f8ecc;
}

.sidebar-service-shift {
    --service-color: #3fa66a;
}

.sidebar-nav {
    padding: .5rem 0;
    overflow-y: auto;
    /* 画面が低いときに、項目が2列に折り返さず縦に並んだままスクロールするようにする */
    flex-wrap: nowrap;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75);
    padding: .6rem 1rem;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-nav .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--service-color, #0d6efd);
    font-weight: 700;
}

.sidebar-section-label {
    color: rgba(255, 255, 255, 0.45);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .05em;
    padding: 1rem 1rem .25rem;
}

.sidebar-user {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content {
    flex-grow: 1;
    min-width: 0;
}

.mobile-topbar {
    background-color: #212529;
    color: #fff;
    padding: .6rem 1rem;
    display: flex;
    align-items: center;
}

.sidebar-backdrop {
    display: none;
}

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1045;
        width: 260px;
        min-height: 0;
        transform: translateX(-100%);
        transition: transform .25s ease-in-out;
        overflow-y: auto;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1044;
    }

    .sidebar-backdrop.is-open {
        display: block;
    }
}

/* ---- 管理画面(社員/キャスト/経費項目/店舗)の共通スタイル ---- */
.mgmt-row-inactive {
    background-color: #eceff1 !important;
    color: #8a8f94;
}

.mgmt-row-inactive input {
    color: #8a8f94;
    background-color: #e4e7ea;
}

.status-badge {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 3px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.status-badge-active {
    background-color: #d4edda;
    color: #1e7e34;
}

.status-badge-inactive {
    background-color: #dfe1e3;
    color: #6c757d;
}

.autosave-status {
    display: inline-block;
    min-width: 3.5em;
    font-size: .78rem;
    color: #198754;
    opacity: 0;
    transition: opacity .2s ease-in-out;
}

.autosave-status.is-visible {
    opacity: 1;
}

/* ---- 印刷まわり ---- */
/* 印刷用の見出しは画面には出さない(print.css で表示に切り替わる) */
.print-header {
    display: none;
}

/* 画面に置く「印刷」ボタン */
.print-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: .5rem;
}
