/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: #111827;
    background-color: #f8fafc;
}

/* Design Tokens */
:root {
    /* Colors */
    --primary: #2563eb;
    --secondary: #6b7280;
    --background: #ffffff;
    --background-secondary: #f8fafc;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --accent: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Status Colors */
    --available: #10b981;
    --unavailable: #ef4444;
    --maybe: #f59e0b;
    --unsubmitted: #d1d5db;

    /* Spacing */
    --space-xs: 4px;
    --space-s: 8px;
    --space-m: 16px;
    --space-l: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;

    /* Border Radius */
    --radius-s: 4px;
    --radius-m: 8px;
    --radius-l: 16px;

    /* Shadows */
    --shadow-1: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-2: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-3: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.screen {
    min-height: 100vh;
}

/* Common Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-s);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #f3f4f6;
    color: var(--text-primary);
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
    transform: translateY(-1px);
}

.input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-s);
    font-size: 16px;
    transition: border-color 0.2s;
}

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

.label {
    display: block;
    margin-bottom: var(--space-s);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: var(--space-l);
}

.caption {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Login Screen */
.login-container {
    max-width: 400px;
    margin: 0 auto;
    padding: var(--space-xxl) var(--space-l);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-xxl);
}

.logo {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-s);
}

.subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

.login-form {
    margin-bottom: var(--space-xl);
}

.demo-accounts {
    border-top: 1px solid #e5e7eb;
    padding-top: var(--space-l);
}

.demo-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
    margin-top: var(--space-s);
}

.demo-btn {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-s);
    background: white;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    transition: all 0.2s;
}

.demo-btn:hover {
    border-color: var(--primary);
    background-color: #eff6ff;
}

/* Employee Mobile Interface */
.mobile-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: white;
}

.header {
    background: var(--primary);
    color: white;
    padding: var(--space-l);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 20px;
    font-weight: 600;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-s);
    font-size: 14px;
    cursor: pointer;
}

.main {
    padding: var(--space-l);
}

.user-info {
    margin-bottom: var(--space-xl);
    text-align: center;
}

.user-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.user-role {
    color: var(--text-secondary);
    font-size: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-l);
}

.shift-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
}

.shift-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-m);
    padding: var(--space-l);
    box-shadow: var(--shadow-1);
}

.shift-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-m);
}

.shift-date {
    font-size: 16px;
    font-weight: 600;
}

.shift-day {
    color: var(--text-secondary);
    font-size: 14px;
}

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

.shift-status.available {
    background: #d1fae5;
    color: #065f46;
}

.shift-status.unavailable {
    background: #fee2e2;
    color: #991b1b;
}

.shift-status.maybe {
    background: #fef3c7;
    color: #92400e;
}

.shift-status.unsubmitted {
    background: #f3f4f6;
    color: #374151;
}

.shift-actions {
    display: flex;
    gap: var(--space-s);
}

.status-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid transparent;
    border-radius: var(--radius-s);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
    color: var(--text-secondary);
    position: relative;
}

/* 未選択状態（デフォルト） */
.status-btn:not(.selected) {
    background: #f8fafc;
    color: var(--text-secondary);
    border: 2px solid #e2e8f0;
}

.status-btn:not(.selected):hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

/* 選択済み状態 */
.status-btn.selected.available {
    background: var(--available);
    color: white;
    border: 2px solid #059669;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.status-btn.selected.unavailable {
    background: var(--unavailable);
    color: white;
    border: 2px solid #dc2626;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.status-btn.selected.maybe {
    background: var(--warning);
    color: white;
    border: 2px solid #d97706;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* Shift Notes Section */
.shift-notes-section {
    margin-top: var(--space-m);
}

.notes-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-s);
}

.notes-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-s);
    font-size: 14px;
    transition: border-color 0.2s;
}

.notes-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Manager Web Interface */
.manager-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e5e7eb;
    padding: var(--space-l);
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-xl);
}

.nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
    margin-bottom: var(--space-xl);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-m);
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-s);
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.nav-item:hover,
.nav-item.active {
    background: #eff6ff;
    color: var(--primary);
}

.nav-icon {
    font-size: 18px;
}

.content {
    flex: 1;
    padding: var(--space-xl);
    overflow-y: auto;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.content-title {
    font-size: 28px;
    font-weight: 700;
}

.date-input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-s);
    font-size: 14px;
}

.tab-content {
    display: none;
}

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

/* Assignment tab specific optimizations */
#assignment-tab.tab-content.active {
    height: calc(100vh - 80px); /* Assignment tabでは画面目一杯使用 */
    overflow: hidden; /* 全体のスクロールを防ぐ */
}

#assignment-tab .content-header {
    margin-bottom: var(--space-l); /* マージンを小さく */
    flex-shrink: 0; /* ヘッダーは縮まない */
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-l);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: white;
    padding: var(--space-l);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-1);
}

