.page-profile {
    background: radial-gradient(circle at 10% 20%, rgba(25, 118, 210, 0.08), transparent 40%),
        var(--bg);
}

.page-profile .panel {
    height: auto;
}

.page-profile .output:empty {
    display: none;
}

.conditions-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.conditions-grid .form-check {
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 8px 12px;
    border-radius: 12px;
}

.custom-conditions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.custom-condition-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.12);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
}

.custom-condition-chip button {
    border: none;
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: 14px;
}

.plate-profile-card {
    padding: 12px 14px;
    margin-bottom: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
}

.plate-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.plate-profile-actions {
    display: inline-flex;
    gap: 8px;
}

.plate-profiles-list .card {
    background: rgba(255, 255, 255, 0.9);
}

.plate-photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.plate-photo-block {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}

.plate-photo-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.plate-preview-button {
    border: none;
    background: transparent;
    padding: 0;
    cursor: zoom-in;
}

.plate-preview {
    max-width: 220px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    display: block;
}

.plate-scale-feedback {
    margin-top: 10px;
}

.plate-camera-modal .modal-content {
    background: #000;
}

.plate-camera-frame {
    position: relative;
    width: 100%;
    height: 100%;
}

.plate-camera-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.plate-camera-guide {
    position: absolute;
    top: 8%;
    left: 8%;
    right: 8%;
    bottom: 18%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    pointer-events: none;
    z-index: 4;
}

.plate-camera-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

.plate-overlay-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
}

.plate-camera-marker {
    position: absolute;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    margin-top: -7px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

.plate-camera-marker.is-ok {
    background: rgba(34, 197, 94, 0.9);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}

.plate-camera-marker.is-candidate {
    width: 10px;
    height: 10px;
    margin-left: -5px;
    margin-top: -5px;
    background: rgba(245, 158, 11, 0.9);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

.plate-camera-quad {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.plate-camera-quad polygon {
    fill: none;
    stroke: rgba(34, 197, 94, 1);
    stroke-width: 6;
    stroke-dasharray: 6 6;
    filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.6));
}

.plate-camera-status {
    position: absolute;
    left: 16px;
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.6);
    color: #fff;
    font-size: 12px;
    z-index: 6;
}

.plate-camera-a4 {
    background: rgba(30, 64, 175, 0.65);
}

.plate-camera-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #6b7280;
    box-shadow: 0 0 10px rgba(107, 114, 128, 0.8);
}

.plate-camera-text {
    font-weight: 600;
}

.plate-camera-debug {
    position: absolute;
    right: 16px;
    top: 64px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(360px, 90vw);
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-size: 12px;
    z-index: 6;
    pointer-events: auto;
    box-shadow: none;
}

.plate-camera-debug label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.plate-debug-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 10px;
}

.plate-debug-row input[type="range"] {
    width: 100%;
}

.plate-debug-value {
    font-weight: 600;
    color: #e2e8f0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

@media (max-width: 768px) {
    .plate-camera-debug {
        left: 12px;
        right: 12px;
        top: 64px;
        bottom: auto;
        width: auto;
        max-height: none;
        overflow: visible;
        z-index: 6;
    }
    .plate-camera-status {
        left: 12px;
        bottom: 12px;
        z-index: 6;
    }
}

.plate-camera-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 7;
}

.plate-camera-capture {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    z-index: 7;
}

.plate-camera-capture span {
    display: block;
    width: 54px;
    height: 54px;
    margin: 0 auto;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
}
