/* ===== リセット ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: #f8fafc;
    color: #1e293b;
}

/* ===== ナビ ===== */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
    z-index: 100;
}

.nav-inner {
    max-width: 1100px;
    margin: auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== ロゴ ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo img {
    height: 28px;
}

.logo span {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #111;
}

/* ===== アバター ===== */
.avatar-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 10px;
    transition: 0.2s;
}

.avatar-btn:hover {
    background: #f1f5f9;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.placeholder {
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* ===== 名前 ===== */
.name {
    font-size: 14px;
    color: #64748b;
}

/* ===== ドロップダウン ===== */
.dropdown {
    position: relative;
}

.menu {
    position: absolute;
    right: 0;
    top: 100%; /* ←これ追加 */
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    overflow: hidden;
    min-width: 180px;
    border: 1px solid #e2e8f0; /* これもあると良い */
    z-index: 100;
}

.menu a,
.menu button {
    display: block;
    width: 100%;
    padding: 10px 14px;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #1e293b;
    text-decoration: none;
}

.menu a:hover,
.menu button:hover {
    background: #f8fafc;
}

.menu .danger {
    color: #ef4444;
}

/* ===== メイン ===== */
.main {
    max-width: 1100px;
    margin: auto;
    padding: 90px 20px 40px;
}

/* ===== フラッシュ ===== */
.flash {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.flash.success {
    background: #ecfdf5;
    color: #047857;
}

.flash.error {
    background: #fef2f2;
    color: #b91c1c;
}
/* ===== コンテナ ===== */
.container {
    max-width: 1100px;
    margin: auto;
    padding: 40px 20px;
}

/* ===== ヒーロー ===== */
.hero {
    margin-bottom: 60px;
}

.hero-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.hero-line span {
    width: 30px;
    height: 2px;
    background: #f97316;
}

.hero-line p {
    font-size: 12px;
    color: #94a3b8;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 10px;
}

.accent {
    background: linear-gradient(135deg, #ef4444, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text {
    color: #64748b;
    max-width: 400px;
}

/* ===== グリッド ===== */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

/* ===== カード ===== */
.app-card {
    background: white;
    border-radius: 16px;
    padding: 18px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e2e8f0;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* ===== 上部 ===== */
.card-top {
    display: flex;
    justify-content: space-between;
}

.icon {
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fee2e2;
    color: #ef4444;
}

/* ===== 本文 ===== */
.card-body h2 {
    font-size: 16px;
    margin-bottom: 4px;
}

.card-body p {
    font-size: 13px;
    color: #64748b;
}

/* ===== フッター ===== */
.card-footer {
    margin-top: auto;
    font-size: 13px;
    color: #f97316;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== 空状態 ===== */
.empty {
    text-align: center;
    padding: 80px 0;
    color: #64748b;
}

/* ===== フッター ===== */
.footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #94a3b8;
}

/* ===== 認証画面 ===== */
.auth-body {
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

/* コンテナ */
.auth-container {
    width: 100%;
    max-width: 380px;
    text-align: center;
}

/* ロゴ */
.auth-logo {
    width: 80px;
    margin-bottom: 10px;
}

.auth-header h1 {
    font-family: 'Syne', sans-serif;
    font-size: 22px;
    margin-bottom: 5px;
}

.auth-header p {
    font-size: 13px;
    color: #64748b;
}

/* カード */
.auth-card {
    background: white;
    padding: 28px;
    border-radius: 16px;
    margin-top: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

/* フォーム */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* 入力 */
.form-group {
    text-align: left;
}

.form-group label {
    font-size: 12px;
    color: #64748b;
}

.form-group input {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    outline: none;
}

.form-group input:focus {
    border-color: #f97316;
}

/* チェック */
.form-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}

/* ボタン */
.btn-primary {
    background: linear-gradient(135deg, #ef4444, #f97316);
    border: none;
    padding: 10px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
}

/* エラー */
.error {
    font-size: 12px;
    color: #ef4444;
}

/* フッター */
.auth-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    font-size: 12px;
}

.auth-footer a {
    color: #f97316;
    text-decoration: none;
}

/* コピー */
.auth-copy {
    margin-top: 20px;
    font-size: 11px;
    color: #94a3b8;
}

/* 説明文 */
.auth-description {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
    text-align: left;
    line-height: 1.5;
}

/* 成功メッセージ */
.auth-status {
    background: #ecfdf5;
    color: #047857;
    font-size: 13px;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 14px;
    text-align: left;
}

/* 説明文（既にあればOK） */
.auth-description {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
    line-height: 1.5;
    text-align: left;
}

/* フォーカス強化（重要） */
.form-group input:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

/* エラー入力（あると神） */
.form-group input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

/* ボタン少し強化 */
.btn-primary {
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ボタンエリア */
.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

/* リンクボタン（ログアウト） */
.btn-link {
    background: none;
    border: none;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    transition: 0.2s;
}

.btn-link:hover {
    color: #1e293b;
}