/* ========================================
   全体
======================================== */

body {
    margin: 0;
    background-color: #f5f7fb;
    color: #111827;
    font-family: "Segoe UI", "Yu Gothic", "Meiryo", sans-serif;
}


/* ========================================
   ナビゲーション
======================================== */

.app-header {
    background-color: #111827;
}

.app-navbar {
    width: 100%;
}

.app-navbar-container {
    width: 760px;
    max-width: calc(100% - 24px);
    margin: 0 auto;
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.app-navbar-brand {
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
}

.app-navbar-menu {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.app-navbar-link {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 14px;
}

    .app-navbar-link:hover {
        color: #ffffff;
        text-decoration: underline;
    }

.app-navbar-user {
    color: #93c5fd;
    font-size: 13px;
}


/* ========================================
   メイン領域
======================================== */

.body-content {
    padding-top: 24px;
    padding-bottom: 24px;
}


/* ========================================
   フッター
======================================== */

.app-footer {
    width: 760px;
    max-width: calc(100% - 24px);
    margin: 0 auto;
    padding: 16px 0;
    color: #6b7280;
    font-size: 13px;
}


/* ========================================
   フォーム全体
======================================== */

.attendance-form-container {
    width: 760px;
    max-width: calc(100% - 24px);
    margin: 0 auto 24px auto;
    padding: 28px;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}


    /* ========================================
   見出し
======================================== */

    .attendance-form-container h3 {
        margin-top: 0;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 1px solid #e5e7eb;
        color: #111827;
        font-size: 22px;
    }


/* ========================================
   セクション見出し
======================================== */

.form-section-title {
    margin-top: 24px;
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 4px solid #2563eb;
    color: #1f2937;
    font-weight: bold;
    font-size: 16px;
}


/* ========================================
   入力項目
======================================== */

.form-item {
    margin-bottom: 14px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #374151;
}

input,
select {
    max-width: 280px;
}

.attendance-form-container input,
.attendance-form-container select,
.attendance-form-container textarea {
    border: 1px solid #767676;
    border-radius: 6px;
    padding: 8px 10px;
    box-sizing: border-box;
    background-color: #ffffff;
    color: #111827;
    box-shadow: inset 0 0 0 0.5px #767676;
}

    .attendance-form-container input:focus,
    .attendance-form-container select:focus,
    .attendance-form-container textarea:focus {
        border-color: #2563eb;
        outline: none;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
    }


/* ========================================
   textarea
======================================== */

textarea {
    max-width: none;
    width: 100%;
    min-width: 0;
    min-height: 120px;
    resize: both;
    box-sizing: border-box;
}

#previewTo,
#previewSubject {
    height: 44px;
    min-height: 44px;
    resize: vertical;
}

#previewBody {
    min-height: 250px;
}


/* ========================================
   時刻入力欄の表示崩れ対策
======================================== */

input[type="time"] {
    height: 34px;
    min-height: 34px;
    line-height: normal;
    padding: 4px 8px;
    font-size: 14px;
    box-sizing: border-box;
    vertical-align: middle;
    border: 1px solid #767676;
    background-color: #fff;
}


/* ========================================
   ボタン
======================================== */

.button-area {
    margin-top: 20px;
    margin-bottom: 20px;
}

button,
.button-link {
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    background-color: #2563eb;
    color: #ffffff;
}

    button:hover,
    .button-link:hover {
        background-color: #1d4ed8;
        color: #ffffff;
        text-decoration: none;
    }

#sendButton {
    background-color: #16a34a;
    color: #ffffff;
}

    #sendButton:hover {
        background-color: #15803d;
    }

button:disabled,
.disabled-button {
    opacity: 0.45;
    cursor: not-allowed;
}


/* ========================================
   メッセージ
======================================== */

.error-message {
    color: #dc2626;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 6px;
}

    .error-message,
    .error-message * {
        color: #dc2626;
    }

.success-message {
    color: #166534;
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 6px;
}


/* ========================================
   入力エラー項目の赤枠
======================================== */

input.input-validation-error-custom,
select.input-validation-error-custom,
textarea.input-validation-error-custom {
    border: 2px solid red !important;
    box-shadow: inset 0 0 0 1px red !important;
    outline: none !important;
    background-color: #fff5f5 !important;
}


/* ========================================
   区切り線
======================================== */

hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin-top: 24px;
    margin-bottom: 24px;
}


/* ========================================
   スマホ表示対応
======================================== */

@media screen and (max-width: 767px) {

    .body-content {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .app-navbar-container {
        width: 100%;
        max-width: 100%;
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .app-navbar-menu {
        gap: 10px;
    }

    .attendance-form-container {
        width: 100%;
        max-width: calc(100% - 16px);
        margin: 8px auto 16px auto;
        padding: 16px;
    }

        .attendance-form-container input,
        .attendance-form-container select,
        .attendance-form-container textarea {
            width: 100%;
            max-width: 100%;
            min-width: 0;
        }

    #previewTo,
    #previewSubject {
        height: 48px;
        min-height: 48px;
        resize: none;
    }

    #previewBody {
        min-height: 200px;
    }

    button,
    .button-link {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .app-footer {
        max-width: calc(100% - 16px);
    }
}
