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

:root {
    --primary-color: #1a73e8;
    --success-color: #34a853;
    --warning-color: #fbbc04;
    --danger-color: #ea4335;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --border-color: #dadce0;
    --bg-light: #f8f9fa;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: var(--text-primary);
    padding-bottom: 70px;
    overflow-x: hidden;
}

header {
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
}

header h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.user-info {
    font-size: 14px;
    opacity: 0.9;
}

.container {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.screen {
    display: none;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Screen 1: 入庫スキャン */
.time-info {
    background: white;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.current-time {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

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

.scan-section {
    background: white;
    padding: 32px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.scan-section h2 {
    font-size: 20px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.btn-camera {
    width: 100%;
    max-width: 300px;
    height: 120px;
    font-size: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-camera .icon {
    font-size: 48px;
}

.hint-text {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 12px;
}

.scan-result {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.scan-result h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.vehicle-info {
    background: var(--bg-light);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.info-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-row .label {
    color: var(--text-secondary);
    min-width: 80px;
}

.info-row .value {
    font-weight: 600;
}

.badges {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.badge {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

.badge-info {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-warning {
    background: #fff3e0;
    color: #f57c00;
}

.btn-start {
    width: 100%;
}

/* Screen 2: 見積・部品選択 */
.estimate-header {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.estimate-header h2 {
    font-size: 18px;
    margin-bottom: 12px;
}

.work-selection {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.work-tag {
    background: var(--bg-light);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
}

.labor-cost {
    display: flex;
    gap: 8px;
    font-size: 14px;
}

.labor-cost .label {
    color: var(--text-secondary);
}

.labor-cost .value {
    font-weight: 600;
}

.section-title {
    font-size: 16px;
    margin-bottom: 16px;
    font-weight: 600;
}

.parts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.part-card {
    background: white;
    padding: 16px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.part-card:active {
    transform: scale(0.98);
}

.part-card.recommended {
    border-color: var(--success-color);
    background: #f1f8f4;
}

.part-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.part-header input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.part-header label {
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
}

.part-pricing {
    padding-left: 28px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.profit-box {
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 8px;
}

.profit-low {
    background: #fef3f2;
    color: var(--danger-color);
}

.profit-high {
    background: #f0fdf4;
    color: var(--success-color);
}

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

.estimate-summary {
    background: white;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.summary-row.total {
    border-top: 2px solid var(--border-color);
    padding-top: 12px;
    margin-top: 8px;
    font-size: 16px;
    font-weight: 700;
}

.summary-row.profit {
    color: var(--success-color);
    font-weight: 700;
}

.btn-cart {
    width: 100%;
    margin-bottom: 8px;
}

/* Screen 3: 報告 */
.evidence-section {
    margin-bottom: 24px;
}

.evidence-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
}

.evidence-item {
    background: white;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.evidence-image,
.evidence-video {
    background: var(--bg-light);
    padding: 60px 20px;
    border-radius: 8px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
}

.evidence-memo {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.additional-cost {
    font-size: 14px;
    font-weight: 600;
    color: var(--warning-color);
}

.ai-pricing {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.ai-pricing h3 {
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
}

.pricing-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.pricing-row.recommended-price {
    background: #f0fdf4;
    padding: 12px;
    border-radius: 8px;
    margin-top: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--success-color);
}

.send-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.send-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
}

.send-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.send-buttons button {
    flex: 1;
}

.btn-send {
    width: 100%;
}

/* Screen 4: ダッシュボード */
.kpi-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.kpi-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.kpi-card.highlight {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid var(--success-color);
}

.kpi-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.kpi-change {
    font-size: 12px;
}

.kpi-change.positive {
    color: var(--success-color);
}

.analysis-section,
.crm-section,
.finance-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.analysis-section h3,
.crm-section h3,
.finance-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
}

.analysis-item,
.crm-item,
.finance-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.improvement {
    color: var(--success-color);
    font-weight: 600;
}

.crm-count {
    background: var(--primary-color);
    color: white;
    padding: 2px 12px;
    border-radius: 12px;
    font-weight: 600;
}

.analysis-highlight {
    background: #fef3f2;
    padding: 12px;
    border-radius: 8px;
    margin-top: 8px;
    font-weight: 600;
    color: var(--danger-color);
}

.btn-fintech {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    width: 100%;
    margin-top: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-fintech:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* ボタンスタイル */
.btn-primary,
.btn-secondary {
    border: none;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:active {
    background: #e5e5e5;
}

/* ボトムナビゲーション */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.nav-item.active {
    color: var(--primary-color);
}

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

.nav-label {
    font-size: 11px;
    font-weight: 500;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 16px;
    margin: 20px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-content h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.modal-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.modal-content .btn-primary {
    width: 100%;
}

/* レスポンシブ */
@media (min-width: 768px) {
    body {
        background: #e5e5e5;
    }

    .container {
        padding: 24px;
    }

    header h1 {
        font-size: 28px;
    }
}