.ap-wrap {
    --ap-background: #ffffff;
    --ap-foreground: #020817;
    --ap-card: #ffffff;
    --ap-card-foreground: #020817;
    --ap-muted: #f8fafc;
    --ap-muted-foreground: #64748b;
    --ap-border: #e2e8f0;
    --ap-input: #e2e8f0;
    --ap-primary: #0f172a;
    --ap-primary-foreground: #f8fafc;
    --ap-secondary: #f1f5f9;
    --ap-secondary-foreground: #0f172a;
    --ap-success: #15803d;
    --ap-success-bg: #dcfce7;
    --ap-destructive: #dc2626;
    --ap-destructive-bg: #fef2f2;
    --ap-ring: #0f172a;
    --ap-radius: 10px;
    --ap-radius-sm: 8px;
    --ap-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    --ap-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
    color: var(--ap-foreground);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0 auto;
    max-width: 1280px;
}

.ap-wrap *,
.ap-wrap *::before,
.ap-wrap *::after {
    box-sizing: border-box;
}

.ap-wrap h1,
.ap-wrap h2,
.ap-wrap h3,
.ap-wrap h4,
.ap-wrap p {
    margin-top: 0;
}

.ap-wrap h1 {
    color: var(--ap-foreground);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.08;
    margin-bottom: 1.5rem;
}

