body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 30px auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.header-logo {
    height: 80px; /* Adjust as needed */
    margin-right: 20px;
}

h1 {
    color: #000080;
    text-align: center;
    margin: 0; /* Remove default h1 margin */
}

p {
    text-align: center;
    margin-bottom: 20px;
    color: #555;
}

form {
    margin-top: 20px;
}

fieldset {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 25px;
    background-color: #fdfdfd;
}

legend {
    font-size: 1.2em;
    color: #000080;
    font-weight: bold;
    padding: 0 10px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #444;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea,
.form-group input[type="datetime-local"],
.form-group input[type="password"] { /* ここを追加 */
    width: calc(100% - 22px);
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus,
.form-group input[type="datetime-local"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.25);
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.radio-group label {
    display: inline-block;
    margin-right: 15px;
    font-weight: normal;
}

.radio-group input[type="radio"] {
    margin-right: 5px;
}

.privacy-policy {
    display: flex;
    align-items: center;
    margin-top: 30px;
    margin-bottom: 25px;
}

.privacy-policy input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.privacy-policy label {
    margin-bottom: 0;
    font-weight: normal;
}

.privacy-policy a {
    color: #007bff;
    text-decoration: none;
    margin-left: 10px;
}

.privacy-policy a:hover {
    text-decoration: underline;
}

button[type="submit"] {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background-color: #000080;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #000060;
}

.form-text {
    display: block;
    margin-top: 8px;
    font-size: 0.9em;
    color: #555;
}

/* --- Custom Datetime Picker Icon --- */
.datetime-picker-wrapper {
    position: relative;
}

.datetime-picker-wrapper input[type="datetime-local"] {
    padding-right: 40px; /* アイコンスペースの確保 */
}

.datetime-picker-icon {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
}

/* Webkit (Chrome, Safari, Edge) のデフォルトアイコンを非表示に */
.datetime-picker-wrapper input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
}

.required {
    color: #dc3545;
    margin-left: 5px;
}

.confirmation-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.confirmation-table th,
.confirmation-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.confirmation-table th {
    background-color: #f2f2f2;
    width: 35%;
}

.buttons-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: stretch;
}

.buttons-container .submit-form {
    flex: 1; /* Submit button area will be same size as back button */
    display: flex;
    margin-top: 0; /* Override global form margin */
}

.buttons-container button {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    color: white;
}

.buttons-container button.back-button {
    background-color: #6c757d;
    flex: 1; /* Back button takes 1 part of the space */
}

.buttons-container button.back-button:hover {
    background-color: #5a6268;
}

/* Submit button fills its form container */
.buttons-container button[type="submit"] {
    width: 100%;
    background-color: #000080;
}

.buttons-container button[type="submit"]:hover {
    background-color: #000060;
}

.success-message {
    text-align: center;
    padding: 40px 20px;
    background-color: #e9f7ef;
    border: 1px solid #d4edda;
    border-radius: 8px;
    color: #155724;
    font-size: 1.1em;
    line-height: 1.8;
}

.success-message h2 {
    color: #28a745;
    margin-bottom: 20px;
}

.success-message p {
    margin-bottom: 15px;
    color: #155724;
}

.success-message a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.success-message a:hover {
    text-decoration: underline;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th,
.admin-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    font-size: 0.9em;
}

.admin-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.admin-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.admin-table tr:hover {
    background-color: #f1f1f1;
}

.admin-table .action-buttons a {
    display: inline-block;
    padding: 5px 10px;
    margin-right: 5px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85em;
}

.admin-table .action-buttons .delete-button {
    background-color: #dc3545;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    box-sizing: border-box;
    line-height: normal;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
}

.admin-table .action-buttons .delete-button:hover {
    background-color: #c82333;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.admin-header h1 {
    margin: 0;
    text-align: left;
}

.admin-header .total-inquiries {
    font-size: 1.1em;
    font-weight: bold;
    color: #0056b3;
}

/* --- Admin Table Layout --- */
.admin-table {
    word-wrap: break-word;
}

.wide-container {
    max-width: 95%;
    margin: 30px auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-header .header-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-header .header-links a {
    text-decoration: none;
    padding: 8px 12px;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.admin-header .header-links a:hover {
    background-color: #0056b3;
}

.logout-button, .logout-button:visited {
    background-color: #6c757d;
    color: white !important;
}

.logout-button:hover {
    background-color: #5a6268;
    color: white !important;
}

.update-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    text-decoration: none;
    display: inline-block;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
}

.update-button:hover {
    background-color: #218838;
}

.action-buttons {
    display: flex;
    gap: 5px;
    align-items: flex-start;
}

/* --- Assignee Form Layout --- */
.assignee-form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    align-items: start;
}

.assignee-form input[type="text"],
.assignee-form input[type="password"] { /* ここを追加 */
    flex-grow: 0;
    width: 300px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

.assignee-form button {
    width: auto; 
    flex-shrink: 0;
    padding: 10px 20px;
    font-size: 1em;
}

/* --- Assignee Table Layout --- */
.assignee-table td {
    padding-top: 4px;
    padding-bottom: 4px;
}

.assignee-table form {
    margin: 0;
}

.assignee-table .delete-button,
.assignee-table .update-button {
    width: auto;
    padding: 4px 10px;
    font-size: 0.85em;
    display: inline-block;
    margin: 2px;
}

.form-note {
    margin-top: 10px;
    color: #555;
    font-size: 0.9em;
}

/* --- Toast Notification Styles --- */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    z-index: 1000;
    font-weight: bold;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-notification.error {
    background-color: #dc3545;
}

/* --- Search Form Styles --- */
.search-form {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.search-datetime-row {
    grid-template-columns: repeat(auto-fit, minmax(160px, max-content));
    justify-content: flex-start;
}

.search-datetime-row .search-field input[type="date"] {
    width: 180px;
    max-width: 100%;
}

.search-field {
    display: flex;
    flex-direction: column;
}

.search-field label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #495057;
    font-size: 0.9em;
}

.search-field input,
.search-field select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.95em;
    background-color: white;
}

.search-field input:focus,
.search-field select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.search-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 15px;
}

.search-button,
.reset-button {
    padding: 8px 16px !important;
    border: none;
    border-radius: 4px;
    font-size: 0.9em !important;
    cursor: pointer;
    font-weight: normal;
    transition: background-color 0.2s;
    width: auto !important;
    display: inline-block !important;
}

.search-button {
    background-color: #007bff;
    color: white;
}

.search-button:hover {
    background-color: #0056b3;
}

.reset-button {
    background-color: #6c757d;
    color: white;
}

.reset-button:hover {
    background-color: #5a6268;
}

/* --- Alert Styles --- */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: bold;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --- Form Section Styles --- */
.form-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #dee2e6;
}

.form-section h2 {
    margin-top: 0;
    color: #000080;
    font-size: 1.3em;
}

.status-form .form-group {
    margin-bottom: 15px;
}

.status-form input[type="number"] {
    width: 150px;
}

.table-section {
    margin-top: 30px;
}

.table-section h2 {
    color: #000080;
    margin-bottom: 15px;
}
