/* ====== シェルレイアウト ====== */

.app-root {
    min-height: 100vh;
    display: flex;
    background: radial-gradient(circle at top left, #fffdf8, var(--bg) 50%);
}

.app-shell {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.app-content {
    flex: 1;
    padding: 24px 32px;
}

/* ====== 左サイドナビ（現在は非表示だがスタイルは残しておく） ====== */

.side-nav {
    width: 72px;
    background: var(--sidebar);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    box-shadow: 2px 0 8px rgba(76, 41, 112, 0.12);
}

.side-nav__logo {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, #b38dff, #f9f5ff);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 24px;
    box-shadow: 0 10px 22px rgba(96, 55, 150, 0.35);
}

.side-nav__menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.side-nav__item {
    width: 48px;
    height: 48px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fdfbff;
    text-decoration: none;
    font-size: 11px;
    opacity: 0.8;
    transition: background 0.2s ease, opacity 0.2s ease, transform 0.1s ease;
}

.side-nav__item:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.side-nav__item--active {
    background: var(--accent);
    opacity: 1;
}

.side-nav__icon {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.side-nav__label {
    font-size: 10px;
}

/* ====== ヘッダー ====== */

.app-header {
    height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 12px rgba(134, 93, 186, 0.15);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.app-header__left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.app-header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-header__logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(134, 93, 186, 0.35);
}

.app-header__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}

.app-header__tabs {
    display: flex;
    gap: 8px;
}

.app-header__tab {
    position: relative;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: #8a5b3e;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.app-header__tab:hover {
    background: #fff1e5;
    border-color: #ffcc99;
    color: #7a4c33;
}

.app-header__tab--active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.app-header__tab--active:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.app-header__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-header__login-button {
    padding: 8px 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: #ffffff;
    border: none;
    font-size: 14px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.app-header__login-button:hover {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}

.app-header__user-menu {
    position: relative;
}

.app-header__user-button {
    padding: 8px 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: #ffffff;
    border: none;
    font-size: 14px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-header__user-button:hover {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.app-header__user-button::after {
    content: "▼";
    font-size: 10px;
    color: #ffffff;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.app-header__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease;
    display: flex;
    flex-direction: column;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-header__dropdown a,
.app-header__dropdown button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-main);
    transition: background 0.15s ease;
    text-decoration: none;
    font-family: inherit;
    box-sizing: border-box;
}

.app-header__dropdown a:first-child {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.app-header__dropdown a:hover,
.app-header__dropdown button:hover {
    background: #f5f5f5;
}

.app-header__dropdown button:last-child {
    color: #dc3545;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.app-header__dropdown button:last-child:hover {
    background: #fff5f5;
    color: #c82333;
}

.app-header__promo {
    min-width: 140px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--text-muted);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ====== フッター ====== */

.footer {
    padding: 18px 32px 22px;
    border-top: 1px solid var(--border-subtle);
    background: #fdfbff;
}

.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    padding: 2px 0;
}

.footer-links a:hover {
    color: var(--text-main);
}

/* ====== レスポンシブ ====== */

@media (max-width: 720px) {
    .app-root {
        flex-direction: column;
    }

    .side-nav {
        width: 100%;
        height: 56px;
        flex-direction: row;
        justify-content: space-between;
        padding-inline: 16px;
        box-shadow: 0 2px 10px rgba(96, 55, 150, 0.18);
    }

    .side-nav__logo {
        margin-bottom: 0;
    }

    .side-nav__menu {
        flex-direction: row;
    }

    .app-content {
        padding: 16px 5px 20px;
    }

    .app-header {
        padding-inline: 16px;
    }

    .footer {
        padding-inline: 18px;
    }
}
