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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.hidden {
    display: none !important;
}

/* ログイン画面 */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

.login-container h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #3B82F6;
}

.login-container p {
    margin-bottom: 2rem;
    color: #666;
}

/* ボタン */
.btn-primary {
    background: #3B82F6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #2563EB;
}

.btn-secondary {
    background: #6B7280;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-secondary:hover {
    background: #4B5563;
}

/* ヘッダー */
header {
    background: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

header h1 {
    color: #3B82F6;
    font-size: 1.5rem;
}

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

/* セクション */
section {
    background: white;
    margin: 1rem;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* トグルボタン */
.toggle-btn {
    background: none;
    border: none;
    color: #3B82F6;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem;
}

.toggle-btn:hover {
    text-decoration: underline;
}

/* ノルマ一覧 */
.quota-list, .archive-list {
    margin-top: 1rem;
}

.quota-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #e5e5e5;
}

.quota-item.completed {
    text-decoration: line-through;
    opacity: 0.5;
}

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

/* 教材カード */
.book-card {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    border-left: 4px solid #3B82F6;
}

.book-card:hover {
    background: #f3f4f6;
}

.book-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.book-progress {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #666;
}

.book-quota {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #3B82F6;
    font-weight: 500;
}

/* モーダル */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 1.5rem;
}

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

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

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

/* テンキー */
.numpad-display {
    background: #f3f4f6;
    padding: 1rem;
    text-align: center;
    font-size: 2rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-family: monospace;
}

.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.numpad-btn {
    padding: 1rem;
    font-size: 1.25rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    cursor: pointer;
}

.numpad-btn:hover {
    background: #f3f4f6;
}

.numpad-enter {
    background: #3B82F6;
    color: white;
    border-color: #3B82F6;
}

.numpad-enter:hover {
    background: #2563EB;
}

/* カレンダー */
.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-top: 1rem;
}

.calendar-day {
    padding: 0.5rem;
    text-align: center;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    cursor: pointer;
}

.calendar-day:hover {
    background: #f3f4f6;
}

.calendar-day.has-progress {
    background: #dbeafe;
}

.calendar-day.today {
    border: 2px solid #3B82F6;
}

/* レスポンシブ */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    
    section {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .modal-content {
        width: 95%;
    }
}
