/* --- 変数定義（お嬢様のカラーパレット） --- */
:root {
    --primary-color: #2ecc71;
    --danger-color: #ff4757;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #2f3542;
    --text-sub: #747d8c;
    --header-bg: #b6bBbC;
    --border-color: #eee;
}

/* --- 全体の基調 --- */
body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', sans-serif;
    margin: 0;
    line-height: 1.6;
}

.app {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 20px 20px 20px;
}

/* --- ヘッダー（品格ある装い） --- */
header {
    background-color: var(--header-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);

    padding-top: 25px;
    padding-bottom: 25px;
    margin-bottom: 30px;
    margin-top: 0;
}

header h1 {
    font-size: 1.5rem;
    margin: 0;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.nav-link {
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 20px;
    transition: 0.3s;
}

/* アカウントメニューの装い */
.account-nav {
    position: relative;
}

/* ドロップダウン全体を相対位置に */
.dropdown {
    position: relative;
    display: inline-block;
}

/* 中身を最初は隠し、ボタンの真下に配置しますわ */
.dropdown-content {
    display: none; /* ← これで最初は隠れますの！ */
    position: absolute;
    right: 0;      /* 右端に合わせますわ */
    top: 100%;    /* ボタンのすぐ下に */
    background-color: #ffffff;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    border-radius: 8px;
    z-index: 1000;
    margin-top: 5px;
    border: 1px solid #eee;
    overflow: hidden; /* 角丸を綺麗に見せるためですわ */
}

/* メニュー内の各項目 */
.menu-item {
    color: #2f3542;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.menu-item:hover {
    background-color: #f1f3f5;
}

/* メールアドレス表示用 */
.menu-item-info {
    padding: 12px 16px;
    font-size: 0.8rem;
    color: #747d8c;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.logout-link {
    color: #ff4757 !important;
    border-top: 1px solid #eee;
}

/* --- ヒーローセクション（未ログイン時） --- */
.hero-section {
    background: linear-gradient(135deg, #ffffff 0%, #f1f2f6 100%);
    padding: 50px 20px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    text-align: center;
}

.hero-section h2 {
    color: var(--text-main);
    font-size: 1.6rem;
    font-weight: 800;
}

.hero-section ul {
    text-align: left;
    display: inline-block;
    margin-bottom: 30px;
    color: var(--text-main);
    padding-left: 20px;
}

/* --- カードデザイン（回線一覧の宝石箱） --- */
.card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: relative;
    border: 1px solid rgba(0,0,0,0.02);
}

.name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.days {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.days span {
    font-size: 1rem;
    margin-left: 4px;
}

/* プログレスバー */
.progress-container {
    width: 100%;
    height: 4px;
    background: #eee;
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    transition: width 0.5s ease-out;
}

/* --- フォーム・ボタン（使い心地を追求いたしましたわ） --- */
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
textarea {
    background: #ffffff;
    border: 1px solid #ccc;
    padding: 12px;
    border-radius: 12px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

textarea {
    min-height: 80px;
    resize: vertical;
    line-height: 1.5;
}

/* フォームグループ */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-sub);
}

/* --- ボタンの共通基盤 --- */
.btn-base {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    border: none;
    transition: transform 0.2s, opacity 0.2s, background-color 0.2s;
    font-size: 1rem;
    box-sizing: border-box;
    width: 100%; /* 基本は横幅いっぱい */
    text-decoration: none;
}

.btn-base:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-base:active {
    transform: translateY(0);
}

/* 無効状態 */
.btn-base:disabled {
    background-color: #f1f2f6;
    color: #a4b0be;
    border-color: #dfe4ea;
    cursor: not-allowed;
    opacity: 0.6;
}

/* --- 色のバリエーション --- */

/* メイン（緑） */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

/* 削除・警告（赤） */
.btn-danger {
    background-color: transparent; /* 背景を透明に */
    color: var(--danger-color);
    font-size: 0.8rem; /* 削除は少し控えめに */
}

.btn-danger:hover {
    background-color: rgba(255, 71, 87, 0.05); /* ほんのり赤く */
}

/* ログインなどのサブ要素 */
.btn-outline {
    background-color: #e2e6ea;
    color: var(--text-main);
    border: 1px solid #ced4da;
}

.btn-outline:hover {
    background-color: #dae0e5;
    border-color: #adb5bd;
}

/* 移動ボタン用 */
.btn-move {
    display: flex;
    gap: 10px; /* お隣との適度な距離感ですわ */
    margin-top: 10px;
}

/* svgを適用したボタン */
.btn-svg {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    outline: none;
    box-shadow: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, transform 0.1s;
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
}

.btn-svg:hover {
    opacity: 0.6;
}

.btn-svg:active {
    transform: scale(0.9);
}

.btn-svg svg {
    width: 32px;
    height: 32px;
    fill: var(--text-sub);
    display: block;
}

/* --- メニュー（開閉する秘密の小部屋） --- */
.menu-content {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.sub-text {
    font-size: 0.75rem;
    color: var(--text-sub);
    margin-bottom: 5px;
    margin-top: 10px;
}

/* --- 共通レイアウト --- */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}