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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: #f5f7fa;
    -webkit-tap-highlight-color: transparent;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* ログイン画面 */
#loginScreen {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.login-header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.login-header i {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.login-form {
    width: 100%;
    max-width: 400px;
}

.login-input {
    width: 100%;
    padding: 1.5rem;
    font-size: 2rem;
    text-align: center;
    border: none;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5rem;
}

.btn-login {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
}

.error-message {
    margin-top: 1rem;
    color: #ff6b6b;
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    background: white;
    padding: 1rem;
    border-radius: 10px;
    display: none;
}

.error-message.show {
    display: block;
}

/* メイン画面レイアウト */
#mainScreen {
    display: flex;
    min-height: 100vh;
}

/* サイドバー */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo i {
    font-size: 2rem;
}

.nav-menu {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left: 4px solid #3498db;
}

.nav-item i {
    font-size: 1.3rem;
    width: 24px;
}

.btn-logout-sidebar {
    margin: 1rem;
    padding: 1rem;
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.5);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-logout-sidebar:hover {
    background: rgba(231, 76, 60, 0.3);
}

/* メインコンテナ */
.main-container {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.header {
    background: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.8rem;
    color: #2c3e50;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.manager-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #555;
}

.manager-name i {
    font-size: 1.5rem;
    color: #3498db;
}

/* コンテンツ */
.content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 統計カード */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 2rem;
    color: white;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

/* セクションカード */
.dashboard-sections {
    display: grid;
    gap: 1.5rem;
}

.section-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.section-card h2 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.attendance-list {
    display: grid;
    gap: 1rem;
}

.attendance-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.attendance-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.attendance-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.attendance-status.working {
    background: #38ef7d;
}

.attendance-status.completed {
    background: #3498db;
}

/* ページアクション */
.page-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.btn-primary, .btn-secondary {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

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

.btn-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 65, 108, 0.4);
}

/* 月選択 */
.page-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.month-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.month-selector select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.btn-month {
    background: #667eea;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-month:hover {
    background: #764ba2;
}

/* テーブル */
.table-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.data-table tbody tr:hover {
    background: #f8f9ff;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    padding: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s;
    border-radius: 5px;
}

.btn-edit {
    color: #3498db;
}

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

.btn-delete {
    color: #e74c3c;
}

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

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

.badge-primary {
    background: #cce5ff;
    color: #004085;
}

