:root {
            --page-bg: #f4f6f9;
            --surface: #ffffff;
            --text: #1f2937;
            --muted: #68778a;
            --line: #e2e8f0;
            --nav: #172b4d;
            --nav-active: #315b91;
            --blue: #2f67b2;
            --blue-soft: #eaf2ff;
            --green: #147d64;
            --green-soft: #e8f6f1;
            --amber: #946300;
            --amber-soft: #fff4d9;
            --red: #b93838;
            --red-soft: #fff0f0;
            --radius: 13px;
            --shadow: 0 3px 14px rgba(26, 42, 67, .045);
        }

        

        body {
            margin: 0;
            background: var(--page-bg);
            color: var(--text);
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", Meiryo, sans-serif;
            font-size: 16px;
            line-height: 1.6;
        }

        button,
        input,
        select,
        textarea {
            font: inherit;
        }

        button {
            cursor: pointer;
        }

        .layout {
            display: flex;
            min-height: 100vh;
        }

        /* 共通サイドバー。今後は sidebar.php 側に集約できます。 */
        .sidebar {
            width: 244px;
            flex-shrink: 0;
            padding: 24px 14px;
            background: var(--nav);
            color: #fff;
        }

        .brand {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 0 10px 24px;
            border-bottom: 1px solid rgba(255, 255, 255, .13);
        }

        .brand-mark {
            display: grid;
            width: 38px;
            height: 38px;
            flex-shrink: 0;
            place-items: center;
            border-radius: 11px;
            background: #fff;
            color: var(--nav);
            font-weight: 800;
        }

        .brand-name {
            font-size: 15px;
            font-weight: 800;
        }

        .brand-sub {
            margin-top: 3px;
            color: #b8c6da;
            font-size: 11px;
        }

        .nav-label {
            padding: 24px 12px 9px;
            color: #a9b9cf;
            font-size: 11px;
            letter-spacing: .1em;
        }

        .nav {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .nav-link {
            display: flex;
            align-items: center;
            gap: 11px;
            padding: 12px;
            border-radius: 9px;
            color: #e0e7f1;
            font-size: 14px;
            text-decoration: none;
        }

        .nav-link:hover {
            background: rgba(255, 255, 255, .08);
        }

        .nav-link.active {
            background: var(--nav-active);
            color: #fff;
            font-weight: 700;
        }

        .nav-icon {
            width: 20px;
            flex-shrink: 0;
            text-align: center;
            font-size: 17px;
        }

        .sidebar-note {
            margin: 27px 7px 0;
            padding: 13px;
            border: 1px solid rgba(255, 255, 255, .16);
            border-radius: 10px;
            color: #c3d0e0;
            font-size: 12px;
            line-height: 1.7;
        }

        .sidebar-note strong {
            display: block;
            margin-bottom: 5px;
            color: #fff;
        }

        .main {
            flex: 1;
            min-width: 0;
        }

        .topbar {
            display: flex;
            min-height: 70px;
            align-items: center;
            justify-content: space-between;
            gap: 15px;
            padding: 14px 30px;
            border-bottom: 1px solid var(--line);
            background: #fff;
        }

        .breadcrumb {
            color: var(--muted);
            font-size: 13px;
        }

        .topbar-date {
            color: var(--muted);
            font-size: 13px;
        }

        .content {
            max-width: 1600px;
            margin: 0 auto;
            padding: 28px 30px 45px;
        }

        .page-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 18px;
            margin-bottom: 23px;
        }

        .eyebrow {
            margin-bottom: 6px;
            color: var(--blue);
            font-size: 12px;
            font-weight: 800;
            letter-spacing: .08em;
        }

        h1 {
            margin: 0 0 8px;
            font-size: 28px;
            line-height: 1.3;
        }

        .page-description {
            margin: 0;
            color: var(--muted);
            font-size: 15px;
        }

        .button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            padding: 10px 14px;
            border: 1px solid #d5dee8;
            border-radius: 9px;
            background: #fff;
            color: var(--text);
            font-size: 13px;
            font-weight: 700;
        }

        .button:hover {
            background: #f8fafc;
        }

        .button-primary {
            border-color: var(--blue);
            background: var(--blue);
            color: #fff;
        }

        .button-primary:hover {
            background: #25589c;
        }

        .stats {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 14px;
            margin-bottom: 22px;
        }

        .stat-card {
            padding: 17px 19px;
            border: 1px solid var(--line);
            border-radius: var(--radius);
            background: var(--surface);
            box-shadow: var(--shadow);
        }

        .stat-label {
            color: var(--muted);
            font-size: 13px;
        }

        .stat-value {
            margin-top: 5px;
            font-size: 29px;
            font-weight: 800;
            line-height: 1.3;
        }

        .stat-foot {
            margin-top: 3px;
            color: var(--muted);
            font-size: 12px;
        }

        .panel {
            overflow: hidden;
            margin-bottom: 21px;
            border: 1px solid var(--line);
            border-radius: var(--radius);
            background: #fff;
            box-shadow: var(--shadow);
        }

        .panel-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            padding: 18px 21px;
            border-bottom: 1px solid var(--line);
        }

        .panel-title {
            font-size: 17px;
            font-weight: 800;
        }

        .panel-description {
            margin-top: 4px;
            color: var(--muted);
            font-size: 12px;
        }

        .filters {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 10px;
            padding: 14px 20px;
            border-bottom: 1px solid var(--line);
        }

        .filters input,
        .filters select {
            min-height: 42px;
            padding: 9px 11px;
            border: 1px solid #d5dee8;
            border-radius: 8px;
            background: #fff;
            color: var(--text);
            font-size: 13px;
        }

        .filters input {
            min-width: 220px;
            flex: 1;
        }

        .table-wrap {
            overflow-x: auto;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            white-space: nowrap;
        }

        th {
            padding: 13px 14px;
            border-bottom: 1px solid var(--line);
            background: #fafbfd;
            color: var(--muted);
            font-size: 11px;
            text-align: left;
        }

        td {
            padding: 14px;
            border-bottom: 1px solid #edf1f5;
            font-size: 13px;
            vertical-align: middle;
        }

        tbody tr:last-child td {
            border-bottom: 0;
        }

        tbody tr:hover {
            background: #fbfdff;
        }

        .customer-name,
        .vehicle-name {
            font-weight: 800;
        }

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

        .status {
            display: inline-flex;
            align-items: center;
            padding: 5px 9px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 800;
        }

        .status-pending {
            background: #edf0f4;
            color: #465364;
        }

        .status-requested {
            background: var(--blue-soft);
            color: var(--blue);
        }

        .status-progress {
            background: var(--amber-soft);
            color: var(--amber);
        }

        .status-complete {
            background: var(--green-soft);
            color: var(--green);
        }

        .status-returned {
            background: #e9f7ed;
            color: #26743d;
        }

        .row-actions {
            display: flex;
            gap: 6px;
        }

        .small-button {
            padding: 7px 9px;
            border: 1px solid var(--line);
            border-radius: 7px;
            background: #fff;
            color: var(--blue);
            font-size: 12px;
            font-weight: 700;
        }

        .panel-foot {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            gap: 10px;
            padding: 13px 20px;
            border-top: 1px solid var(--line);
            color: var(--muted);
            font-size: 12px;
        }

        .notice {
            padding: 14px 16px;
            border: 1px solid #dfe9f7;
            border-radius: 10px;
            background: #f7faff;
            color: #526174;
            font-size: 12px;
            line-height: 1.8;
        }

        .notice strong {
            color: var(--nav);
        }

        .modal-backdrop {
            position: fixed;
            z-index: 100;
            inset: 0;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px;
            background: rgba(16, 31, 52, .48);
        }

        .modal-backdrop.open {
            display: flex;
        }

        .modal {
            width: min(760px, 100%);
            max-height: 92vh;
            overflow-y: auto;
            border-radius: 14px;
            background: #fff;
            box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
        }

        .modal-head,
        .modal-foot {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 17px 21px;
            border-bottom: 1px solid var(--line);
        }

        .modal-head h2 {
            margin: 0;
            font-size: 18px;
        }

        .modal-body {
            padding: 20px 21px;
        }

        .form-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 15px;
        }

        .field label {
            display: block;
            margin-bottom: 6px;
            font-size: 13px;
            font-weight: 800;
        }

        .field input,
        .field select,
        .field textarea {
            width: 100%;
            min-height: 42px;
            padding: 10px 11px;
            border: 1px solid #d5dee8;
            border-radius: 8px;
            background: #fff;
            font-size: 14px;
        }

        .field textarea {
            min-height: 82px;
            resize: vertical;
        }

        .field-full {
            grid-column: 1 / -1;
        }

        .modal-foot {
            justify-content: flex-end;
            border-top: 1px solid var(--line);
            border-bottom: 0;
        }

        .toast {
            position: fixed;
            z-index: 120;
            right: 22px;
            bottom: 22px;
            display: none;
            padding: 13px 17px;
            border-radius: 9px;
            background: #203b54;
            color: #fff;
            box-shadow: var(--shadow);
            font-size: 13px;
        }

        .toast.show {
            display: block;
        }

        .empty-row {
            display: none;
            padding: 28px;
            color: var(--muted);
            text-align: center;
        }

        @media (max-width: 1100px) {
            .sidebar {
                width: 220px;
            }

            .content {
                padding: 23px 20px 35px;
            }

            .topbar {
                padding-right: 20px;
                padding-left: 20px;
            }

            .stats {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        @media (max-width: 760px) {
            .layout {
                display: block;
            }

            .sidebar {
                width: 100%;
                padding: 12px 13px;
            }

            .brand {
                padding: 0 4px 12px;
                border: 0;
            }

            .nav-label,
            .sidebar-note {
                display: none;
            }

            .nav {
                flex-direction: row;
                overflow-x: auto;
                padding-top: 9px;
            }

            .nav-link {
                flex-shrink: 0;
                padding: 9px 10px;
                font-size: 12px;
                white-space: nowrap;
            }

            .topbar {
                min-height: 55px;
                padding: 12px 14px;
            }

            .topbar-date {
                display: none;
            }

            .content {
                padding: 19px 12px 30px;
            }

            .page-head {
                flex-direction: column;
            }

            h1 {
                font-size: 24px;
            }

            .page-description {
                font-size: 13px;
            }

            .stats {
                gap: 9px;
            }

            .stat-card {
                padding: 13px;
            }

            .stat-value {
                font-size: 25px;
            }

            .panel-head {
                align-items: flex-start;
                padding: 15px;
            }

            .filters {
                padding: 12px;
            }

            .filters input,
            .filters select {
                min-width: 100%;
            }

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

            .field-full {
                grid-column: auto;
            }
        }
