:root {
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --bg-color: #F3F4F6;
    --sidebar-bg: #1F2937;
    --sidebar-text: #F9FAFB;
    --card-bg: #FFFFFF;
    --text-main: #111827;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, sans-serif; background-color: var(--bg-color); color: var(--text-main); display: flex; min-height: 100vh; }

/* ログイン画面用 */
.login-body { display: flex; align-items: center; justify-content: center; background-color: var(--bg-color); }
.login-card { background: var(--card-bg); padding: 2.5rem; border-radius: 12px; box-shadow: var(--shadow-md); width: 100%; max-width: 400px; }
.login-title { font-size: 1.5rem; font-weight: 600; text-align: center; margin-bottom: 2rem; color: var(--primary-color); }

/* レイアウト */
.sidebar { width: 250px; background-color: var(--sidebar-bg); color: var(--sidebar-text); display: flex; flex-direction: column; }
.sidebar-header { padding: 1.5rem; font-size: 1.25rem; font-weight: bold; border-bottom: 1px solid rgba(255,255,255,0.1); letter-spacing: -0.025em; }
.sidebar-nav { flex: 1; padding-top: 1rem; }
.sidebar-nav a { display: block; padding: 0.75rem 1.5rem; color: #D1D5DB; text-decoration: none; transition: background 0.2s, color 0.2s; font-size: 0.95rem; }
.sidebar-nav a:hover, .sidebar-nav a.active { background-color: rgba(255,255,255,0.1); color: #FFF; border-left: 3px solid var(--primary-color); padding-left: calc(1.5rem - 3px); }

.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.header { background: var(--card-bg); height: 60px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; }
.content-body { padding: 1.5rem; overflow-y: auto; flex: 1; }

/* コンポーネント */
.card { background: var(--card-bg); border-radius: 8px; box-shadow: var(--shadow-sm); padding: 1.5rem; margin-bottom: 1.5rem; }
.card-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.75rem; }

.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-color); font-size: 0.95rem; }
th { background-color: #F9FAFB; font-weight: 600; color: var(--text-muted); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.05em; }
tr:hover td { background-color: #F9FAFB; }

.btn { display: inline-block; padding: 0.5rem 1rem; border-radius: 6px; font-weight: 500; text-decoration: none; text-align: center; cursor: pointer; transition: all 0.2s; border: none; font-size: 0.9rem; }
.btn-primary { background-color: var(--primary-color); color: #FFF; }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-secondary { background-color: #E5E7EB; color: var(--text-main); }
.btn-secondary:hover { background-color: #D1D5DB; }
.btn-danger { background-color: #DC2626; color: white; }
.btn-danger:hover { background-color: #B91C1C; }

.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 500; font-size: 0.875rem; color: var(--text-main); }
.form-control { width: 100%; padding: 0.625rem; border: 1px solid var(--border-color); border-radius: 6px; font-family: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
.form-control:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }
select.form-control { background-color: #fff; }

.alert { padding: 1rem; border-radius: 6px; margin-bottom: 1.5rem; font-size: 0.95rem; }
.alert-error { background-color: #FEF2F2; color: #991B1B; border: 1px solid #F87171; }
.alert-success { background-color: #ECFDF5; color: #065F46; border: 1px solid #34D399; }

/* ユーティリティ */
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
