/* ==========================================
   全体の基本設定(スマートフォン優先の設計)
   iPhone15の画面幅(約390px)を基準に調整しています
   ========================================== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
    background-color: #f4f5f7;
    color: #222;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background-color: #ffffff;
}

.app-main {
    padding: 16px;
}

/* ---------------- ヘッダー(ログイン後の全画面共通) ---------------- */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background-color: #2c3e50;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-header-title {
    font-size: 16px;
    font-weight: bold;
}

/* ---------------- カード・見出し ---------------- */
.card {
    padding: 8px 0;
}

.card-title {
    font-size: 20px;
    margin-bottom: 16px;
}

/* ---------------- フォーム ---------------- */
.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    /* iOSでズームが起きないよう16px以上を確保 */
    border: 1px solid #ccc;
    border-radius: 6px;
}

.field-error {
    display: block;
    color: #d9363e;
    font-size: 12px;
    margin-top: 4px;
}

/* ---------------- ボタン ---------------- */
.btn {
    display: inline-block;
    text-align: center;
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.btn-primary {
    background-color: #2c7be5;
    color: #fff;
}

.btn-secondary {
    background-color: #e9ecef;
    color: #333;
}

.btn-small {
    padding: 6px 10px;
    font-size: 13px;
    background-color: #2c7be5;
    color: #fff;
}

/* ---------------- メッセージ ---------------- */
.message {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}

.message-success {
    background-color: #e6f7ec;
    color: #1a7f3c;
}

.message-error {
    background-color: #fdecea;
    color: #d9363e;
}

/* ---------------- スケジュール一覧テーブル ---------------- */
.list-toolbar {
    margin-bottom: 12px;
}

.table-wrap {
    overflow-x: auto;
    margin-bottom: 16px;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.schedule-table th,
.schedule-table td {
    padding: 10px 6px;
    border-bottom: 1px solid #eee;
    text-align: left;
    white-space: nowrap;
}

.sort-link {
    color: inherit;
    text-decoration: none;
    font-weight: bold;
}

.empty-row {
    text-align: center;
    color: #888;
    padding: 24px 0;
}

/* ---------------- ハンバーガーメニュー ---------------- */
.hamburger {
    position: relative;
}

.hamburger-checkbox {
    display: none;
}

.hamburger-icon {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    background-color: #fff;
    border-radius: 1px;
}

.hamburger-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 28px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    min-width: 140px;
    overflow: hidden;
    z-index: 20;
}

.hamburger-checkbox:checked~.hamburger-menu {
    display: block;
}

.hamburger-menu-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.hamburger-menu-item:hover {
    background-color: #f4f5f7;
}

/* ---------------- 確認モーダル ---------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-box {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    width: 80%;
    max-width: 320px;
    text-align: center;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.modal-buttons .btn {
    flex: 1;
}