* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Meiryo', 'Yu Gothic', 'Hiragino Kaku Gothic Pro', sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
}

.screen {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
}

.screen.active {
    display: block;
}

.header {
    background: linear-gradient(to bottom, #b8d9eb 0%, #8cc4e0 100%);
    height: 100px;
    width: 100%;
    margin-bottom: 30px;
    position: relative;
}

/* ユーザー情報表示 */
.user-info {
    position: absolute;
    top: 10px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #333;
    font-size: 14px;
}

.btn-logout {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 15px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
}

.btn-logout:hover {
    background: #c0392b;
}

.btn-back-header {
    background: #3498db;
    color: white;
    border: none;
    padding: 6px 15px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
}

.btn-back-header:hover {
    background: #2980b9;
}

/* ログイン画面 */
.login-box {
    max-width: 500px;
    margin: 50px auto;
    padding: 40px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}

.error-message {
    color: #e74c3c;
    font-weight: bold;
    text-align: center;
    margin: 15px 0;
    min-height: 20px;
}

.login-info {
    margin-top: 20px;
    text-align: center;
    color: #666;
    font-size: 13px;
}

.login-info p {
    margin: 5px 0;
}

/* 管理者選択画面 */
.admin-select-box {
    max-width: 700px;
    margin: 50px auto;
    padding: 40px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-select-box h2 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 26px;
    color: #333;
}

.admin-select-box > p {
    text-align: center;
    margin-bottom: 40px;
    font-size: 16px;
    color: #666;
}

.admin-select-buttons {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.select-option {
    flex: 1;
    max-width: 300px;
}

.btn-large {
    width: 100%;
    padding: 30px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.btn-large:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.btn-admin-select {
    border-color: #5ba4cf;
}

.btn-admin-select:hover {
    background: #f0f8ff;
    border-color: #4a8cb8;
}

.btn-user-select {
    border-color: #27ae60;
}

.btn-user-select:hover {
    background: #f0fff4;
    border-color: #229954;
}

.btn-large .icon {
    font-size: 48px;
}

.btn-large .title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.btn-large .description {
    font-size: 14px;
    color: #666;
    text-align: center;
}



.container {
    background-color: white;
    padding: 40px 60px;
    min-height: 600px;
}

h1 {
    font-size: 28px;
    font-weight: normal;
    margin-bottom: 40px;
    text-align: center;
}

.section-title {
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
}

.form-row label {
    font-size: 16px;
}

.form-row input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    font-size: 16px;
}

.form-row input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.input-short {
    width: 80px;
}

.input-long {
    width: 200px;
}

.input-medium {
    width: 120px;
}

.separator {
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #5ba4cf 0%, #8cc4e0 100%);
    margin: 30px 0;
}

.button-box {
    position: relative;
    border: 2px solid #5ba4cf;
    padding: 25px;
    margin: 30px 0;
    border-radius: 8px;
}

.button-box .btn-next {
    width: 100%;
}

.btn-next {
    background: linear-gradient(to bottom, #7dc5ed 0%, #4da8db 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-next:hover {
    background: linear-gradient(to bottom, #6bb8e0 0%, #3d98cb 100%);
}

.btn-exit {
    background: linear-gradient(to bottom, #7dc5ed 0%, #4da8db 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-exit:hover {
    background: linear-gradient(to bottom, #6bb8e0 0%, #3d98cb 100%);
}

.btn-top {
    background: linear-gradient(to bottom, #7dc5ed 0%, #4da8db 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin: 0 20px;
}

.btn-ok {
    background: linear-gradient(to bottom, #7dc5ed 0%, #4da8db 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin: 0 20px;
}

.btn-back {
    background: linear-gradient(to bottom, #7dc5ed 0%, #4da8db 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-back:hover {
    background: linear-gradient(to bottom, #6bb8e0 0%, #3d98cb 100%);
}

.button-description {
    margin-top: 15px;
    font-size: 16px;
    text-align: center;
    line-height: 1.6;
}

.blue-text {
    color: #1e88d4;
}

/* ボタングリッド（候補2） */
.button-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.slot-button {
    min-width: 140px;
    flex: 0 0 auto;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
    text-align: center;
    line-height: 1.4;
    font-weight: normal;
}

.slot-button:hover {
    background: #e3f2fd;
    border-color: #3498db;
}

.slot-button.selected {
    background: #3498db;
    color: white;
    border-color: #2980b9;
    font-weight: bold;
}

.slot-button.full {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.slot-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.info-box {
    background-color: #fff9e6;
    border: 1px solid #f0e68c;
    padding: 20px;
    margin: 20px 0;
    line-height: 1.8;
}

.form-group {
    margin: 30px 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.form-group label {
    min-width: 150px;
    font-size: 16px;
}

/* 表示専用フィールド（予約済み画面用） */
.input-display {
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    min-width: 300px;
    font-size: 16px;
}

.form-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    font-size: 16px;
    width: 200px;
}

.form-group input:nth-of-type(2) {
    margin-left: 40px;
}

.form-group input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
    width: 300px;
}

.form-group input:not([readonly]):nth-of-type(2) {
    width: 300px;
}

.form-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    font-size: 16px;
    width: 300px;
}

.form-group select option:disabled {
    color: #999;
}

.button-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px 0;
    gap: 20px;
}

.button-row-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
    gap: 20px;
}

.button-row-centered span {
    font-size: 16px;
}

.message-box {
    text-align: center;
    padding: 30px;
    font-size: 18px;
}

.contact-info {
    text-align: center;
    margin: 30px 0;
    font-size: 16px;
}

.confirmation-box {
    margin: 30px 0;
}

.result-row {
    display: flex;
    margin: 20px 0;
    font-size: 18px;
}

.result-row label {
    min-width: 150px;
    font-weight: normal;
}

.button-group {
    margin-top: 40px;
}

.btn-admin {
    background: linear-gradient(to bottom, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    border: none;
    padding: 10px 30px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-admin:hover {
    background: linear-gradient(to bottom, #7f8c8d 0%, #6c7a7b 100%);
}

.admin-section {
    margin: 30px 0;
}

.admin-section h2 {
    font-size: 22px;
    margin-bottom: 20px;
    border-bottom: 2px solid #5ba4cf;
    padding-bottom: 10px;
}

.admin-section h3 {
    font-size: 18px;
    margin: 30px 0 15px 0;
}

.admin-controls {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.control-group {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-group label {
    min-width: 200px;
    font-weight: bold;
}

.btn-action {
    background: linear-gradient(to bottom, #27ae60 0%, #229954 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-action:hover {
    background: linear-gradient(to bottom, #229954 0%, #1e8449 100%);
}

.reservation-summary {
    margin-top: 30px;
    padding: 20px;
    background-color: #f0f8ff;
    border-radius: 8px;
}

#reservation-stats {
    line-height: 2;
    font-size: 14px;
}

/* Phase 3: 管理画面タブUI */
.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #ddd;
}

.admin-tab {
    background: #f5f5f5;
    color: #333;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s;
}

.admin-tab:hover {
    background: #e0e0e0;
}

.admin-tab.active {
    background: #5ba4cf;
    color: white;
    font-weight: bold;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

/* テーブルスタイル */
.table-container {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 20px 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table thead {
    background-color: #5ba4cf;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.admin-table th {
    font-weight: bold;
}

.admin-table tbody tr:hover {
    background-color: #f5f5f5;
}

.admin-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.admin-table tbody tr:nth-child(even):hover {
    background-color: #f5f5f5;
}

/* 検索ボックス */
.search-box {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.search-box input,
.search-box select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.search-box input[type="text"] {
    flex: 1;
}

.search-box select {
    min-width: 200px;
}

/* テーブル操作ボタン */
.btn-edit,
.btn-delete,
.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 3px;
}

.btn-edit {
    background: #3498db;
    color: white;
}

.btn-edit:hover {
    background: #2980b9;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background: #c0392b;
}

.btn-small {
    background: #95a5a6;
    color: white;
}

.btn-small:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: linear-gradient(to bottom, #e74c3c 0%, #c0392b 100%);
}

.btn-danger:hover {
    background: linear-gradient(to bottom, #c0392b 0%, #a93226 100%);
}

/* 空のテーブルメッセージ */
.empty-message {
    padding: 40px;
    text-align: center;
    color: #999;
    font-size: 16px;
}

/* 通知管理 */
.notification-templates {
    margin: 20px 0;
}

.template-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.template-header h4 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.template-type {
    background: #5ba4cf;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.template-body {
    margin: 15px 0;
}

.template-body p {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
}

.template-body strong {
    color: #333;
}

.template-preview {
    background: #f9f9f9;
    border-left: 4px solid #5ba4cf;
    padding: 15px;
    margin: 10px 0;
    font-size: 13px;
    line-height: 1.6;
    color: #555;
    white-space: pre-line;
}

.template-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 15px;
}

.notification-history {
    margin-top: 30px;
}

.notification-settings {
    margin-top: 30px;
}

.notification-settings .control-group {
    margin: 15px 0;
}

.notification-settings label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-settings input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.notification-settings input[type="email"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    width: 300px;
}

/* ========================================
   Screen 7: メール送信完了画面
   ======================================== */

.completion-box {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.completion-icon {
    font-size: 80px;
    color: #27ae60;
    font-weight: bold;
    margin-bottom: 20px;
}

.completion-box h2 {
    font-size: 24px;
    margin-bottom: 30px;
    color: #2c3e50;
}

.completion-message {
    margin-bottom: 30px;
}

.completion-message p {
    font-size: 16px;
    line-height: 1.8;
    margin: 10px 0;
}

.completion-message .note {
    color: #e67e22;
    font-weight: bold;
    font-size: 14px;
}

.reservation-summary {
    background: white;
    padding: 25px;
    border-radius: 6px;
    margin: 30px 0;
    text-align: left;
    border: 2px solid #3498db;
}

.summary-item {
    padding: 12px 0;
    border-bottom: 1px solid #ecf0f1;
    font-size: 15px;
    line-height: 1.6;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item strong {
    display: inline-block;
    width: 180px;
    color: #34495e;
}

.btn-resend {
    background: #e67e22;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 6px;
    margin-right: 15px;
    transition: all 0.3s ease;
}

.btn-resend:hover {
    background: #d35400;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.completion-note {
    margin-top: 30px;
    padding: 20px;
    background: #ecf0f1;
    border-radius: 6px;
}

.completion-note p {
    color: #7f8c8d;
    font-size: 13px;
    line-height: 1.6;
}

/* ========================================
   送信予約セクション
   ======================================== */

.notification-schedule {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

/* ========================================
   予約種別バッジ
   ======================================== */

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
}

.badge-mo {
    background: #4CAF50;
    color: white;
}

.badge-external {
    background: #2196F3;
    color: white;
}

/* 外部予約モーダル */
#external-reservation-modal .modal-content {
    max-width: 500px;
}

/* カスタム確認ダイアログ */
.custom-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.custom-dialog {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    padding: 30px;
}

.custom-dialog-content {
    margin-bottom: 30px;
}

.custom-dialog-content p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin: 0;
    text-align: center;
}

.custom-dialog-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-yes,
.btn-no {
    padding: 12px 40px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    min-width: 120px;
    transition: all 0.3s;
}

.btn-yes {
    background: linear-gradient(to bottom, #7dc5ed 0%, #4da8db 100%);
    color: white;
}

.btn-yes:hover {
    background: linear-gradient(to bottom, #6bb8e3 0%, #3b99ce 100%);
}

.btn-no {
    background: linear-gradient(to bottom, #e0e0e0 0%, #c0c0c0 100%);
    color: #333;
}

.btn-no:hover {
    background: linear-gradient(to bottom, #d0d0d0 0%, #b0b0b0 100%);
}

#external-reservation-modal .form-group {
    margin-bottom: 15px;
}

#external-reservation-modal label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

#external-reservation-modal input,
#external-reservation-modal select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.notification-schedule h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.schedule-form {
    background: white;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.scheduled-list h4 {
    margin-bottom: 15px;
    font-size: 16px;
    color: #34495e;
}

.status-scheduled {
    color: #3498db;
    font-weight: bold;
}

.status-sent {
    color: #27ae60;
    font-weight: bold;
}

.status-expired {
    color: #e74c3c;
    font-weight: bold;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

/* ========================================
   Phase 4: モーダルダイアログ
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 80%;
    max-width: 700px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #95a5a6;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 30px;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #34495e;
}

.modal-body .form-group input,
.modal-body .form-group textarea {
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.modal-body .form-group textarea {
    resize: vertical;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #ecf0f1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #7f8c8d;
}


