/* できたすく スタイルシート */

/* 色の変数 */
:root {
    --color-primary: #FF6B35;
    --color-secondary: #4ECDC4;
    --color-accent: #FFE66D;
    --color-bg: #FFF9F0;
    --color-nav-bg: #FFE5D9;
    --color-text: #333333;
    --color-admin: #4A90D9;
}


/* 全体 */
* {
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    margin: 0;
    padding: 16px;
    background-color: var(--color-bg);
    color: var(--color-text);
}
/* フォーム */
.form-inline {
    display: inline;
}


/* リンク */
a {
    color: var(--color-primary);
}

/* 子ども選択ボタン */
.child-btn {
    display: block;
    width: 100%;
    padding: 20px;
    margin: 12px 0;
    background-color: var(--color-primary);
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-radius: 999px;
}

/* ナビゲーション */
nav {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px;
    background-color: var(--color-nav-bg);
    border-radius: 999px;
}

nav a {
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    color: var(--color-primary);
}

nav a:hover {
    background-color: var(--color-primary);
    color: white;
}

/* ポイント表示 */
.points {
    font-size: 20px;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 16px;
}

/* タスクカード */
.task-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    margin-bottom: 12px;
    background-color: white;
    border-radius: 16px;
    border: 2px solid var(--color-accent);
}

.task-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--color-text);
}

.task-points {
    font-size: 14px;
    color: var(--color-primary);
    font-weight: bold;
}

/* できた！ボタン */
.btn-done {
    padding: 12px 24px;
    background-color: var(--color-primary);
    color: white;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 999px;
    cursor: pointer;
}

/* 体調スコア選択 */
.score-group {
    margin-bottom: 16px;
}

.score-label {
    font-size: 18px;
    font-weight: bold;
    color: var(--color-text);
    display: block;
    margin-bottom: 8px;
}


/* 日記テキストエリア */
.diary-textarea {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 2px solid var(--color-accent);
    border-radius: 12px;
    background-color: white;
    color: var(--color-text);
    resize: vertical;
}

/* 送信ボタン */
.btn-submit {
    display: block;
    width: 100%;
    padding: 16px;
    background-color: var(--color-secondary);
    color: white;
    font-size: 20px;
    font-weight: bold;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    margin-top: 16px;
}
/* 日記一覧 */
.diary-month {
    font-size: 20px;
    font-weight: bold;
    color: var(--color-primary);
    margin-top: 24px;
    margin-bottom: 12px;
}

.diary-card {
    background-color: white;
    border-radius: 16px;
    border: 2px solid var(--color-accent);
    padding: 16px 20px;
    margin-bottom: 12px;
}

.diary-date {
    font-size: 14px;
    color: var(--color-text);
    margin-bottom: 8px;
}

.diary-score {
    font-size: 14px;
    color: var(--color-primary);
    font-weight: bold;
    margin-bottom: 8px;
}

.diary-content {
    font-size: 16px;
    color: var(--color-text);
    margin-bottom: 8px;
}

.diary-reply {
    font-size: 14px;
    color: var(--color-secondary);
    font-weight: bold;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--color-accent);
}

/* 管理画面共通 */
.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding: 8px;
    background-color: #E8F0FE;
    border-radius: 8px;
}

.admin-nav a {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    color: var(--color-admin);
    font-weight: bold;
}

.admin-nav a:hover {
    background-color: var(--color-admin);
    color: white;
}

