/* CSSインポート */
@import url('./login.css');

@import url('./header.css');

@import url('./index.css');
@import url('./report.css');


/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Sans', 'ヒラギノ角ゴ ProN W3', 'Hiragino Kaku Gothic ProN', 'メイリオ', Meiryo, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f0f8ff;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.form-row {
    display: flex;
    gap: 1rem;
    align-items: end;
}

.form-row .form-group {
    flex: 1;
}

/* ボタン */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

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

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-block {
    width: 100%;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

/* 打刻ボタン */
.btn-clock-in {
    background-color: #27ae60;
    color: white;
    padding: 1.5rem 3rem;
    font-size: 1.2rem;
    border-radius: 8px;
    margin: 0 1rem;
}

.btn-clock-in:hover:not(:disabled) {
    background-color: #229954;
}

.btn-clock-out {
    background-color: #e74c3c;
    color: white;
    padding: 1.5rem 3rem;
    font-size: 1.2rem;
    border-radius: 8px;
    margin: 0 1rem;
}

.btn-clock-out:hover:not(:disabled) {
    background-color: #c0392b;
}

.btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 時刻表示 */
.clock-display {
    text-align: center;
    margin: 2rem 0;
}

.current-time {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c3e50;
    background: linear-gradient(135deg, #3498db, #2980b9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 打刻ボタン領域 */
.punch-buttons {
    text-align: center;
    margin: 3rem 0;
}

/* 今日の状況カード */
.today-status {
    margin: 3rem 0;
}

.status-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
    border-left: 4px solid #3498db;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.status-item:last-child {
    border-bottom: none;
}

.status-item .label {
    font-weight: 500;
    color: #555;
}

.status-item .time {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
}

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

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-card h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    opacity: 0.9;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* テーブル */
.table-container {
    overflow-x: auto;
    margin: 2rem 0;
}

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

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table .weekend {
    background-color: #fff5f5;
}

.table .weekend-text {
    color: #e74c3c;
    font-weight: bold;
}

/* アラート */
.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: #27ae60;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #e74c3c;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #3498db;
    color: #0c5460;
}

/* ステータスバッジ */
.status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status.completed {
    background-color: #d4edda;
    color: #155724;
}

.status.working {
    background-color: #fff3cd;
    color: #856404;
}

.status.absent {
    background-color: #f8d7da;
    color: #721c24;
}

.status.weekend {
    background-color: #e2e3e5;
    color: #383d41;
}

.status.active {
    background-color: #d4edda;
    color: #155724;
}

.status.inactive {
    background-color: #f8d7da;
    color: #721c24;
}

/* 役割バッジ */
.role {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.role.admin {
    background-color: #d1ecf1;
    color: #0c5460;
}

.role.user {
    background-color: #e2e3e5;
    color: #383d41;
}

/* タブメニュー */
.tab-menu {
    border-bottom: 1px solid #dee2e6;
    margin: 2rem 0 1rem;
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-button.active,
.tab-button:hover {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab-content {
    display: none;
    padding: 2rem 0;
}

.tab-content.active {
    display: block;
}

/* モーダル */
.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: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #333;
}

.form-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-buttons .btn {
    flex: 1;
}

/* フィルターフォーム */
.filter-form {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

/* エクスポートセクション */
.export-section {
    text-align: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.report-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ログインフッター */
.login-footer {
    text-align: center;
    margin-top: 2rem;
}

.login-footer a {
    color: #3498db;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* 最近の履歴セクション */
.recent-records {
    margin: 3rem 0;
}

.recent-records h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .main-content {
        margin: 1rem auto;
        padding: 0 10px;
    }
    
    .container {
        padding: 1rem;
    }
    
    .login-container {
        margin: 1rem;
        padding: 2rem;
    }
    
    .current-time {
        font-size: 1.8rem;
    }
    
    .btn-clock-in,
    .btn-clock-out {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .report-links {
        flex-direction: column;
        align-items: center;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .current-time {
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1rem;
    }
}

/* プリント用スタイル */
@media print {
    .navbar,
    .btn,
    .export-section,
    .filter-form {
        display: none !important;
    }
    
    .main-content {
        margin: 0;
        box-shadow: none;
    }
    
    .container {
        box-shadow: none;
        padding: 0;
    }
    
    .table {
        font-size: 12px;
    }
}



/* エクスポートセクションのスタイル */
.export-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.export-section h3 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

.export-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

.export-buttons .btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 160px;
    justify-content: center;
}

.export-buttons .btn-primary {
    background-color: #dc3545;
    color: white;
    border: 1px solid #dc3545;
}

.export-buttons .btn-primary:hover {
    background-color: #c82333;
    border-color: #bd2130;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.export-buttons .btn-secondary {
    background-color: #28a745;
    color: white;
    border: 1px solid #28a745;
}

.export-buttons .btn-secondary:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

/* アイコンのスタイル */
.btn i {
    margin-right: 8px;
    font-size: 16px;
}

/* アイコンフォント（FontAwesomeの代替として疑似要素を使用） */
.icon-pdf::before {
    content: "📄";
    margin-right: 5px;
}

.icon-csv::before {
    content: "📊";
    margin-right: 5px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .export-buttons {
        flex-direction: column;
    }
    
    .export-buttons .btn {
        width: 100%;
    }
}

/* 既存のボタンスタイルと統一 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background-color 0.2s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}