.ap-wrap h2 {
    color: var(--ap-foreground);
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.ap-wrap h3 {
    color: var(--ap-foreground);
    font-size: 1.125rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.ap-wrap p {
    color: var(--ap-muted-foreground);
    line-height: 1.65;
}

.ap-qr-scanner-page {
    max-width: 1120px;
}

.ap-qr-scanner {
    padding: 1.75rem;
}

.ap-qr-scanner-head {
    margin-bottom: 1.25rem;
}

.ap-qr-scanner-head p {
    max-width: 760px;
}

.ap-qr-scanner-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.ap-qr-scanner-preview-wrap {
    align-items: center;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #020817 0%, #0f172a 100%);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    display: flex;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.ap-qr-scanner-video {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.ap-qr-scanner-overlay {
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.ap-qr-scanner-overlay span {
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 18px;
    box-shadow: 0 0 0 999px rgba(2, 6, 23, 0.32);
    height: min(68vw, 250px);
    left: 50%;
    max-height: 68%;
    max-width: 68%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(68vw, 250px);
}

.ap-qr-scanner-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.ap-qr-scanner-side {
    display: grid;
    gap: 1rem;
}

.ap-qr-manual-panel {
    display: grid;
    gap: 0.85rem;
}

.ap-qr-manual-form {
    background: #fff;
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
}

.ap-qr-scanner-status {
    margin: 0;
}

@media (min-width: 768px) {
    .ap-qr-scanner-layout {
        grid-template-columns: 1fr;
    }

    .ap-qr-scanner-stage {
        display: none;
    }

    .ap-qr-scanner-side {
        gap: 1rem;
        max-width: 640px;
    }

    .ap-qr-scanner-status {
        display: none;
    }

    .ap-qr-manual-toggle {
        display: none;
    }

    .ap-qr-manual-close {
        display: none;
    }

    .ap-qr-manual-form,
    .ap-qr-manual-form[hidden] {
        display: grid !important;
    }
}

.ap-qr-manual-label {
    align-content: start;
    color: #334155;
    display: grid;
    font-size: 0.875rem;
    font-weight: 600;
    gap: 0.45rem;
}

.ap-qr-manual-input {
    appearance: none;
    background: var(--ap-background);
    border: 1px solid var(--ap-input);
    border-radius: var(--ap-radius-sm);
    color: var(--ap-foreground);
    font: inherit;
    min-height: 48px;
    outline: none;
    padding: 0.85rem 0.95rem;
}

.ap-qr-manual-input:focus {
    border-color: var(--ap-ring);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.ap-qr-manual-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ap-grid,
.ap-stats {
    display: grid;
    gap: 1rem;
}

.ap-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1.25rem;
}

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

.ap-card,
.ap-login-card,
.ap-profile-card,
.ap-machine-card,
.ap-table-wrap,
.ap-service-panel,
.ap-machine-detail-panel {
    background: var(--ap-card);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    box-shadow: var(--ap-shadow);
    color: var(--ap-card-foreground);
}

.ap-card,
.ap-login-card,
.ap-profile-card,
.ap-machine-card {
    padding: 1.5rem;
}

.ap-card strong,
.ap-profile-card strong,
.ap-machine-card strong,
.ap-service-panel strong {
    color: var(--ap-foreground);
}

.ap-customer-dashboard .ap-service-panel {
    align-content: start;
    display: grid;
    gap: 0.95rem;
    padding: 1rem;
}

.ap-customer-dashboard .ap-service-panel.is-empty {
    align-content: start;
    grid-auto-rows: min-content;
}

.ap-customer-dashboard .ap-service-empty-notice {
    align-self: start;
    margin: 0;
    min-height: 0;
}

.ap-customer-dashboard .ap-service-item {
    background: #f8fafc;
    border: 1px solid #dbe4f0;
    border-radius: 16px;
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.ap-customer-dashboard .ap-service-item-summary,
.ap-customer-dashboard .ap-service-meta {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.ap-customer-dashboard .ap-service-meta {
    flex: 1 1 auto;
    min-width: 0;
}

.ap-customer-dashboard .ap-service-badge {
    background: #e8f0ff;
    border: 1px solid #d6e4ff;
    border-radius: 999px;
    color: #0f172a;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.48rem 0.8rem;
}

.ap-customer-dashboard .ap-service-meta time {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 700;
    margin-left: auto;
}

.ap-customer-dashboard .ap-service-title-text {
    display: block;
    font-size: 1.05rem;
    line-height: 1.35;
}

.ap-customer-dashboard .ap-service-upload {
    color: #64748b;
    margin: 0;
}

.ap-customer-dashboard .ap-service-item-toggle {
    flex: 0 0 auto;
    height: 32px;
    width: 32px;
}

.ap-customer-dashboard .ap-service-item-detail {
    border-top: 1px solid #dbe4f0;
    display: grid;
    gap: 0.9rem;
    padding-top: 0.9rem;
}

.ap-customer-dashboard .ap-service-item-detail[hidden] {
    display: none !important;
}

.ap-customer-dashboard .ap-service-item-detail .ap-service-detail-lines-expanded {
    gap: 0.8rem;
    grid-template-columns: 1fr;
}

.ap-customer-dashboard .ap-service-item-detail .ap-service-detail-lines-expanded .ap-service-detail-line {
    min-height: 72px;
    padding: 0.9rem 1rem 0.75rem;
}

.ap-customer-dashboard .ap-service-attachment {
    color: var(--ap-primary);
    font-weight: 700;
    text-decoration: none;
}

.ap-customer-dashboard .ap-service-attachment:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ap-service-panel-admin {
    align-content: start;
    display: grid;
    gap: 0.95rem;
}

.ap-service-panel-admin.is-empty {
    align-content: start;
    grid-auto-rows: min-content;
}

.ap-service-panel-admin .ap-service-empty-notice {
    align-self: start;
    margin: 0;
    min-height: 0;
}

.ap-service-panel-admin .ap-service-item-admin {
    background: #f8fafc;
    border: 1px solid #dbe4f0;
    border-radius: 16px;
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.ap-service-panel-admin .ap-service-item-summary,
.ap-service-panel-admin .ap-service-meta {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.ap-service-panel-admin .ap-service-meta {
    flex: 1 1 auto;
    min-width: 0;
}

.ap-service-panel-admin .ap-service-badge {
    background: #e8f0ff;
    border: 1px solid #d6e4ff;
    border-radius: 999px;
    color: #0f172a;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.48rem 0.8rem;
}

.ap-service-panel-admin .ap-service-meta time {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 700;
    margin-left: auto;
}

.ap-service-panel-admin .ap-service-title-text {
    display: block;
    font-size: 1.05rem;
    line-height: 1.35;
}

.ap-service-panel-admin .ap-service-upload {
    color: #64748b;
    margin: 0;
}

.ap-service-panel-admin .ap-service-item-toggle {
    flex: 0 0 auto;
    height: 32px;
    width: 32px;
}

.ap-service-panel-admin .ap-service-item-detail {
    border-top: 1px solid #dbe4f0;
    display: grid;
    gap: 0.9rem;
    padding-top: 0.9rem;
}

.ap-service-panel-admin .ap-service-item-detail[hidden] {
    display: none !important;
}

.ap-service-panel-admin .ap-service-detail-lines-expanded {
    gap: 0.8rem;
    grid-template-columns: 1fr;
}

.ap-service-panel-admin .ap-service-detail-lines-expanded .ap-service-detail-line {
    min-height: 72px;
    padding: 0.9rem 1rem 0.75rem;
}

.ap-service-panel-admin .ap-service-attachment {
    color: var(--ap-primary);
    font-weight: 700;
    text-decoration: none;
}

.ap-service-panel-admin .ap-service-attachment:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ap-stats .ap-card {
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    display: grid;
    gap: 0.35rem;
    isolation: isolate;
    min-height: 118px;
    overflow: hidden;
    padding: 1.25rem;
    position: relative;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.ap-stats .ap-card::before {
    background: linear-gradient(180deg, #2563eb, #7c3aed);
    border-radius: 999px;
    content: "";
    height: 44px;
    left: 1.25rem;
    opacity: 0.9;
    position: absolute;
    top: 1.25rem;
    width: 4px;
}

.ap-stats .ap-card::after {
    background: rgba(37, 99, 235, 0.08);
    border-radius: 999px;
    content: "";
    height: 84px;
    position: absolute;
    right: -28px;
    top: -26px;
    width: 84px;
    z-index: -1;
}

.ap-stats .ap-card:nth-child(2)::before {
    background: linear-gradient(180deg, #16a34a, #22c55e);
}

.ap-stats .ap-card:nth-child(2)::after {
    background: rgba(34, 197, 94, 0.1);
}

.ap-stats .ap-card:nth-child(3)::before {
    background: linear-gradient(180deg, #f97316, #facc15);
}

.ap-stats .ap-card:nth-child(3)::after {
    background: rgba(249, 115, 22, 0.1);
}

.ap-stats .ap-card:nth-child(4)::before {
    background: linear-gradient(180deg, #ef4444, #f97316);
}

.ap-stats .ap-card:nth-child(4)::after {
    background: rgba(239, 68, 68, 0.1);
}

.ap-stats .ap-card:hover {
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
}

.ap-stats .ap-card p,
.ap-stats .ap-card span {
    color: var(--ap-muted-foreground);
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.35;
    margin: 0;
    padding-left: 0.85rem;
    text-transform: uppercase;
}

.ap-stats .ap-card h2,
.ap-stats .ap-card strong {
    color: var(--ap-foreground);
    display: block;
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 750;
    letter-spacing: -0.05em;
    line-height: 1;
    margin: 0;
    padding-left: 0.85rem;
}

.ap-staff-main .ap-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ap-form,
.ap-machine-form,
.ap-assign-form {
    display: grid;
    gap: 1rem;
}

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

.ap-machine-form,
.ap-assign-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ap-form label,
.ap-machine-form label,
.ap-assign-form label,
.ap-search label {
    align-content: start;
    align-self: start;
    color: #334155;
    display: grid;
    font-size: 0.875rem;
    font-weight: 600;
    gap: 0.45rem;
    letter-spacing: -0.01em;
}

.ap-form input,
.ap-form textarea,
.ap-form select,
.ap-machine-form input,
.ap-machine-form textarea,
.ap-machine-form select,
.ap-assign-form input,
.ap-assign-form textarea,
.ap-assign-form select,
.ap-search input,
.ap-search select,
.ap-login-card input {
    appearance: none;
    background: var(--ap-background);
    border: 1px solid var(--ap-input);
    border-radius: var(--ap-radius-sm);
    color: var(--ap-foreground);
    font: inherit;
    font-size: 0.95rem;
    min-height: 42px;
    outline: none;
    padding: 0.6rem 0.8rem;
    transition: border-color 140ms ease, box-shadow 140ms ease;
    width: 100%;
}

.ap-form textarea,
.ap-machine-form textarea,
.ap-assign-form textarea {
    min-height: 96px;
    resize: vertical;
}

.ap-form select,
.ap-machine-form select,
.ap-assign-form select {
    background-image:
        linear-gradient(45deg, transparent 50%, #64748b 50%),
        linear-gradient(135deg, #64748b 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 13px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 2.5rem;
}

.ap-form input:focus,
.ap-form textarea:focus,
.ap-form select:focus,
.ap-machine-form input:focus,
.ap-machine-form textarea:focus,
.ap-machine-form select:focus,
.ap-assign-form input:focus,
.ap-assign-form textarea:focus,
.ap-assign-form select:focus,
.ap-search input:focus,
.ap-login-card input:focus {
    border-color: var(--ap-ring);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12);
}

.ap-wrap input[type="checkbox"],
.ap-wrap input[type="radio"] {
    appearance: auto;
    border-radius: 0;
    box-shadow: none;
    display: inline-block;
    min-height: auto;
    padding: 0;
    width: auto;
}

.ap-wrap input[type="checkbox"]:focus,
.ap-wrap input[type="radio"]:focus {
    box-shadow: none;
}

.ap-login-card .login-remember label {
    align-items: center;
    color: var(--ap-muted-foreground);
    display: inline-flex;
    font-size: 0.95rem;
    gap: 0.5rem;
}

.ap-field-wide,
.ap-field-status {
    grid-column: span 2;
}

.ap-button,
.ap-logout-button,
.ap-wrap button,
.ap-wrap input[type="submit"] {
    align-items: center;
    appearance: none;
    background: var(--ap-primary);
    border: 1px solid var(--ap-primary);
    border-radius: var(--ap-radius-sm);
    color: var(--ap-primary-foreground) !important;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    gap: 0.5rem;
    justify-content: center;
    min-height: 42px;
    padding: 0.6rem 1rem;
    text-decoration: none;
    transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
    width: fit-content;
}

.ap-button:hover,
.ap-logout-button:hover,
.ap-wrap button:hover,
.ap-wrap input[type="submit"]:hover {
    background: #1e293b;
    border-color: #1e293b;
    color: var(--ap-primary-foreground) !important;
    transform: translateY(-1px);
}

.ap-button:focus-visible,
.ap-logout-button:focus-visible,
.ap-wrap button:focus-visible,
.ap-wrap input[type="submit"]:focus-visible {
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.18);
    outline: none;
}

.ap-button-secondary {
    background: var(--ap-secondary);
    border-color: var(--ap-border);
    color: var(--ap-secondary-foreground) !important;
}

.ap-button-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: var(--ap-secondary-foreground) !important;
}

.ap-certificate-button {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff !important;
}

.ap-certificate-button:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff !important;
}

.ap-button-danger {
    background: var(--ap-destructive);
    border-color: var(--ap-destructive);
    color: #ffffff !important;
}

.ap-button-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.ap-search {
    align-items: end;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 260px) auto;
    margin: 1rem 0;
}

.ap-search-select {
    min-width: 220px;
}

.ap-form > .ap-grid,
.ap-machine-form > .ap-grid,
.ap-assign-form > .ap-grid,
.ap-machine-grid {
    align-items: start;
}

.ap-table-wrap {
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    box-shadow: var(--ap-shadow);
    margin: 1rem 0 1.5rem;
    overflow-x: auto;
    padding: 0;
}

.ap-table {
    background: var(--ap-background);
    border: 0 !important;
    border-collapse: collapse;
    border-spacing: 0;
    color: var(--ap-foreground);
    font-size: 0.925rem;
    min-width: 760px;
    table-layout: auto;
    width: 100%;
}

.ap-table th,
.ap-table td {
    background: transparent;
    border-left: 0 !important;
    border-right: 0 !important;
    border-top: 0 !important;
    border-bottom: 1px solid var(--ap-border) !important;
    line-height: 1.5;
    padding: 0.8rem 1rem;
    text-align: left;
    vertical-align: middle;
}

.ap-table th {
    background: #f8fafc !important;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ap-table th.ap-sortable {
    padding: 0 !important;
}

.ap-sort-link,
.ap-table th.is-sortable {
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 100%;
    padding: 0.8rem 1rem;
    position: relative;
    text-decoration: none;
    transition: color 140ms ease;
    user-select: none;
    width: 100%;
}

.ap-sort-link:hover,
.ap-table th.is-sortable:hover {
    color: #0f172a;
}

.ap-sort-link::after,
.ap-table th.is-sortable::after {
    color: #94a3b8;
    content: "↕";
    display: inline-block;
    font-size: 0.8rem;
    vertical-align: middle;
}

.ap-sort-link.is-active.is-asc::after,
.ap-table th.is-sortable.is-sorted-asc::after {
    color: #1e293b;
    content: "↑";
}

.ap-sort-link.is-active.is-desc::after,
.ap-table th.is-sortable.is-sorted-desc::after {
    color: #1e293b;
    content: "↓";
}

.ap-table tr:last-child td {
    border-bottom: 0 !important;
}

.ap-table tbody tr:hover td {
    background: #f8fafc;
}

.ap-table a {
    color: var(--ap-primary);
    font-weight: 650;
    text-decoration: none;
}

.ap-inline-form {
    display: inline;
    margin: 0;
}

.ap-inline-form button.ap-action-link {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin: 0;
}

.ap-inline-form button.ap-action-delete {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 999px;
    color: #b91c1c !important;
    font-size: 0.78rem;
    font-weight: 750;
    min-height: 28px;
    padding: 0.35rem 0.65rem;
    white-space: nowrap;
}

.ap-inline-form button.ap-action-delete:hover {
    filter: brightness(0.97);
}

.ap-table a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ap-service-history-expand-col {
    text-align: center !important;
    width: 68px;
}

.ap-service-history-expand-button {
    align-items: center;
    appearance: none;
    background: #ffffff;
    border: 1px solid #dbe4f0;
    border-radius: 999px;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    padding: 0;
    transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
    width: 34px;
}

.ap-service-history-expand-button:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.ap-service-history-expand-button[aria-expanded="true"] {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.ap-service-history-expand-button[aria-expanded="true"] .ap-service-history-expand-icon {
    color: #1d4ed8;
}

.ap-service-history-expand-icon {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.ap-service-history-detail-row td {
    background: #fbfdff !important;
    border-bottom: 1px solid #dbe4f0 !important;
    padding: 0 !important;
}

.ap-service-history-detail-row:hover td {
    background: #fbfdff !important;
}

.ap-service-history-detail-cell {
    padding: 0 !important;
}

.ap-service-history-detail-panel {
    padding: 1rem 1.1rem 1.1rem;
}

.ap-service-history-summary-row td[data-label]::before {
    content: none;
}

.ap-service-detail-lines-expanded {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 1.2rem;
}

.ap-service-detail-lines-expanded .ap-service-detail-line {
    align-content: start;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    justify-content: flex-start;
    min-height: 78px;
    padding: 1rem 1rem 0.8rem;
}

.ap-service-detail-lines-expanded .ap-service-detail-line span,
.ap-service-detail-lines-expanded .ap-service-detail-line strong {
    display: block;
    flex: 0 0 auto;
    line-height: 1.35;
}

.ap-service-detail-lines-expanded .ap-service-detail-line span {
    line-height: 1.35;
    margin: 0;
    padding-top: 0.2rem;
}

.ap-service-detail-lines-expanded .ap-service-detail-line strong {
    font-size: 0.98rem;
    margin: 0;
    word-break: break-word;
}

.ap-service-count-badge {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 750;
    gap: 0.35rem;
    line-height: 1;
    min-height: 28px;
    padding: 0.4rem 0.7rem;
    white-space: nowrap;
}

.ap-service-count-badge::before {
    border-radius: 999px;
    content: "";
    display: inline-block;
    height: 8px;
    width: 8px;
}

.ap-service-count-badge.is-red {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.ap-service-count-badge.is-red::before {
    background: #ef4444;
}

.ap-service-count-badge.is-yellow {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

.ap-service-count-badge.is-yellow::before {
    background: #f59e0b;
}

.ap-service-count-badge.is-green {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #047857;
}

.ap-service-count-badge.is-green::before {
    background: #22c55e;
}

.ap-table-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ap-action-link {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1;
    min-height: 28px;
    padding: 0.35rem 0.65rem;
    text-decoration: none !important;
    white-space: nowrap;
}

.ap-action-edit {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #334155 !important;
}

.ap-action-view {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8 !important;
}

.ap-action-reset {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309 !important;
}

.ap-action-warning {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c !important;
}

.ap-action-success {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #047857 !important;
}

.ap-action-delete {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c !important;
}

.ap-action-link:hover {
    filter: brightness(0.97);
}

.ap-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ap-qr-result {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 1.25rem;
}

.ap-qr-result h3 {
    margin-bottom: 0.35rem;
}

.ap-qr-result img {
    background: #fff;
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    height: 180px;
    padding: 0.5rem;
    width: 180px;
}

.ap-qr-url {
    align-items: center;
    display: flex;
    gap: 0.6rem;
    margin-top: 0.85rem;
}

.ap-qr-url input {
    background: var(--ap-muted);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    color: var(--ap-foreground);
    flex: 1;
    font: inherit;
    min-height: 42px;
    padding: 0.6rem 0.75rem;
}

.ap-certificate-result {
    margin-bottom: 1.25rem;
}

.ap-certificate-result-success {
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.ap-certificate-result-success h3,
.ap-certificate-result-success p,
.ap-certificate-result-success .ap-eyebrow {
    color: #166534;
}

.ap-certificate-result-success .ap-certificate-actions input {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.ap-certificate-result h3 {
    margin-bottom: 0.35rem;
}

.ap-certificate-actions {
    align-items: center;
    display: flex;
    gap: 0.6rem;
    margin-top: 0.85rem;
}

.ap-certificate-actions input {
    background: var(--ap-muted);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    color: var(--ap-foreground);
    flex: 1;
    font: inherit;
    min-height: 42px;
    padding: 0.6rem 0.75rem;
}

.ap-detail-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.ap-detail-actions .ap-button {
    min-height: 38px;
    padding: 0.5rem 0.8rem;
}

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

.ap-card-header h3,
.ap-card-header h4 {
    margin-bottom: 0;
}

.ap-card-subtitle {
    color: var(--ap-muted);
    font-size: 0.95rem;
    margin: 0.35rem 0 0;
}

.ap-card-header .ap-button {
    min-height: 36px;
    padding: 0.45rem 0.75rem;
}

.ap-service-machine-detail {
    display: grid;
    gap: 1.25rem;
}

.ap-service-machine-summary {
    margin-top: 1.25rem;
}

.ap-service-form-panel {
    display: none;
}

.ap-service-form-panel.is-open {
    display: block;
}

.ap-actions .ap-button {
    min-height: 36px;
    padding: 0.45rem 0.75rem;
}

.ap-actions .ap-button:disabled,
.ap-actions .ap-button[disabled],
.ap-actions .ap-button.is-disabled,
.ap-actions .ap-assign-submit.is-disabled,
.ap-actions .ap-assign-submit:disabled,
.ap-actions .ap-assign-submit[disabled] {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    box-shadow: none;
    color: #64748b !important;
    cursor: not-allowed;
    opacity: 1;
    transform: none;
}

.ap-actions .ap-button:disabled:hover,
.ap-actions .ap-button[disabled]:hover,
.ap-actions .ap-button.is-disabled:hover,
.ap-actions .ap-assign-submit.is-disabled:hover,
.ap-actions .ap-assign-submit:disabled:hover,
.ap-actions .ap-assign-submit[disabled]:hover {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    color: #64748b !important;
    filter: none;
    transform: none;
}

.ap-notice,
.ap-success,
.ap-error {
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    margin: 1rem 0;
    padding: 0.85rem 1rem;
}

.ap-notice {
    background: var(--ap-muted);
    color: #334155;
}

.ap-success {
    background: var(--ap-success-bg);
    border-color: #bbf7d0;
    color: #166534;
}

.ap-error {
    background: var(--ap-destructive-bg);
    border-color: #fecaca;
    color: #991b1b;
}

.ap-login-card {
    margin: 2rem auto;
    max-width: 460px;
    padding: 1.75rem;
}

.ap-login-wrap {
    padding: 1rem;
}

.ap-login-heading {
    border-bottom: 1px solid var(--ap-border);
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
}

.ap-login-heading span {
    color: var(--ap-muted-foreground);
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.ap-login-heading h2 {
    margin-bottom: 0.35rem;
}

.ap-login-heading p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.ap-login-card form,
.ap-login-form {
    display: grid;
    gap: 1rem;
}

.ap-login-card p {
    margin: 0;
}

.ap-login-card label {
    color: var(--ap-foreground);
    display: grid;
    font-size: 0.9rem;
    font-weight: 650;
    gap: 0.45rem;
}

.ap-login-card .ap-button {
    margin-top: 0.25rem;
    width: 100%;
}

.ap-login-card .login-remember label {
    align-items: center;
    color: var(--ap-muted-foreground);
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 550;
    gap: 0.55rem;
}

.ap-login-card .login-remember input[type="checkbox"] {
    accent-color: var(--ap-primary);
    height: 16px;
    width: 16px;
}

.ap-login-card .login-submit {
    padding-top: 0.25rem;
}

.ap-login-switcher {
    background: linear-gradient(180deg, #eef2f7 0%, #e8edf5 100%);
    border: 1px solid #cfd8e3;
    border-radius: var(--ap-radius-sm);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    display: grid;
    gap: 0.25rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1rem;
    padding: 0.25rem;
}

.ap-login-switcher a {
    align-items: center;
    border-radius: 7px;
    color: #475569;
    display: inline-flex;
    font-size: 0.98rem;
    font-weight: 750;
    justify-content: center;
    min-height: 44px;
    text-decoration: none;
    transition: background 140ms ease, box-shadow 140ms ease, color 140ms ease, transform 140ms ease;
}

.ap-login-switcher a:hover {
    background: rgba(255, 255, 255, 0.72);
    color: var(--ap-foreground);
}

.ap-login-switcher a.is-active {
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08), inset 0 0 0 1px rgba(37, 99, 235, 0.18);
    color: #0f172a;
    transform: translateY(-1px);
}

.ap-dashboard-tabs > input[type="radio"] {
    display: none;
}

.ap-dashboard-tabs {
    min-width: 0;
    overflow: hidden;
}

.ap-tab-list {
    background: var(--ap-muted);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding: 0.25rem;
}

.ap-tab-list label {
    align-items: center;
    border-radius: 7px;
    color: var(--ap-muted-foreground);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.9rem;
    font-weight: 700;
    justify-content: center;
    min-height: 38px;
    padding: 0.55rem 0.9rem;
    transition: background 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.ap-tab-list label:hover {
    color: var(--ap-foreground);
}

.ap-tab-panel {
    display: none;
    min-width: 0;
}

.ap-tab-panel h3 {
    margin-bottom: 0.75rem;
}

#ap-tab-assigned:checked ~ .ap-tab-list label[for="ap-tab-assigned"],
#ap-tab-on-warranty:checked ~ .ap-tab-list label[for="ap-tab-on-warranty"],
#ap-tab-stock:checked ~ .ap-tab-list label[for="ap-tab-stock"],
#ap-tab-customers:checked ~ .ap-tab-list label[for="ap-tab-customers"],
#ap-tech-tab-assigned:checked ~ .ap-tab-list label[for="ap-tech-tab-assigned"],
#ap-tech-tab-on-warranty:checked ~ .ap-tab-list label[for="ap-tech-tab-on-warranty"],
#ap-tech-tab-stock:checked ~ .ap-tab-list label[for="ap-tech-tab-stock"],
#ap-tech-tab-expired:checked ~ .ap-tab-list label[for="ap-tech-tab-expired"] {
    background: var(--ap-background);
    box-shadow: var(--ap-shadow);
    color: var(--ap-foreground);
}

#ap-tab-assigned:checked ~ .ap-tab-panel-assigned,
#ap-tab-on-warranty:checked ~ .ap-tab-panel-on-warranty,
#ap-tab-stock:checked ~ .ap-tab-panel-stock,
#ap-tab-customers:checked ~ .ap-tab-panel-customers,
#ap-tech-tab-assigned:checked ~ .ap-tab-panel-assigned,
#ap-tech-tab-on-warranty:checked ~ .ap-tab-panel-on-warranty,
#ap-tech-tab-stock:checked ~ .ap-tab-panel-stock,
#ap-tech-tab-expired:checked ~ .ap-tab-panel-expired {
    display: block;
}

.ap-dashboard-tabs .ap-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.ap-dashboard-tabs .ap-table {
    min-width: 1180px;
}

.ap-dashboard-tabs .ap-table th,
.ap-dashboard-tabs .ap-table td {
    padding: 0.8rem 0.85rem;
}

.ap-dashboard-tabs .ap-table td {
    word-break: normal;
}

.ap-card-search {
    margin-bottom: 1rem;
}

.ap-card-search-summary {
    color: var(--ap-muted-foreground);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.55rem;
}

.ap-card-search-input {
    background: var(--ap-background);
    border: 1px solid var(--ap-input);
    border-radius: var(--ap-radius-sm);
    color: var(--ap-foreground);
    font: inherit;
    min-height: 44px;
    outline: none;
    padding: 0.65rem 0.9rem;
    transition: border-color 140ms ease, box-shadow 140ms ease;
    width: 100%;
}

.ap-card-search-input:focus {
    border-color: var(--ap-ring);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12);
}

.ap-range-tabs {
    align-items: center;
    background: var(--ap-muted);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.25rem;
}

.ap-range-tabs a {
    border-radius: 7px;
    color: var(--ap-muted-foreground);
    font-size: 0.88rem;
    font-weight: 700;
    min-height: 36px;
    padding: 0.55rem 0.8rem;
    text-decoration: none;
}

.ap-range-tabs a.is-active {
    background: var(--ap-background);
    box-shadow: var(--ap-shadow);
    color: var(--ap-foreground);
}

.ap-activity-toolbar {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.ap-activity-filter {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.ap-activity-filter-separator {
    color: var(--ap-muted-foreground);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 42px;
    text-transform: uppercase;
}

.ap-activity-filter label {
    display: grid;
    gap: 0.35rem;
}

.ap-activity-filter label span {
    color: var(--ap-muted-foreground);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ap-activity-filter input[type="date"] {
    background: var(--ap-background);
    border: 1px solid var(--ap-input);
    border-radius: var(--ap-radius-sm);
    color: var(--ap-foreground);
    font: inherit;
    min-height: 42px;
    padding: 0.6rem 0.8rem;
}

.ap-activity-card {
    display: grid;
    gap: 1rem;
}

.ap-activity-chart-wrap {
    overflow-x: auto;
    padding-bottom: 0.35rem;
}

.ap-activity-category-summary {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ap-activity-category-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--ap-radius-sm);
    display: grid;
    gap: 0.3rem;
    padding: 1rem 1.1rem;
}

.ap-activity-category-card span {
    color: var(--ap-muted-foreground);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ap-activity-category-card strong {
    color: var(--ap-foreground);
    font-size: 1.8rem;
    line-height: 1;
}

.ap-activity-category-card small {
    color: var(--ap-muted-foreground);
    font-size: 0.8rem;
    font-weight: 600;
}

.ap-activity-category-card-total {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    border-color: #0f172a;
}

.ap-activity-category-card-total span,
.ap-activity-category-card-total small,
.ap-activity-category-card-total strong {
    color: #fff;
}

.ap-activity-chart {
    align-items: end;
    column-gap: 0.7rem;
    display: grid;
    grid-auto-columns: minmax(26px, 1fr);
    grid-auto-flow: column;
    min-height: 240px;
    min-width: max(100%, calc(var(--ap-activity-count, 30) * 34px));
    padding: 0.75rem 0 0.25rem;
}

.ap-activity-col {
    align-items: center;
    color: inherit;
    display: grid;
    gap: 0.45rem;
    justify-items: center;
    text-decoration: none;
}

.ap-activity-value {
    color: var(--ap-muted-foreground);
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
}

.ap-activity-bar-track {
    align-items: end;
    background: #eef2f7;
    border-radius: 4px;
    display: grid;
    height: 168px;
    overflow: hidden;
    width: 20px;
}

.ap-activity-bar {
    background: linear-gradient(180deg, #334155 0%, #1e293b 55%, #0f172a 100%);
    border-radius: 2px 2px 0 0;
    min-height: 10px;
    transition: filter 140ms ease, transform 140ms ease, background 140ms ease;
    width: 100%;
}

.ap-activity-col:hover .ap-activity-bar {
    background: linear-gradient(180deg, #475569 0%, #334155 55%, #1e293b 100%);
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.ap-activity-col.is-active .ap-activity-bar-track {
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.12);
}

.ap-activity-col.is-active .ap-activity-label {
    color: var(--ap-foreground);
    font-weight: 800;
}

.ap-activity-label {
    color: var(--ap-muted-foreground);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.ap-activity-details {
    display: grid;
    gap: 1rem;
}

.ap-activity-report-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.ap-activity-report-filter {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ap-activity-report-filter label {
    display: grid;
    gap: 0.35rem;
}

.ap-activity-report-filter label span {
    color: var(--ap-muted-foreground);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.ap-activity-report-filter input[type="month"] {
    background: var(--ap-background);
    border: 1px solid var(--ap-input);
    border-radius: var(--ap-radius-sm);
    color: var(--ap-foreground);
    font: inherit;
    min-height: 42px;
    padding: 0.6rem 0.8rem;
}

.ap-activity-report-sheet {
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 1rem;
    margin: 0 auto;
    max-width: 1120px;
    padding: 1.5rem;
}

.ap-activity-report-header {
    align-items: start;
    border-bottom: 1px solid #e2e8f0;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
    padding-bottom: 1rem;
}

.ap-activity-report-header h1 {
    font-size: 2rem;
    line-height: 1.05;
    margin: 0.25rem 0 0.5rem;
}

.ap-activity-report-header p {
    color: var(--ap-muted-foreground);
    margin: 0;
}

.ap-activity-report-header-meta {
    display: grid;
    gap: 0.75rem;
}

.ap-activity-report-header-meta > div,
.ap-activity-report-highlight-list > div,
.ap-activity-report-ranked-item {
    align-items: start;
    display: grid;
    gap: 0.2rem;
}

.ap-activity-report-header-meta span,
.ap-activity-report-highlight-list span,
.ap-activity-report-ranked-item span {
    color: var(--ap-muted-foreground);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.ap-activity-report-header-meta strong,
.ap-activity-report-highlight-list strong,
.ap-activity-report-ranked-item strong {
    color: var(--ap-foreground);
    font-size: 0.96rem;
    line-height: 1.4;
}

.ap-activity-report-kpis {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ap-activity-report-kpi,
.ap-activity-report-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem 1.1rem;
}

.ap-activity-report-kpi span,
.ap-activity-report-panel-head p,
.ap-activity-report-category-item span,
.ap-activity-report-ranked-item em,
.ap-activity-report-kpi small {
    color: var(--ap-muted-foreground);
}

.ap-activity-report-kpi span,
.ap-activity-report-category-item span {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
}

.ap-activity-report-kpi strong {
    color: var(--ap-foreground);
    display: block;
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.ap-activity-report-kpi small {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
}

.ap-activity-report-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ap-activity-report-panel-head {
    margin-bottom: 0.85rem;
}

.ap-activity-report-panel-head h2 {
    font-size: 1.05rem;
    margin: 0 0 0.35rem;
}

.ap-activity-report-panel-head p {
    font-size: 0.88rem;
    margin: 0;
}

.ap-activity-report-highlight-list,
.ap-activity-report-ranked-list,
.ap-activity-report-category-list {
    display: grid;
    gap: 0.75rem;
}

.ap-activity-report-category-item {
    align-items: center;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding-top: 0.75rem;
}

.ap-activity-report-category-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.ap-activity-report-category-item strong {
    display: block;
    font-size: 1rem;
}

.ap-activity-report-category-item em {
    color: var(--ap-foreground);
    font-size: 1.2rem;
    font-style: normal;
    font-weight: 800;
}

.ap-activity-report-ranked-item {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.75rem;
}

.ap-activity-report-ranked-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.ap-activity-report-ranked-item em {
    font-size: 0.82rem;
    font-style: normal;
    font-weight: 700;
}

.ap-activity-report-panel-wide {
    width: 100%;
}

.ap-activity-report-timeline {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
}

.ap-activity-report-timeline-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: grid;
    gap: 0.2rem;
    padding: 0.75rem;
}

.ap-activity-report-timeline-item span {
    color: var(--ap-muted-foreground);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.ap-activity-report-timeline-item strong {
    color: var(--ap-foreground);
    font-size: 1.1rem;
}

.ap-activity-report-table-wrap {
    overflow-x: auto;
}

.ap-activity-report-table {
    border-collapse: collapse;
    min-width: 960px;
    width: 100%;
}

.ap-activity-report-table th,
.ap-activity-report-table td {
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.84rem;
    padding: 0.8rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.ap-activity-report-table th {
    color: var(--ap-muted-foreground);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.ap-activity-detail-list {
    display: grid;
    gap: 0.9rem;
}

.ap-activity-detail-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--ap-radius-sm);
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.ap-activity-detail-head {
    align-items: start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.ap-activity-detail-head span {
    color: var(--ap-muted-foreground);
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.ap-activity-detail-head strong {
    color: var(--ap-foreground);
    display: block;
    font-size: 1rem;
    line-height: 1.35;
}

.ap-assigned-card-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ap-assigned-card {
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.95), #ffffff 48%),
        var(--ap-background);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    box-shadow: var(--ap-shadow);
    display: grid;
    gap: 0.8rem;
    overflow: hidden;
    padding: 1rem;
    position: relative;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.ap-assigned-card::before {
    background: linear-gradient(90deg, #2563eb, #7c3aed, #06b6d4);
    content: "";
    height: 3px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.ap-assigned-card:hover {
    border-color: rgba(37, 99, 235, 0.25);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
}

.ap-assigned-card[hidden] {
    display: none;
}

.ap-assigned-card-head {
    align-items: start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.ap-assigned-card-head span,
.ap-assigned-card-title span,
.ap-assigned-card-meta span,
.ap-assigned-card-details span {
    color: var(--ap-muted-foreground);
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.ap-assigned-card-head strong {
    color: var(--ap-foreground);
    display: block;
    font-size: 1.05rem;
    line-height: 1.25;
}

.ap-machine-warranty-state {
    align-items: center;
    display: inline-flex;
    gap: 0.45rem;
    margin-top: 0.45rem;
}

.ap-machine-warranty-state > span:last-child {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.ap-machine-warranty-dot {
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 auto;
    height: 0.55rem;
    width: 0.55rem;
}

.ap-machine-warranty-state.is-active {
    color: #15803d;
}

.ap-machine-warranty-state.is-active .ap-machine-warranty-dot {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.ap-machine-warranty-state.is-ended {
    color: #64748b;
}

.ap-machine-warranty-state.is-ended .ap-machine-warranty-dot {
    background: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.14);
}

.ap-assigned-card-head .ap-button {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8 !important;
    min-height: 34px;
    padding: 0.4rem 0.65rem;
}

.ap-assigned-card-head .ap-button:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff !important;
}

.ap-assigned-card-title {
    border-bottom: 1px solid var(--ap-border);
    border-top: 1px solid var(--ap-border);
    padding: 0.85rem 0;
}

.ap-assigned-card-title h4 {
    color: var(--ap-foreground);
    font-size: 1.25rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1.25;
    margin: 0;
}

.ap-assigned-card-details {
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: calc(var(--ap-radius-sm) - 2px);
    display: grid;
    gap: 0;
    padding: 0.15rem 0.85rem;
}

.ap-assigned-card-details > div {
    align-items: start;
    border-bottom: 1px solid #e5edf6;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 88px minmax(0, 1fr);
    padding: 0.72rem 0;
}

.ap-assigned-card-details > div:last-child {
    border-bottom: 0;
}

.ap-assigned-card-details span {
    margin: 0.18rem 0 0;
}

.ap-assigned-card-details strong {
    color: var(--ap-foreground);
    display: block;
    font-size: 0.95rem;
    font-weight: 450;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.ap-assigned-card-details > div:last-child strong {
    display: -webkit-box;
    line-height: 1.45;
    max-height: calc(1.45em * 2);
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ap-assigned-card-meta {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ap-assigned-card-meta > div {
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: calc(var(--ap-radius-sm) - 2px);
    min-height: auto;
    padding: 0.7rem;
}

.ap-assigned-card-meta strong {
    color: var(--ap-foreground);
    display: block;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.ap-assigned-card-wide {
    grid-column: 1 / -1;
}

.ap-assigned-card-address {
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: calc(var(--ap-radius-sm) - 2px);
    padding: 0.75rem;
}

.ap-assigned-card-address span {
    color: var(--ap-muted-foreground);
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.ap-assigned-card-address strong {
    color: var(--ap-foreground);
    display: -webkit-box;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.45;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ap-autocomplete {
    position: relative;
}

.ap-autocomplete-list {
    background: var(--ap-background);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    box-shadow: var(--ap-shadow-md);
    display: none;
    left: 0;
    margin-top: 0.35rem;
    max-height: 260px;
    overflow-y: auto;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 20;
}

.ap-autocomplete-list.is-open {
    display: block;
}

.ap-autocomplete-item {
    border-bottom: 1px solid var(--ap-border);
    color: var(--ap-foreground);
    cursor: pointer;
    padding: 0.75rem 0.85rem;
}

.ap-autocomplete-item:last-child {
    border-bottom: 0;
}

.ap-autocomplete-item:hover,
.ap-autocomplete-item.is-active {
    background: var(--ap-muted);
}

.ap-wrap a {
    color: var(--ap-primary);
}

.ap-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 16px;
}

.ap-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #d9e2ef;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    transition: all 0.2s ease;
}

.ap-pagination-link:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.ap-pagination-link.is-active {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

.ap-card-pagination .ap-pagination-link {
    background: #ffffff !important;
    border-color: #d9e2ef !important;
    color: #0f172a !important;
}

.ap-card-pagination .ap-pagination-link:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
    transform: none;
}

.ap-card-pagination .ap-pagination-link.is-active {
    background: #0f172a !important;
    border-color: #0f172a !important;
    color: #ffffff !important;
}

.ap-pagination-ellipsis {
    align-items: center;
    color: #64748b;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    height: 40px;
    justify-content: center;
    min-width: 40px;
    padding: 0 4px;
}

@media print {
    @page {
        margin: 8mm;
        size: A4 portrait;
    }

    html,
    body {
        background: #ffffff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .ap-activity-report-toolbar {
        display: none !important;
    }

    .ap-wrap.ap-service-activity-report-page {
        max-width: none !important;
        margin: 0 auto !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .ap-activity-report-sheet {
        background: #ffffff !important;
        border: 1px solid #dbe3ee !important;
        border-radius: 8px !important;
        box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08) !important;
        display: grid !important;
        gap: 0.7rem !important;
        margin: 0 auto !important;
        max-width: none;
        padding: 0.9rem !important;
        width: 100% !important;
    }

    .ap-activity-report-panel,
    .ap-activity-report-kpi {
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        break-inside: avoid;
        page-break-inside: avoid;
        padding: 0.7rem 0.8rem !important;
    }

    .ap-activity-report-header {
        align-items: start !important;
        display: grid !important;
        gap: 0.85rem !important;
        grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.85fr) !important;
        padding-bottom: 0.7rem !important;
    }

    .ap-activity-report-kpis {
        display: grid !important;
        gap: 0.65rem !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    .ap-activity-report-grid {
        display: grid !important;
        gap: 0.7rem !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .ap-activity-report-header h1 {
        font-size: 1.6rem !important;
        margin: 0.15rem 0 0.3rem !important;
    }

    .ap-activity-report-header p,
    .ap-activity-report-panel-head p {
        font-size: 0.8rem !important;
    }

    .ap-activity-report-header-meta {
        gap: 0.45rem !important;
    }

    .ap-activity-report-header-meta span,
    .ap-activity-report-highlight-list span,
    .ap-activity-report-ranked-item span,
    .ap-activity-report-kpi span,
    .ap-activity-report-category-item span,
    .ap-activity-report-timeline-item span,
    .ap-activity-report-table th {
        font-size: 0.62rem !important;
    }

    .ap-activity-report-header-meta strong,
    .ap-activity-report-highlight-list strong,
    .ap-activity-report-ranked-item strong {
        font-size: 0.84rem !important;
        line-height: 1.28 !important;
    }

    .ap-activity-report-kpi strong {
        font-size: 1.65rem !important;
        margin-bottom: 0.2rem !important;
    }

    .ap-activity-report-kpi small,
    .ap-activity-report-ranked-item em {
        font-size: 0.72rem !important;
    }

    .ap-activity-report-panel-head {
        margin-bottom: 0.55rem !important;
    }

    .ap-activity-report-panel-head h2 {
        font-size: 0.92rem !important;
        margin-bottom: 0.2rem !important;
    }

    .ap-activity-report-highlight-list,
    .ap-activity-report-ranked-list,
    .ap-activity-report-category-list {
        gap: 0.45rem !important;
    }

    .ap-activity-report-highlight-list > div,
    .ap-activity-report-ranked-item {
        gap: 0.1rem !important;
    }

    .ap-activity-report-category-item,
    .ap-activity-report-ranked-item {
        padding-top: 0.45rem !important;
    }

    .ap-activity-report-category-item strong {
        font-size: 0.9rem !important;
    }

    .ap-activity-report-category-item em {
        font-size: 1rem !important;
    }

    .ap-activity-report-timeline {
        gap: 0.35rem !important;
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    }

    .ap-activity-report-timeline-item {
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        gap: 0.1rem !important;
        padding: 0.45rem !important;
    }

    .ap-activity-report-timeline-item strong {
        font-size: 0.88rem !important;
    }

    .ap-activity-report-table-wrap {
        overflow: visible !important;
    }

    .ap-activity-report-table {
        border-collapse: collapse !important;
        min-width: 0;
        width: 100% !important;
    }

    .ap-activity-report-table th,
    .ap-activity-report-table td {
        font-size: 9.5px !important;
        line-height: 1.3 !important;
        padding: 5px 4px !important;
    }

    .ap-activity-report-table thead {
        display: table-header-group;
    }

    .ap-activity-report-table tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .ap-activity-report-category-item,
    .ap-activity-report-ranked-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

@media (max-width: 1100px) {
    .ap-qr-scanner-layout {
        grid-template-columns: 1fr;
    }

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

    .ap-activity-category-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ap-machine-form,
    .ap-assign-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .ap-activity-report-header,
    .ap-activity-report-kpis,
    .ap-activity-report-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .ap-wrap {
        max-width: 100%;
    }

    .ap-card,
    .ap-login-card {
        padding: 1rem;
    }

    .ap-grid,
    .ap-stats,
    .ap-activity-category-summary,
    .ap-form,
    .ap-machine-form,
    .ap-assign-form {
        grid-template-columns: 1fr;
    }

    .ap-field-wide,
    .ap-field-status {
        grid-column: auto;
    }

    .ap-search {
        grid-template-columns: 1fr;
    }

    .ap-search .ap-button {
        width: 100%;
    }

    .ap-detail-actions {
        justify-content: stretch;
        width: 100%;
    }

    .ap-detail-actions .ap-button {
        flex: 1 1 100%;
    }

    .ap-card-header {
        align-items: stretch;
        flex-direction: column;
        gap: 0.75rem;
    }

    .ap-range-tabs {
        width: 100%;
    }

    .ap-range-tabs a {
        flex: 1 1 0;
        text-align: center;
    }

    .ap-activity-toolbar,
    .ap-activity-filter {
        align-items: stretch;
        width: 100%;
    }

    .ap-activity-filter-separator {
        line-height: 1;
        padding: 0.15rem 0;
        text-align: center;
        width: 100%;
    }

    .ap-activity-filter label,
    .ap-activity-filter input[type="date"],
    .ap-activity-filter .ap-button {
        width: 100%;
    }

    .ap-card-header .ap-button {
        width: 100%;
    }

    .ap-button,
    .ap-logout-button {
        width: 100%;
    }

    .ap-assigned-card-head {
        align-items: stretch;
        flex-direction: column;
    }

    .ap-assigned-card-head .ap-button {
        width: 100%;
    }

    .ap-assigned-card-meta {
        grid-template-columns: 1fr;
    }

    .ap-assigned-card-details > div {
        gap: 0.35rem;
        grid-template-columns: 1fr;
    }

    .ap-assigned-card-grid {
        grid-template-columns: 1fr;
    }

    .ap-qr-result {
        grid-template-columns: 1fr;
    }

    .ap-qr-scanner {
        padding: 1rem;
    }

    .ap-qr-scanner-actions {
        flex-wrap: wrap;
    }

    .ap-qr-scanner-actions .ap-button,
    .ap-qr-scanner-actions .ap-button-secondary,
    .ap-qr-go {
        width: 100%;
    }

    .ap-qr-result img {
        justify-self: start;
    }

    .ap-qr-url {
        align-items: stretch;
        flex-direction: column;
    }

    .ap-activity-report-toolbar,
    .ap-activity-report-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .ap-activity-report-header,
    .ap-activity-report-kpis,
    .ap-activity-report-grid {
        grid-template-columns: 1fr;
    }

    .ap-activity-report-filter {
        align-items: stretch;
        width: 100%;
    }

    .ap-activity-report-filter label,
    .ap-activity-report-filter input[type="month"],
    .ap-activity-report-filter .ap-button,
    .ap-activity-report-back {
        width: 100%;
    }

    .ap-activity-report-sheet {
        padding: 1rem;
    }

    .ap-certificate-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .ap-pagination {
        justify-content: flex-start;
    }

    .ap-service-history-table,
    .ap-service-history-table thead,
    .ap-service-history-table tbody {
        display: block;
        min-width: 0 !important;
        width: 100%;
    }

    .ap-service-history-table {
        table-layout: fixed;
    }

    .ap-service-history-table-wrap {
        overflow-x: visible;
    }

    .ap-service-history-table thead {
        display: none;
    }

    .ap-service-history-table tbody {
        display: grid;
        gap: 0.9rem;
    }

    .ap-service-history-table .ap-service-history-summary-row,
    .ap-service-history-table .ap-service-history-detail-row {
        display: block;
        width: 100%;
    }

    .ap-service-history-table .ap-service-history-summary-row {
        background: #ffffff;
        border: 1px solid var(--ap-border);
        border-radius: var(--ap-radius);
        box-shadow: var(--ap-shadow);
        overflow: hidden;
        padding: 0.9rem;
        position: relative;
    }

    .ap-service-history-table .ap-service-history-summary-row td {
        align-items: start;
        border: 0;
        display: grid;
        gap: 0.22rem;
        padding: 0;
        width: 100%;
    }

    .ap-service-history-table .ap-service-history-summary-row td + td {
        margin-top: 0.75rem;
    }

    .ap-service-history-table .ap-service-history-summary-row td[data-label]::before {
        color: #64748b;
        content: attr(data-label);
        display: block;
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.12em;
        line-height: 1.25;
        margin-bottom: 0.12rem;
        text-transform: uppercase;
    }

    .ap-service-history-table .ap-service-history-summary-row .ap-service-history-expand-col {
        align-items: center;
        display: flex;
        justify-content: flex-end;
        margin-bottom: 0.35rem;
        text-align: right !important;
        width: 100%;
    }

    .ap-service-history-table .ap-service-history-summary-row .ap-service-history-expand-button {
        position: relative;
        z-index: 2;
    }

    .ap-service-history-table .ap-service-history-summary-row .ap-service-history-expand-col::before {
        display: none;
    }

    .ap-service-history-table .ap-service-history-summary-row .ap-table-actions {
        gap: 0.5rem;
    }

    .ap-service-history-table .ap-service-history-summary-row .ap-inline-form {
        display: inline-flex;
    }

    .ap-service-history-table .ap-service-history-detail-row[hidden] {
        display: none;
    }

    .ap-service-history-table .ap-service-history-detail-row {
        margin-top: -0.4rem;
    }

    .ap-service-history-table .ap-service-history-detail-row td,
    .ap-service-history-table .ap-service-history-detail-row .ap-service-history-detail-cell {
        border: 0;
        display: block;
        padding: 0;
        width: 100%;
    }

    .ap-service-history-table .ap-service-history-detail-panel {
        border: 1px solid var(--ap-border);
        border-radius: 18px;
        padding: 0.85rem 0.9rem;
    }

    .ap-service-machine-summary .ap-card-header h3,
    .ap-service-machine-summary .ap-card-subtitle {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .ap-service-machine-summary .ap-card-header .ap-button {
        white-space: normal;
    }
}
.ap-service-extended-fields {
  display: none;
}

.ap-service-extended-fields.is-open {
  display: grid;
}

.ap-service-mode-banner {
  align-items: start;
  background: #f8fafc;
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  display: grid;
  gap: 6px;
  padding: 16px 18px;
}

.ap-service-mode-banner strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.ap-service-mode-banner span {
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.ap-service-mode-banner.is-extended {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.22);
}

.ap-service-mode-banner.is-basic {
  background: #f8fafc;
  border-color: #dbe4f0;
}

.ap-service-category-field {
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  width: 100%;
}

.ap-service-category-field .ap-label {
  color: #0f172a;
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.ap-service-category-picker {
  align-items: stretch;
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  width: 100%;
}

.ap-service-category-option {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  width: 100%;
}

.ap-service-category-radio {
  height: 1px;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.ap-service-category-picker .ap-service-category-card {
  align-items: flex-start;
  background: #fff;
  border: 1px solid #dbe4f0;
  box-sizing: border-box;
  border-radius: 20px;
  color: #0f172a !important;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  isolation: isolate;
  justify-content: flex-start;
  min-height: 116px;
  overflow: hidden;
  padding: 16px 18px;
  position: relative;
  text-align: left;
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease, background-color .14s ease;
  white-space: normal;
  width: 100%;
  z-index: 0;
}

.ap-service-category-card:hover {
  border-color: rgba(37, 99, 235, 0.28);
  transform: translateY(-1px);
}

.ap-service-category-card.is-selected,
.ap-service-category-radio:checked + .ap-service-category-card {
  background: rgba(37, 99, 235, 0.05);
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ap-service-category-radio:focus-visible + .ap-service-category-card {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.ap-service-category-card__title {
  color: #0f172a;
  display: block;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.ap-service-category-card__desc {
  color: #64748b;
  display: block;
  font-size: 13px;
  line-height: 1.5;
}

.ap-service-section-title {
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ap-service-entry-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ap-service-entry-form > h3,
.ap-service-entry-form > .ap-notice,
.ap-service-entry-form > .ap-actions {
  grid-column: 1 / -1;
}

.ap-service-entry-form > .ap-grid {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
}

.ap-service-primary-fields {
  align-self: stretch;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  width: 100%;
}

.ap-service-mode-banner {
  grid-column: 1 / 5;
  width: 100%;
}

.ap-service-entry-form.is-basic-mode .ap-service-mode-banner {
  gap: 4px;
  padding: 14px 18px;
}

.ap-service-field-title {
  grid-column: span 2;
}

.ap-service-field-date,
.ap-service-field-upload-by,
.ap-service-field-documentation {
  grid-column: span 1;
}

.ap-service-field-note {
  grid-column: span 3;
}

.ap-service-extended-fields {
  grid-column: 1 / 5;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ap-service-category-field,
.ap-service-field-note {
  grid-column: 1 / 5;
}

.ap-service-field-problem {
  grid-column: span 2;
}

.ap-service-field-task,
.ap-service-field-result {
  grid-column: span 1;
}

.ap-service-entry-form textarea[name="note"] {
  min-height: 142px;
}

.ap-service-primary-fields .ap-service-field-title {
  grid-column: 1 / 3;
  min-width: 0;
}

.ap-service-primary-fields .ap-service-field-date {
  grid-column: 3 / 4;
  min-width: 0;
}

.ap-service-primary-fields .ap-service-field-upload-by {
  grid-column: 4 / 5;
  min-width: 0;
}

.ap-service-primary-fields .ap-service-field-title input,
.ap-service-primary-fields .ap-service-field-date input,
.ap-service-primary-fields .ap-service-field-upload-by input {
  min-width: 0;
}

.ap-service-entry-form.is-basic-mode .ap-service-field-note {
  grid-column: 1 / 5;
  grid-row: 2;
}

.ap-service-entry-form.is-basic-mode .ap-service-primary-fields {
  align-self: stretch;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}

.ap-service-entry-form.is-basic-mode .ap-service-primary-fields .ap-service-field-title,
.ap-service-entry-form.is-basic-mode .ap-service-primary-fields .ap-service-field-date,
.ap-service-entry-form.is-basic-mode .ap-service-primary-fields .ap-service-field-upload-by {
  align-self: stretch;
  grid-column: span 1;
  width: 100%;
}

.ap-service-entry-form.is-basic-mode .ap-service-field-documentation {
  grid-column: 1 / 5;
  grid-row: 3;
}

.ap-service-entry-form.is-basic-mode .ap-service-field-note textarea {
  min-height: 120px;
}

.ap-service-entry-form.is-basic-mode .ap-service-field-documentation input[type="file"] {
  min-height: 52px;
  padding: 0.7rem 0.8rem;
}

.ap-service-entry-form.is-extended-mode .ap-service-mode-banner {
  gap: 4px;
  padding: 14px 18px;
}

.ap-service-entry-form.is-extended-mode .ap-service-extended-fields {
  grid-column: 1 / -1;
  grid-row: 2;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ap-service-entry-form.is-extended-mode .ap-service-section-title {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.ap-service-entry-form.is-extended-mode .ap-service-field-problem {
  grid-column: span 1;
}

.ap-service-entry-form.is-extended-mode .ap-service-field-task {
  grid-column: span 1;
}

.ap-service-entry-form.is-extended-mode .ap-service-field-result {
  grid-column: span 1;
}

.ap-service-entry-form.is-extended-mode .ap-service-field-problem textarea {
  min-height: 156px;
}

.ap-service-entry-form.is-extended-mode .ap-service-field-task textarea,
.ap-service-entry-form.is-extended-mode .ap-service-field-result textarea {
  min-height: 156px;
}

.ap-service-entry-form.is-extended-mode .ap-service-field-note {
  grid-column: 1 / 5;
  grid-row: 3;
}

.ap-service-entry-form.is-extended-mode .ap-service-field-note textarea {
  min-height: 120px;
}

.ap-service-entry-form.is-extended-mode .ap-service-field-documentation {
  grid-column: 1 / 5;
  grid-row: 4;
  align-self: start;
}

.ap-service-entry-form.is-extended-mode .ap-service-field-documentation input[type="file"] {
  min-height: 52px;
  padding: 0.7rem 0.8rem;
}

.ap-service-field-problem textarea,
.ap-service-field-task textarea,
.ap-service-field-result textarea {
  min-height: 128px;
}

.ap-service-detail-lines {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ap-service-detail-line {
  display: grid;
  gap: 4px;
}

.ap-service-detail-line span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #64748b;
}

.ap-service-detail-line strong {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.55;
}

.ap-service-detail-lines-table:not(.ap-service-detail-lines-expanded) .ap-service-detail-line {
  align-items: start;
  gap: 3px;
  padding: 0.15rem 0;
}

.ap-service-detail-lines-table:not(.ap-service-detail-lines-expanded) .ap-service-detail-line span {
  letter-spacing: .12em;
  line-height: 1.35;
}

.ap-service-detail-lines-table:not(.ap-service-detail-lines-expanded) .ap-service-detail-line strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 1180px) {
  .ap-service-entry-form > .ap-grid,
  .ap-service-primary-fields,
  .ap-service-extended-fields,
  .ap-service-entry-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ap-service-category-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ap-service-field-title,
  .ap-service-field-upload-by,
  .ap-service-field-date,
  .ap-service-field-documentation,
  .ap-service-field-note,
  .ap-service-mode-banner,
  .ap-service-field-problem,
  .ap-service-field-result,
  .ap-service-entry-form > h3,
  .ap-service-entry-form > .ap-notice,
  .ap-service-entry-form > .ap-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .ap-service-category-picker {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ap-service-entry-form,
  .ap-service-entry-form > .ap-grid,
  .ap-service-primary-fields,
  .ap-service-extended-fields {
    grid-template-columns: 1fr;
  }

  .ap-service-field-title,
  .ap-service-field-date,
  .ap-service-field-upload-by,
  .ap-service-field-documentation,
  .ap-service-field-note,
  .ap-service-field-problem,
  .ap-service-field-task,
  .ap-service-field-result {
    grid-column: 1 / -1;
  }

  .ap-service-entry-form.is-basic-mode .ap-service-field-title,
  .ap-service-entry-form.is-basic-mode .ap-service-field-upload-by,
  .ap-service-entry-form.is-basic-mode .ap-service-field-date,
  .ap-service-entry-form.is-basic-mode .ap-service-field-documentation,
  .ap-service-entry-form.is-basic-mode .ap-service-field-note {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .ap-service-entry-form.is-extended-mode .ap-service-field-title,
  .ap-service-entry-form.is-extended-mode .ap-service-field-date,
  .ap-service-entry-form.is-extended-mode .ap-service-field-upload-by,
  .ap-service-entry-form.is-extended-mode .ap-service-extended-fields,
  .ap-service-entry-form.is-extended-mode .ap-service-field-problem,
  .ap-service-entry-form.is-extended-mode .ap-service-field-task,
  .ap-service-entry-form.is-extended-mode .ap-service-field-result,
  .ap-service-entry-form.is-extended-mode .ap-service-field-note,
  .ap-service-entry-form.is-extended-mode .ap-service-field-documentation {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .ap-service-primary-fields .ap-service-field-title,
  .ap-service-primary-fields .ap-service-field-date,
  .ap-service-primary-fields .ap-service-field-upload-by {
    grid-column: 1 / -1;
  }

  .ap-service-detail-lines-expanded {
    grid-template-columns: 1fr;
  }
}