/* 管理画面カード */
.admin-card {
    background-color: white;
    border-radius: 8px;
    border: 1px solid #E0E0E0;
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap; /* ← 追加 */
    align-items: center;
    justify-content: space-between;
    gap: 8px; /* ← 追加 */
}
/* 管理画面ボタン */
.btn-admin {
    padding: 8px 16px;
    background-color: var(--color-admin);
    color: white;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.btn-delete {
    padding: 8px 16px;
    background-color: #E53935;
    color: white;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* 管理画面フォーム */
.admin-form {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    align-items: center;
}

.admin-input {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    flex: 1;
}

/* ログインフォーム */
.login-form {
    max-width: 400px;
    margin: 40px auto;
    background-color: white;
    border-radius: 12px;
    border: 1px solid #E0E0E0;
    padding: 32px;
}

.login-input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    margin-bottom: 16px;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background-color: var(--color-admin);
    color: white;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* 日記管理カード */
.admin-diary-card {
    display: block;
}

.diary-score-admin {
    color: var(--color-admin);
}

.diary-replied {
    color: #888;
}

.reply-textarea {
    width: 100%;
    margin-bottom: 8px;
}

/* 達成ログカード */
.admin-log-card {
    display: block;
}

.log-detail {
    color: #888;
}

/* 完了済みタスク */
.task-done {
    background-color: #F0FFF4;
    border-color: #4ECDC4;
}

.task-done .task-title {
    color: #888;
    text-decoration: line-through;
}

.task-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    background: #4ECDC4;
    color: white;
    margin-left: 6px;
}

.btn-done-completed {
    background-color: #4ECDC4;
    cursor: default;
}

/* 顔アイコン選択 */
.face-select {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.face-btn {
    font-size: 32px;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.face-btn.selected {
    opacity: 1;
}

/* すでに書いたよメッセージ */
.diary-already {
    font-size: 18px;
    font-weight: bold;
    color: #4ECDC4;
    text-align: center;
    padding: 20px;
}

/* セクション見出し */
.m-section {
    font-size: 16px;
    font-weight: bold;
    color: #FF6B35;
    margin: 16px 0 8px;
    border-left: 3px solid #FF6B35;
    padding-left: 8px;
}
/* タスク未完了 */
.task-not-done {
    color: #ccc;
}

/* 日記未記入 */
.diary-not-written {
    color: #ccc;
}

/* タスクポイント（管理画面） */
.task-point-admin {
    color: #888;
    margin-left: 8px;
}

/* 返信済み */
.reply-done {
    color: #888;
}

/* 日記への返信表示 */
.diary-reply {
  margin-top: 15px;
  padding: 12px;
  background-color: #FFF9F0;
  border-left: 4px solid var(--primary-color);
  border-radius: 8px;
}

.reply-label {
  font-size: 0.9em;
  font-weight: bold;
  color: var(--primary-color);
  margin: 0 0 8px 0;
}

.reply-text {
  margin: 0;
  line-height: 1.6;
  color: #333;
}

/* ログイン・登録画面 */
.login-wrap {
    max-width: 400px;
    margin: 40px auto;
    background-color: white;
    border-radius: 16px;
    border: 2px solid var(--color-accent);
    padding: 32px;
}

.login-wrap h1 {
    font-size: 28px;
    font-weight: bold;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 8px;
}

.login-wrap h2 {
    font-size: 18px;
    font-weight: bold;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 24px;
}

.login-wrap label {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: var(--color-text);
    margin-bottom: 6px;
}

.login-wrap input {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 2px solid var(--color-accent);
    border-radius: 8px;
    margin-bottom: 16px;
    background-color: var(--color-bg);
}

.login-wrap button {
    display: block;
    width: 100%;
    padding: 14px;
    background-color: var(--color-primary);
    color: white;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    margin-top: 8px;
}

.login-wrap button:hover {
    opacity: 0.9;
}

.login-wrap p {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
}

.error-msg {
    color: #E53935;
    font-weight: bold;
    text-align: center;
    margin-bottom: 16px;
}

.success-msg {
    color: var(--color-secondary);
    font-weight: bold;
    text-align: center;
    margin-bottom: 16px;
}

/* 管理画面リンク */
.admin-link-container {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
}

.btn-admin-link {
    display: inline-block;
    padding: 12px 30px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-admin-link:hover {
    background: #45a049;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-admin-link .icon {
    font-size: 18px;
    margin-right: 5px;
}
/* 子ども未登録時 */
.no-children-msg {
    color: #888;
    font-size: 16px;
    margin-top: 16px;
    text-align: center;
}
.btn-register-child {
    display: block;
    width: fit-content;
    margin: 12px auto 0;
    padding: 8px 16px;
    background-color: #4A90D9;
    color: white !important;
    font-size: 14px;
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
}