.stat-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-s);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

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

.stat-detail {
    font-size: 14px;
    color: var(--text-secondary);
}

.dashboard-sections {
    display: grid;
    gap: var(--space-xl);
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
}

.project-card {
    background: white;
    padding: var(--space-l);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-1);
    border-left: 4px solid var(--primary);
}

.project-card.shortage {
    border-left-color: var(--warning);
}

.project-card.critical {
    border-left-color: var(--error);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-m);
}

.project-name {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    margin-right: var(--space-m);
}

.project-status {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.project-status.full {
    background: #d1fae5;
    color: #065f46;
}

.project-status.shortage {
    background: #fef3c7;
    color: #92400e;
}

.project-status.critical {
    background: #fee2e2;
    color: #991b1b;
}

.project-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-m);
}

.project-detail {
    font-size: 14px;
}

.project-detail-label {
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.project-detail-value {
    font-weight: 500;
}

.project-actions {
    margin-top: var(--space-l);
    padding-top: var(--space-m);
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
}

.project-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
    min-width: auto;
}

/* Shifts Management */
.shifts-grid {
    background: white;
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-1);
    overflow: hidden;
}

.shifts-header {
    display: grid;
    grid-template-columns: 200px repeat(auto-fit, minmax(120px, 1fr));
    gap: 1px;
    background: #f3f4f6;
}

.shifts-header-cell {
    padding: var(--space-m);
    font-weight: 600;
    font-size: 14px;
    background: white;
}

.shifts-row {
    display: grid;
    grid-template-columns: 200px repeat(auto-fit, minmax(120px, 1fr));
    gap: 1px;
    background: #f3f4f6;
}

.shifts-cell {
    padding: var(--space-m);
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.shifts-employee {
    font-weight: 500;
    justify-content: flex-start;
    flex-direction: row;
}

.shifts-status {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.shifts-status.available {
    background: var(--available);
}

.shifts-status.unavailable {
    background: var(--unavailable);
}

.shifts-status.maybe {
    background: var(--warning);
}

.shifts-status.unsubmitted {
    background: var(--unsubmitted);
    color: var(--text-secondary);
}

.shifts-notes {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.2;
    text-align: center;
    max-width: 80px;
    word-wrap: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Assignment Interface */
.assignment-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    height: calc(100vh - 160px); /* assignment-tab内での正確な高さ計算 */
    min-height: 650px; /* より大きな最小高さを確保 */
}

/* 左列：出勤可能従業員 */
.available-staff {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-1);
    overflow: hidden;
}

.available-staff .section-title {
    padding: var(--space-l);
    margin: 0;
    background: var(--background-secondary);
    border-bottom: 1px solid #e5e7eb;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0; /* ヘッダーは縮まない */
}

.staff-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
    padding: var(--space-l);
    overflow-y: auto;
    flex: 1; /* 残りの高さを使用 */
}

/* 右列：現場別配置 */
.projects-assignment {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-1);
    overflow: hidden;
}

.projects-assignment .section-title {
    padding: var(--space-l);
    margin: 0;
    background: var(--background-secondary);
    border-bottom: 1px solid #e5e7eb;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0; /* ヘッダーは縮まない */
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-l);
    padding: var(--space-l);
    overflow-y: auto;
    flex: 1; /* 残りの高さを使用 */
}

/* カスタムスクロールバー */
.staff-list::-webkit-scrollbar,
.projects-list::-webkit-scrollbar {
    width: 8px;
}

.staff-list::-webkit-scrollbar-track,
.projects-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.staff-list::-webkit-scrollbar-thumb,
.projects-list::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 4px;
}

.staff-list::-webkit-scrollbar-thumb:hover,
.projects-list::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

.staff-card {
    background: white;
    padding: var(--space-l);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-1);
    cursor: move;
    transition: all 0.2s;
    border: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
    min-height: 120px;
    height: auto; /* 高さを自動調整 */
    flex-shrink: 0; /* カードが縮まないように */
    justify-content: space-between;
}

.staff-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
    border-color: var(--primary);
}

.staff-card:active {
    transform: translateY(0);
    box-shadow: var(--shadow-1);
}

.staff-card.dragging {
    opacity: 0.8;
    transform: rotate(2deg) scale(1.02);
    box-shadow: var(--shadow-3);
    z-index: 1000;
}

.staff-card[draggable="true"] {
    cursor: grab;
}

.staff-card[draggable="true"]:active {
    cursor: grabbing;
}

/* Staff Card Header */
.staff-card-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.staff-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0;
}

.staff-role {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.2;
}

.staff-experience {
    font-size: 12px;
    color: var(--text-secondary);
    background: #f8fafc;
    padding: 2px 8px;
    border-radius: var(--radius-s);
    align-self: flex-start;
    margin-top: var(--space-xs);
}

