/* Phase2 統一スタイル - Tailwind CSSベース */

/* フォント設定 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;600;700&display=swap');

/* カスタムプロパティ */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #059669;
    --warning-color: #f59e0b;
    --danger-color: #dc2626;
    --info-color: #0891b2;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
}

/* 基本スタイル */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #f1f5f9;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* ヘッダー */
.header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

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

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.user-role {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* 管理者、評価者、被評価者の区別スタイル */
.user-role.manager {
    background: #6b7280; /* グレー - 管理者 */
    border: 2px solid #4b5563;
}

.user-role.evaluator {
    background: #059669; /* 緑色 - 評価者 */
    border: 2px solid #047857;
}

.user-role.employee {
    background: #3b82f6; /* 青色 - 被評価者 */
    border: 2px solid #2563eb;
}

/* ヘッダーの背景色も区別 */
.header.manager {
    background: white;
    border-bottom: 4px solid #6b7280;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.15);
}

.header.evaluator {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-bottom: 4px solid #059669;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.15);
}

.header.employee {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-bottom: 4px solid #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

/* ユーザーアバターも区別 */
.user-avatar.manager {
    background: #6b7280;
    border: 2px solid #4b5563;
}

.user-avatar.evaluator {
    background: #059669;
    border: 2px solid #047857;
}

.user-avatar.employee {
    background: #3b82f6;
    border: 2px solid #2563eb;
}

/* ページタイトルの色も区別 */
.header.manager .page-title h2 {
    color: #374151;
}

.header.evaluator .page-title h2 {
    color: #059669;
}

.header.employee .page-title h2 {
    color: #3b82f6;
}

/* プライマリボタンの色も区別 */
.header.manager .btn-primary {
    background: #6b7280;
    border-color: #4b5563;
}

.header.manager .btn-primary:hover {
    background: #4b5563;
}

.header.evaluator .btn-primary {
    background: #059669;
    border-color: #047857;
}

.header.evaluator .btn-primary:hover {
    background: #047857;
}

.header.employee .btn-primary {
    background: #3b82f6;
    border-color: #2563eb;
}

.header.employee .btn-primary:hover {
    background: #2563eb;
}

/* ナビゲーションパネルの色も区別 */
.header.manager .navigation-panel {
    border-left: 4px solid #6b7280;
}

.header.evaluator .navigation-panel {
    border-left: 4px solid #059669;
}

.header.employee .navigation-panel {
    border-left: 4px solid #3b82f6;
}

.header.manager .navigation-title {
    color: #6b7280;
}

.header.evaluator .navigation-title {
    color: #059669;
}

.header.employee .navigation-title {
    color: #3b82f6;
}

/* カードヘッダーの色も区別 */
.header.manager .card-header {
    border-left: 4px solid #6b7280;
}

.header.evaluator .card-header {
    border-left: 4px solid #059669;
}

.header.employee .card-header {
    border-left: 4px solid #3b82f6;
}

.header.manager .card-title {
    color: #6b7280;
}

.header.evaluator .card-title {
    color: #059669;
}

.header.employee .card-title {
    color: #3b82f6;
}

/* ヘッダー内のロゴとユーザー名の色も区別 */
.header.manager .logo {
    color: #374151;
    text-shadow: 0 1px 2px rgba(107, 114, 128, 0.1);
}

.header.evaluator .logo {
    color: #047857;
    text-shadow: 0 1px 2px rgba(5, 150, 105, 0.1);
}

.header.employee .logo {
    color: #2563eb;
    text-shadow: 0 1px 2px rgba(59, 130, 246, 0.1);
}

.header.manager .user-name {
    color: #374151;
    font-weight: 500;
}

.header.evaluator .user-name {
    color: #047857;
    font-weight: 500;
}

.header.employee .user-name {
    color: #2563eb;
    font-weight: 500;
}

/* ヘッダー内のアイコンボタンの色も区別 */
.header.manager .btn-icon {
    color: #6b7280;
}

.header.manager .btn-icon:hover {
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
}

.header.evaluator .btn-icon {
    color: #047857;
}

.header.evaluator .btn-icon:hover {
    background: rgba(5, 150, 105, 0.1);
    color: #047857;
}

.header.employee .btn-icon {
    color: #2563eb;
}

.header.employee .btn-icon:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

/* ヘッダーの全体的な見た目を改善 */
.header.manager {
    position: relative;
}

.header.manager::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #6b7280, #9ca3af, #6b7280);
}

.header.evaluator {
    position: relative;
}

.header.evaluator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #059669, #10b981, #059669);
}

.header.employee {
    position: relative;
}

.header.employee::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--light-bg);
    color: var(--text-primary);
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    min-width: 18px;
    text-align: center;
}

/* メインコンテンツ */
.main-content {
    min-height: calc(100vh - 64px);
    padding: 2rem 0;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ページヘッダー */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1rem;
}

.page-title {
    flex: 1;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.page-title h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.page-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ボタン */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

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

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* カード */
.card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--light-bg);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--light-bg);
}

/* 統計カード */
.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: 12px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.stat-icon.success {
    background: var(--success-color);
}

.stat-icon.warning {
    background: var(--warning-color);
}

.stat-icon.danger {
    background: var(--danger-color);
}

.stat-icon.info {
    background: var(--info-color);
}

.stat-content h3 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* テーブル */
.table-container {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.table-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--light-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

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

.table th {
    background: var(--light-bg);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.table tbody tr:hover {
    background: var(--light-bg);
}

/* ステータスバッジ */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.completed {
    background: #dcfce7;
    color: var(--success-color);
}

.status-badge.in-progress {
    background: #fef3c7;
    color: var(--warning-color);
}

.status-badge.pending {
    background: #e2e8f0;
    color: var(--text-secondary);
}

.status-badge.overdue {
    background: #fee2e2;
    color: var(--danger-color);
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
}

.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 100px;
}

/* プログレスバー */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

.alert-success {
    background: #dcfce7;
    color: var(--success-color);
    border: 1px solid #bbf7d0;
}

.alert-warning {
    background: #fef3c7;
    color: var(--warning-color);
    border: 1px solid #fde68a;
}

.alert-error {
    background: #fee2e2;
    color: var(--danger-color);
    border: 1px solid #fecaca;
}

.alert-info {
    background: #e0f2fe;
    color: var(--info-color);
    border: 1px solid #bae6fd;
}

/* ナビゲーションボタン */
.navigation-panel {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    padding: 1rem;
    min-width: 200px;
}

.navigation-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.navigation-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-btn {
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.nav-btn:hover {
    background: var(--light-bg);
}

/* レスポンシブ */
@media (max-width: 768px) {
    .header-content {
        padding: 0 0.75rem;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .page-actions {
        justify-content: stretch;
    }
    
    .btn {
        flex: 1;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .table-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .navigation-panel {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        min-width: auto;
    }
}

/* ユーティリティ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.p-0 { padding: 0; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }

.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); } 