/* シフトカレンダー */
.shift-calendar {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* シフト表形式 */
.shift-table-container {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
}

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

.shift-table th,
.shift-table td {
    border: 1px solid #ddd;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.shift-table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.shift-table tbody th {
    background: #f8f9fa;
    font-weight: 600;
    white-space: nowrap;
}

.shift-table td {
    cursor: pointer;
    transition: all 0.2s;
}

.shift-table td:hover {
    background: #f0f0f0;
}

.shift-cell {
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shift-cell.store-a {
    background: #e3f2fd;
    color: #1976d2;
    font-weight: 700;
}

.shift-cell.store-b {
    background: #ffebee;
    color: #d32f2f;
    font-weight: 700;
}

.shift-cell.holiday {
    background: #f5f5f5;
    color: #999;
}

.shift-cell.off {
    background: #fff3e0;
    color: #f57c00;
}

.shift-cell.paid-leave {
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 700;
}

/* 出勤人数集計行 */
.shift-table .count-row th {
    background: #e8eaf6 !important;
    color: #3f51b5;
    font-weight: 700;
}

.shift-table .count-row .count-cell {
    background: #f3e5f5;
    color: #7b1fa2;
    font-weight: 700;
    font-size: 1.1rem;
}

/* 利用者名のセル */
.shift-table .user-name-cell {
    white-space: nowrap;
}

.shift-table .user-detail {
    font-size: 0.8rem;
    color: #666;
    font-weight: normal;
}

/* Aグループのバッジ */
.shift-table .group-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

/* 出勤日数集計列 */
.shift-table .summary-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white;
    font-weight: 700;
    min-width: 50px;
}

.shift-table .summary-cell {
    background: #f8f9fa;
    cursor: default !important;
}

.shift-table .summary-cell:hover {
    background: #f8f9fa !important;
}

.shift-table .summary-a {
    background: #e3f2fd !important;
    color: #1976d2 !important;
    font-weight: 700;
    font-size: 1rem;
}

.shift-table .summary-b {
    background: #ffebee !important;
    color: #d32f2f !important;
    font-weight: 700;
    font-size: 1rem;
}

.shift-table .summary-total {
    background: #e8f5e9 !important;
    color: #2e7d32 !important;
    font-weight: 700;
    font-size: 1.1rem;
}

.shift-table .summary-total-label {
    background: #fff3e0 !important;
    color: #e65100 !important;
    font-weight: 700;
    font-size: 0.95rem;
}

/* Aグループ集計行 */
.shift-table .group-row th {
    background: #f3e5f5 !important;
    color: #7b1fa2;
    font-weight: 700;
    font-size: 0.85rem;
}

.shift-table .group-row th small {
    font-size: 0.75rem;
    font-weight: normal;
    color: #9c27b0;
}

.shift-table .group-cell-a {
    background: #ede7f6 !important;
    color: #5e35b1 !important;
    font-weight: 700;
    font-size: 0.95rem;
}

.shift-table .group-cell-b {
    background: #f3e5f5 !important;
    color: #8e24aa !important;
    font-weight: 700;
    font-size: 0.95rem;
}

.shift-table .summary-group-label {
    background: #fce4ec !important;
    color: #c2185b !important;
    font-weight: 700;
    font-size: 0.9rem;
}

.shift-table .transport-cell {
    background: #fff9c4 !important;
    color: #f57f17 !important;
    font-weight: 700;
    font-size: 0.95rem;
}

.shift-table .summary-transport-label {
    background: #fff3e0 !important;
    color: #e65100 !important;
    font-weight: 700;
    font-size: 0.9rem;
}

/* ダッシュボードシフト作成 */
.shift-create-container {
    display: grid;
    gap: 2rem;
}

.shift-creator {
    margin-top: 1rem;
}

.shift-creator-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.shift-month-select {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    max-width: 300px;
}

.shift-preview {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    min-height: 200px;
}

.shift-preview-empty {
    text-align: center;
    color: #999;
    padding: 3rem;
    font-size: 1.1rem;
}

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

.shift-summary-item {
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.shift-summary-item strong {
    display: block;
    font-size: 1.8rem;
    color: #667eea;
    margin-top: 0.5rem;
}

/* 印刷用要素（画面では非表示） */
.print-only {
    display: none;
}

/* 印刷用スタイル */
@media print {
    @page {
        size: A4 landscape;
        margin: 5mm;
    }
    
    body * {
        visibility: hidden;
    }
    
    .shift-table-container,
    .shift-table-container * {
        visibility: visible;
    }
    
    .shift-table-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%; /* 60% → 100%（画面いっぱい） */
        padding: 0;
        box-shadow: none;
        transform-origin: top left;
    }
    
    .shift-table {
        width: 100%;
        min-width: auto;
        font-size: 10px;
        page-break-inside: avoid;
        border-collapse: collapse;
        table-layout: fixed; /* auto → fixed（均等な列幅） */
    }
    
    .shift-table th,
    .shift-table td {
        padding: 2px 1px !important; /* 4px 2px → 2px 1px（余白を統一） */
        font-size: 8px;
        border: 1px solid #000; /* 0.5px → 1px（太いボーダー） */
        min-width: auto !important;
        width: auto !important;
        height: 28px !important; /* すべてのセルの高さを28pxに統一 */
        text-align: center;
        vertical-align: middle;
    }
    
    .shift-table thead th {
        background: #667eea !important;
        color: white !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        font-size: 9px; /* 8px → 9px */
        padding: 2px 1px !important; /* 余白を統一 */
        height: 28px !important; /* 32px → 28px（全セルの高さを統一） */
        font-weight: bold;
    }
    
    /* 火曜日（定休日）のヘッダーをグレーに */
    .shift-table thead th.tuesday-header {
        background: #bbb !important;
        color: white !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    
    .shift-table thead th:first-child {
        width: 55px; /* 60px → 55px（利用者名列） */
        min-width: 55px;
        max-width: 55px;
    }
    
    /* 日付列の幅を固定 */
    .shift-table thead th:not(:first-child):not(.middle-user-name) {
        width: 26px; /* 28px → 26px（少し狭く） */
        min-width: 26px;
        max-width: 26px;
    }
    
    .shift-table tbody td:not(.middle-user-name-cell):not(.middle-spacer) {
        width: 26px; /* 28px → 26px（日付セルを少し狭く） */
        min-width: 26px;
        max-width: 26px;
        text-align: center;
    }
    
    .shift-table thead th small {
        font-size: 7px; /* 6px → 7px */
        display: block;
        margin-top: 2px;
    }
    
    .shift-table tbody th {
        background: #f0f0f0 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        font-size: 9px; /* 10px → 9px */
        padding: 2px 1px !important; /* 3px 1px → 2px 1px（余白を統一） */
        text-align: center; /* left → center */
        min-width: 55px; /* 60px → 55px */
        max-width: 55px;
        width: 55px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        height: 28px !important; /* 高さを統一 */
        font-weight: normal;
    }
    
    /* 送迎ユーザーの利用者名セルを水色に */
    .shift-table tbody th.transport-user {
        background: #add8e6 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    
    /* 印刷時は利用者名のみ表示 */
    .shift-table .user-detail {
        display: none !important;
    }
    
    .shift-table .user-name {
        font-size: 9px; /* 10px → 9px */
    }
    
    .shift-cell {
        font-size: 12px; /* 8px → 12px（見やすいサイズに） */
        min-height: 28px; /* 20px → 28px */
        height: 28px;
        padding: 2px; /* 1px → 2px */
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold; /* 一文字表示を見やすく */
    }
    
    .shift-cell.store-a {
        background: #ffffff !important;
        color: #1976d2 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    
    .shift-cell.store-b {
        background: #ffffff !important;
        color: #2e7d32 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    
    .shift-cell.holiday {
        background: #bbb !important;
        color: #bbb !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* 定休日のセルの隙間をなくす（枠線は表示） */
    .shift-table td:has(.shift-cell.holiday) {
        padding: 0 !important;
        border: 1px solid #000 !important;
        background: #bbb !important;
    }
    
    .shift-cell.off {
        background: #ffffff !important;
        color: #ffffff !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        font-weight: bold;
    }
    
    .shift-cell.paid-leave {
        background: #ffffff !important;
        color: #d32f2f !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        font-weight: bold;
    }
    
    /* 印刷時は集計行と集計列を非表示 */
    .shift-table .count-row {
        display: none !important;
    }
    
    .shift-table .group-row {
        display: none !important;
    }
    
    .shift-table .transport-row {
        display: none !important;
    }
    
    .shift-table .summary-header {
        display: none !important;
    }
    
    .shift-table .summary-cell {
        display: none !important;
    }
    
    /* Aグループのバッジを印刷時は非表示 */
    .shift-table .group-badge {
        display: none !important;
    }
    
    /* 印刷用要素を表示 */
    .print-only {
        display: block !important;
        visibility: visible !important;
    }
    
    /* 印刷用ヘッダー */
    .print-header {
        text-align: center;
        margin-bottom: 10px;
    }
    
    .print-header h1 {
        font-size: 18px;
        font-weight: bold;
        margin: 0;
        padding: 5px 0;
    }
    
    /* 印刷用フッター */
    .print-footer {
        margin-top: 20px;
        page-break-inside: avoid;
    }
    
    .footer-notice {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 10px;
        gap: 5px;
    }
    
    .notice-text {
        font-size: 12px;
    }
    
    .notice-time {
        font-size: 20px;
        font-weight: bold;
        background: #add8e6;
        padding: 5px 15px;
        margin: 0 5px;
    }
    
    .footer-boxes {
        display: flex;
        gap: 10px;
        margin-left: 20px;
    }
    
    .footer-box {
        border: 2px solid #4a90e2;
        background: #4a90e2;
        color: white;
        padding: 8px 12px;
        font-size: 11px;
        font-weight: bold;
        text-align: center;
        min-width: 50px;
    }
    
    .footer-instruction {
        text-align: center;
        font-size: 12px;
        margin-top: 10px;
        padding: 5px 0;
    }
    
    .page-actions {
        display: none !important;
    }
    
    .sidebar,
    .header {
        display: none !important;
    }
}

/* スマホ用PDF印刷スタイル */
@media print {
    /* スマホ用PDFのページ設定（body.mobile-print-activeのときのみ） */
    body.mobile-print-active {
        margin: 0;
        padding: 0;
    }
    
    body.mobile-print-active * {
        visibility: hidden;
    }
    
    body.mobile-print-active .mobile-print-container,
    body.mobile-print-active .mobile-print-container * {
        visibility: visible;
    }
    
    body.mobile-print-active .mobile-print-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    
    /* スマホ用ページの設定 */
    body.mobile-print-active .mobile-print-page {
        page-break-after: always;
        width: 100%;
        margin: 0;
        padding: 10px;
        box-shadow: none;
    }
    
    body.mobile-print-active .mobile-print-page:last-child {
        page-break-after: auto;
    }
    
    body.mobile-print-active .mobile-print-controls,
    body.mobile-print-active .mobile-page-controls {
        display: none !important;
    }
}

/* スマホ用PDF表示用のスタイル */
.mobile-print-container {
    display: none;
}

.mobile-print-container.active {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    z-index: 10000;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-print-page {
    max-width: 100%;
    width: 100%;
    min-height: auto;
    margin: 0 0 15px 0;
    background: white;
    padding: 15px 10px;
    box-shadow: none;
    page-break-after: always;
    display: flex;
    flex-direction: column;
}

.mobile-print-page:last-child {
    page-break-after: auto;
    margin-bottom: 0;
}

.mobile-page-controls {
    text-align: center;
    margin-bottom: 10px;
}

.mobile-page-controls .btn-print-page {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: bold;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.mobile-page-controls .btn-print-page:hover {
    background: #357abd;
}

.mobile-page-controls .btn-print-page i {
    margin-right: 5px;
}

.mobile-print-header {
    text-align: center;
    margin-bottom: 8px;
}

.mobile-print-header h1 {
    font-size: 20px;
    font-weight: bold;
    margin: 0 0 5px 0;
}

.mobile-print-header .page-indicator {
    font-size: 14px;
    color: #666;
    margin: 5px 0 10px 0;
}

.mobile-print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    flex: 1;
    table-layout: fixed;
}

.mobile-print-table th,
.mobile-print-table td {
    border: 1px solid #000;
    padding: 3px 2px;
    text-align: center;
    vertical-align: middle;
    height: 32px;
    width: auto;
}

.mobile-print-table thead th {
    background: #667eea;
    color: white;
    font-weight: bold;
    font-size: 11px;
    padding: 4px 2px;
    height: 36px;
}

.mobile-print-table thead th.tuesday-header {
    background: #bbb;
}

.mobile-print-table thead th:first-child {
    width: 45px;
    min-width: 45px;
    max-width: 45px;
}

/* 日付セルの幅を均等に */
.mobile-print-table thead th:not(:first-child) {
    width: calc((100% - 45px) / 15);
}

.mobile-print-table thead th small {
    display: block;
    font-size: 9px;
    margin-top: 2px;
}

.mobile-print-table tbody th {
    background: #f0f0f0;
    font-size: 11px;
    width: 45px;
    min-width: 45px;
    max-width: 45px;
    font-weight: normal;
    padding: 3px 2px;
}

.mobile-print-table tbody th.transport-user {
    background: #add8e6;
}

.mobile-shift-cell {
    font-size: 16px;
    font-weight: bold;
    padding: 3px;
    min-height: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-shift-cell.store-a {
    background: #ffffff;
    color: #1976d2;
}

.mobile-shift-cell.store-b {
    background: #ffffff;
    color: #2e7d32;
}

.mobile-shift-cell.holiday {
    background: #bbb;
    color: #bbb;
    padding: 0;
}

.mobile-shift-cell.off {
    background: #ffffff;
    color: #ffffff;
}

.mobile-shift-cell.paid-leave {
    background: #ffffff;
    color: #d32f2f;
}

.mobile-print-footer {
    margin-top: 10px;
}

.mobile-footer-notice {
    text-align: center;
    margin-bottom: 6px;
}

.mobile-footer-notice .notice-text {
    font-size: 12px;
}

.mobile-footer-notice .notice-time {
    font-size: 18px;
    font-weight: bold;
    background: #add8e6;
    padding: 4px 10px;
    margin: 0 3px;
    display: inline-block;
}

.mobile-footer-boxes {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
}

.mobile-footer-box {
    border: 2px solid #4a90e2;
    background: #4a90e2;
    color: white;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: bold;
}

.mobile-footer-instruction {
    text-align: center;
    font-size: 11px;
    margin-top: 8px;
}

.mobile-print-controls {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 10001;
    display: flex;
    gap: 8px;
}

.mobile-print-controls button {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.mobile-print-controls .btn-print {
    background: #4a90e2;
    color: white;
}

.mobile-print-controls .btn-close {
    background: #e74c3c;
    color: white;
}


/* 休み希望カレンダー */
.leave-calendar-container {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid #ddd;
}

.leave-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.leave-calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 5px;
    font-weight: 600;
    color: #666;
}

.leave-calendar-header-cell {
    text-align: center;
    padding: 0.5rem;
    font-size: 0.9rem;
}

.leave-calendar-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    position: relative;
    min-height: 70px;
}

.leave-calendar-cell:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.leave-calendar-cell.other-month {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.leave-calendar-cell.other-month:hover {
    transform: none;
    border-color: #e0e0e0;
}

.leave-calendar-cell.tuesday {
    background: #f0f0f0;
    border-color: #d0d0d0;
    cursor: not-allowed;
}

.leave-calendar-cell.tuesday:hover {
    transform: none;
}

.leave-calendar-cell.selected {
    background: #e3f2fd;
    border-color: #2196f3;
    border-width: 3px;
}

.leave-calendar-cell.has-leave {
    background: #ffe0e0;
    border-color: #f44336;
}

.leave-calendar-cell.has-leave.selected {
    background: #ffcccc;
    border-color: #d32f2f;
}

.calendar-day-number {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.calendar-day-label {
    font-size: 0.7rem;
    color: #999;
}

.calendar-leave-badge {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
    background: #f44336;
    color: white;
    white-space: nowrap;
}

/* 日報リスト */
.reports-list {
    display: grid;
    gap: 1rem;
}

.report-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.report-tasks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.task-tag {
    padding: 0.4rem 0.8rem;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-pdf {
    padding: 0.6rem 1.2rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-pdf:hover {
    background: #c0392b;
}

/* フィルターグループ */
.filter-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-group select,
.filter-group input {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-content.large {
    max-width: 800px;
}

.modal-header {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
}

.btn-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.3rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

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

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

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

.required {
    color: #e74c3c;
}

.info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
}

.info-box i {
    font-size: 1.5rem;
    color: #2196f3;
}

.info-box ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.info-box li {
    margin: 0.3rem 0;
}

/* 休み希望リスト */
.leave-request-list {
    margin-top: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.leave-request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

/* レスポンシブ */
@media (max-width: 1024px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar .logo span,
    .sidebar .nav-item span,
    .sidebar .btn-logout-sidebar span {
        display: none;
    }
    
    .main-container {
        margin-left: 70px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .main-container {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