.staff-skills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: auto; /* スキルを下に配置 */
}

.skill-tag {
    padding: 4px 8px;
    background: #eff6ff;
    color: var(--primary);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #dbeafe;
    transition: all 0.15s;
}

.skill-tag:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

/* Staff Card Sections */
.staff-card-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
    flex: 1;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-l);
}

.assignment-project {
    background: white;
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-1);
    overflow: hidden;
    flex-shrink: 0; /* カードが潰れないように */
    min-height: 150px; /* 最小高さを縮小 */
    display: flex;
    flex-direction: column;
}

.assignment-project-header {
    padding: var(--space-m) var(--space-l);
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-m);
}

.assignment-project-info {
    flex: 1;
    min-width: 0;
}

.assignment-project-title {
    font-weight: 600;
    margin: 0 0 var(--space-xs) 0;
    font-size: 15px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.assignment-project-stats {
    display: flex;
    align-items: center;
    gap: var(--space-s);
    font-size: 13px;
}

.assignment-stats-count {
    font-weight: 600;
    color: var(--text-primary);
}

.assignment-stats-percentage {
    font-weight: 600;
    color: var(--primary);
}

.assignment-status-badge {
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.assignment-status-badge.full {
    background: #dcfce7;
    color: #166534;
}

.assignment-status-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.assignment-status-badge.critical {
    background: #fee2e2;
    color: #991b1b;
}

/* Compact Progress Bar */
.assignment-progress-compact {
    width: 80px;
    flex-shrink: 0;
}

.assignment-progress-bar-compact {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.assignment-progress-fill {
    height: 100%;
    transition: width 0.5s ease-in-out;
    border-radius: 4px;
}

.assignment-progress-fill.full {
    background: linear-gradient(90deg, var(--accent), #059669);
}

.assignment-progress-fill.warning {
    background: linear-gradient(90deg, var(--warning), #d97706);
}

.assignment-progress-fill.critical {
    background: linear-gradient(90deg, var(--error), #dc2626);
}

/* Project Status Variants */
.assignment-project.full {
    border-left: 4px solid var(--accent);
}

.assignment-project.warning {
    border-left: 4px solid var(--warning);
}

.assignment-project.critical {
    border-left: 4px solid var(--error);
}

.assignment-zone {
    min-height: 120px;
    padding: var(--space-l);
    border: 2px dashed #d1d5db;
    margin: var(--space-l);
    border-radius: var(--radius-m);
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
    flex: 1; /* 残りスペースを使用 */
}

.assignment-zone.drag-over {
    border-color: var(--primary);
    background: #eff6ff;
}

.assigned-staff {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-s);
    max-width: 100%;
}

.assigned-staff-card {
    background: #f8fafc;
    padding: var(--space-s) var(--space-m);
    border-radius: var(--radius-s);
    font-size: 13px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
    position: relative;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: move;
}

.assigned-staff-card:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
    border-color: var(--primary);
}

.assigned-staff-card[draggable="true"] {
    cursor: grab;
}

.assigned-staff-card[draggable="true"]:active {
    cursor: grabbing;
}

.assigned-staff-card.dragging {
    opacity: 0.8;
    transform: rotate(1deg) scale(1.02);
    box-shadow: var(--shadow-2);
    z-index: 1000;
}

.no-staff-message {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-secondary);
    font-style: italic;
}

.assignment-placeholder {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: var(--space-l);
}

.remove-assignment {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--error);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: none;
}

.assigned-staff-card {
    position: relative;
}

.assigned-staff-card:hover .remove-assignment {
    display: block;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: var(--space-m) var(--space-l);
    border-radius: var(--radius-m);
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
    min-width: 300px;
    box-shadow: var(--shadow-2);
}

.toast-success {
    background: var(--accent);
    color: white;
    border: 1px solid #059669;
}

.toast-error {
    background: var(--error);
    color: white;
    border: 1px solid #dc2626;
}

.toast-info {
    background: var(--info);
    color: white;
    border: 1px solid #2563eb;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Home Buttons */
.home-btn,
.global-home-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow-3);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-btn:hover,
.global-home-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.global-home-btn {
    width: auto;
    padding: 12px 20px;
    border-radius: 28px;
    font-size: 14px;
    font-weight: 500;
    gap: 8px;
}

/* Hide home button on login screen */
#login-screen .home-btn,
#login-screen .global-home-btn {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .manager-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
    }

    .nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .assignment-layout {
        grid-template-columns: 1fr;
        height: calc(100vh - 120px); /* モバイルでもより多くの領域を使用 */
        gap: var(--space-l);
    }

    /* モバイルでは各列の高さを調整 */
    .available-staff,
    .projects-assignment {
        max-height: 45vh; /* モバイルでは画面の45%を上限に */
        min-height: 250px; /* 最小高さを確保 */
    }

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