* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

h1 {
    color: #333;
    margin-bottom: 20px;
    border-bottom: 3px solid #4CAF50;
    padding-bottom: 10px;
    font-size: 16px;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.controls button,
.controls select {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
}

.controls button:hover {
    background: #f0f0f0;
}

.controls button.primary {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.controls button.primary:hover {
    background: #45a049;
}

#calendar-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

th,
td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
    font-size: 13px;
}

th {
    background-color: #4CAF50;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.employee-name {
    background-color: #f9f9f9;
    font-weight: bold;
    position: sticky;
    left: 0;
    z-index: 5;
}

.schedule-cell {
    cursor: pointer;
    transition: background-color 0.2s;
    min-height: 40px;
    vertical-align: middle;
    padding: 4px;
    font-size: 11px;
    line-height: 1.3;
    word-break: break-all;
    max-width: 60px;
}

.schedule-cell:hover {
    background-color: #f0f0f0;
}

.schedule-cell.has-schedule {
    font-weight: 600;
}

.color-green {
    background-color: #a5d6a7;
    color: #1b5e20;
    font-weight: 600;
}

.color-blue {
    background-color: #90caf9;
    color: #0d47a1;
    font-weight: 600;
}

.color-red {
    background-color: #ef9a9a;
    color: #b71c1c;
    font-weight: 600;
}

.color-yellow {
    background-color: #fff59d;
    color: #f57f17;
    font-weight: 600;
}

.color-purple {
    background-color: #ce93d8;
    color: #4a148c;
    font-weight: 600;
}

.color-orange {
    background-color: #ffcc80;
    color: #e65100;
    font-weight: 600;
}

.color-gray {
    background-color: #bdbdbd;
    color: #212121;
    font-weight: 600;
}

/* 複数スケジュール表示用 */
.multiple-schedules {
    background: linear-gradient(135deg, #90caf9 0%, #a5d6a7 50%, #ffcc80 100%);
    color: #1b5e20;
    font-weight: 700;
    border: 2px solid #4CAF50;
}

.weekend {
    background-color: #ffebee;
}

th.weekend {
    background-color: #ef5350;
    color: white;
}

/* 日付ヘッダーのホバー効果 */
th.date-header:hover {
    background-color: #66BB6A !important;
    transform: scale(1.05);
    transition: all 0.2s;
}

th.date-header.weekend:hover {
    background-color: #e53935 !important;
}

.schedule-cell.selected {
    outline: 3px solid #2196F3;
    outline-offset: -3px;
    background-color: #e3f2fd !important;
}

.selection-mode-active {
    user-select: none;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

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

.schedule-type-container {
    position: relative;
}

.schedule-type-dropdown {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
}

.schedule-type-option {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.schedule-type-option:hover {
    background-color: #f5f5f5;
}

.schedule-type-option:last-child {
    border-bottom: none;
}

.schedule-type-option.new-type {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: bold;
}

.schedule-info {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.schedule-info p {
    margin: 8px 0;
    line-height: 1.6;
}

.schedule-info strong {
    color: #333;
    min-width: 100px;
    display: inline-block;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

/* チケット一覧・フィルタ */
.filters {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.filter-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 180px;
}

.filter-group label {
    display: none;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.filter-group select option:first-child {
    color: #999;
}

/* チケットリスト */
.ticket-list {
    background: white;
}

.ticket-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ticket-table th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #ddd;
    color: #555;
}

.ticket-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.ticket-table tr:hover {
    background: #f9f9f9;
}

.ticket-link {
    color: #2196F3;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.ticket-link:hover {
    text-decoration: underline;
}

/* チケットステータス */
.ticket-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

.status-open {
    background: #e3f2fd;
    color: #1976d2;
}

.status-in_progress {
    background: #fff3e0;
    color: #f57c00;
}

.status-completed {
    background: #e8f5e9;
    color: #388e3c;
}

.status-cancelled {
    background: #fce4ec;
    color: #c2185b;
}

/* チケット詳細 */
.ticket-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.ticket-meta-item {
    font-size: 13px;
}

.ticket-meta-label {
    font-weight: bold;
    color: #666;
}

.ticket-employees {
    margin-top: 10px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
}

.employee-badge {
    display: inline-block;
    background: #2196F3;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* フォームコンテナ */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-group label .required {
    color: #f44336;
    margin-left: 4px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

/* ボタン共通スタイル */
.btn {
    padding: 10px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    flex: 1;
    padding: 12px 24px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #45a049;
}

.btn-secondary {
    padding: 12px 24px;
    background: #999;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #888;
}

.btn-danger {
    padding: 12px 24px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #d32f2f;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
}

/* モーダルの統一（既存のスタイルを上書き） */
.modal.active {
    display: flex;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 20px 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #4CAF50;
}

.section-title:first-child {
    margin-top: 0;
}

/* ===================================
   領収書アップロードページ
   =================================== */

.upload-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
}

.drop-zone {
    border: 3px dashed #ccc;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
    position: relative;
}

.drop-zone h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 20px;
}

.drop-zone p {
    color: #666;
    margin: 10px 0;
    font-size: 16px;
}

.drop-zone .btn {
    margin: 10px 5px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.drop-zone .btn-primary {
    background: #4CAF50;
    color: white;
    border: 2px solid #4CAF50;
    box-shadow: 0 2px 5px rgba(76, 175, 80, 0.3);
}

.drop-zone .btn-primary:hover {
    background: #45a049;
    border-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
}

.drop-zone .btn-secondary {
    background: white;
    color: #2196F3;
    border: 2px solid #2196F3;
    box-shadow: 0 2px 5px rgba(33, 150, 243, 0.3);
}

.drop-zone .btn-secondary:hover {
    background: #2196F3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.4);
}

.drop-zone.dragover {
    border-color: #4CAF50;
    background: #e8f5e9;
}

.drop-zone:hover {
    border-color: #999;
}

.preview-container {
    margin: 20px 0;
    text-align: center;
}

.preview-image {
    max-width: 100%;
    max-height: 400px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

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

.ocr-result {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.ocr-result h3 {
    margin-top: 0;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-danger:hover {
    background: #da190b;
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading.active {
    display: block;
}

.camera-input {
    display: none;
}

.success-message {
    display: none;
    background: #4CAF50;
    color: white;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    margin: 20px 0;
}

.success-message.active {
    display: block;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

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

/* ===================================
   領収書一覧ページ
   =================================== */

.receipts-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.filters {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.receipts-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.receipts-table th {
    background: #4CAF50;
    color: white;
    font-weight: bold;
}

.receipts-table tr:hover {
    background: #f5f5f5;
}

.payment-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.payment-company_card {
    background: #2196F3;
    color: white;
}

.payment-personal_card {
    background: #FF9800;
    color: white;
}

.payment-company_cash {
    background: #4CAF50;
    color: white;
}

.payment-personal_cash {
    background: #9C27B0;
    color: white;
}

.sync-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.sync-completed {
    background: #4CAF50;
    color: white;
}

.sync-pending {
    background: #FF9800;
    color: white;
}

.sync-failed {
    background: #f44336;
    color: white;
}

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

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-view {
    background: #2196F3;
    color: white;
}

.btn-view:hover {
    background: #0b7dda;
}

.btn-edit {
    background: #FF9800;
    color: white;
}

.btn-edit:hover {
    background: #e68900;
}

.btn-delete {
    background: #f44336;
    color: white;
}

.btn-delete:hover {
    background: #da190b;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button:hover {
    background: #f5f5f5;
}

.pagination button.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* ===================================
   運転日誌スタイル
   =================================== */

.upload-step,
.form-step {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.upload-step h2,
.form-step h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 8px;
}

.drop-zone.drag-over {
    border-color: #4CAF50;
    background: #e8f5e9;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

input[type="file"] {
    display: none;
}

.image-preview {
    margin-top: 15px;
}

.image-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-section {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.info-section h2 {
    color: #1976d2;
    margin-bottom: 15px;
    font-size: 18px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.info-item {
    background: white;
    padding: 12px;
    border-radius: 4px;
    border-left: 4px solid #1976d2;
}

.info-item label {
    display: block;
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
    font-size: 14px;
}

.info-item span {
    color: #333;
    font-size: 16px;
}

.photo-preview-section {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.photo-preview-section h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.preview-item {
    background: white;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.preview-item img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
}

.preview-item p {
    margin: 5px 0;
    font-size: 14px;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.alert {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.alert-info {
    background: #e3f2fd;
    border-left: 4px solid #1976d2;
    color: #1565c0;
}

.back-btn {
    margin-bottom: 20px;
    padding: 10px 20px;
    background: #757575;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.back-btn:hover {
    background: #616161;
}

/* ===================================
   レスポンシブデザイン
   =================================== */

@media (max-width: 600px) {
    body {
        padding: 10px;
        overflow-x: hidden;
    }

    .container {
        padding: 15px;
        margin: 0;
        max-width: 100%;
        overflow-x: hidden;
    }

    .ticket-list {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .upload-container {
        padding: 10px;
    }

    .drop-zone {
        padding: 20px;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .receipts-table {
        font-size: 12px;
    }

    .receipts-table th,
    .receipts-table td {
        padding: 8px 4px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .preview-grid {
        grid-template-columns: 1fr;
    }

    /* チケット一覧のレスポンシブ対応 */
    .filters {
        padding: 10px;
    }

    .filter-row {
        flex-direction: column;
        gap: 10px;
    }

    .filter-group {
        flex: 1 !important;
        width: 100%;
    }

    .controls {
        flex-direction: column;
    }

    .controls button {
        width: 100%;
        margin-bottom: 5px;
    }

    /* テーブルをカード形式に変更 */
    .ticket-list {
        display: block;
    }

    .ticket-item {
        display: block;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 15px;
        background: white;
    }

    .ticket-item>* {
        display: block;
        margin-bottom: 10px;
    }

    /* ホームメニューのレスポンシブ */
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .menu-card {
        padding: 20px;
    }

    .menu-icon {
        font-size: 36px;
    }

    /* ヘッダーのレスポンシブ */
    .header-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .header h1 {
        font-size: 18px;
    }

    .user-info {
        flex-direction: column;
        gap: 10px;
    }

    /* ログインページのレスポンシブ */
    .login-box {
        padding: 20px;
        margin: 20px;
    }

    .login-box h1 {
        font-size: 20px;
    }

    /* テーブルをスマホ対応 */
    table {
        min-width: 0 !important;
    }

    .ticket-table {
        display: block;
        overflow-x: visible;
        width: 100%;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    .ticket-table thead {
        display: none;
    }

    .ticket-table tbody {
        display: block;
        width: 100%;
    }

    .ticket-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        background: white;
        padding: 12px;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .ticket-table td {
        display: block;
        text-align: left;
        padding: 8px 0;
        border: none;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        overflow: hidden;
    }

    .ticket-table td::before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        margin-bottom: 5px;
        color: #666;
        font-size: 12px;
    }

    /* チケット番号（最初のtd）は非表示 */
    .ticket-table td:first-child {
        display: none;
    }

    /* ボタンをスマホ対応 */
    .ticket-table td button {
        display: block;
        width: calc(100% - 10px) !important;
        max-width: 100% !important;
        margin: 0 0 8px 0 !important;
        padding: 10px 12px !important;
        box-sizing: border-box !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ticket-table td button:last-child {
        margin-bottom: 0 !important;
    }

    .status-badge {
        display: inline-block;
        margin-top: 5px;
    }

    /* カレンダーのスマホ対応 */
    .calendar-table {
        font-size: 11px;
    }

    .calendar-table th,
    .calendar-table td {
        padding: 5px 2px;
    }

    .day-number {
        font-size: 12px;
    }

    .schedule-item {
        font-size: 10px;
        padding: 2px 4px;
        margin: 2px 0;
    }

    .upload-label {
        padding: 20px;
    }

    .upload-icon {
        font-size: 36px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
}

/* ===================================
   運転日誌一覧スタイル
   =================================== */

.status-badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.status-complete {
    background: #4CAF50;
    color: white;
}

.status-incomplete {
    background: #FF9800;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.detail-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section h3 {
    color: #4CAF50;
    margin-bottom: 12px;
    font-size: 16px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.detail-item {
    padding: 8px 0;
}

.detail-item label {
    display: block;
    font-weight: bold;
    color: #666;
    font-size: 13px;
    margin-bottom: 4px;
}

.detail-item span {
    color: #333;
    font-size: 14px;
}

/* ログインページ */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 10px;
    border: none;
    font-size: 24px;
}

.login-box h2 {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 18px;
    font-weight: normal;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-block {
    width: 100%;
}

/* ホームメニュー */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    margin: -20px -20px 20px -20px;
    border-radius: 8px 8px 0 0;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: white;
    margin: 0;
    border: none;
    padding: 0;
    font-size: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    font-size: 14px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.home-menu h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.menu-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.menu-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-4px);
}

.menu-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.menu-card h3 {
    color: #333;
    margin-bottom: 12px;
    font-size: 20px;
}

.menu-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}
