.pid-page {
    min-height: calc(100vh - var(--navbar-height));
    background: var(--background-light);
}

.pid-hero {
    padding: 3rem 0 1.5rem 0;
    text-align: center;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.04) 0%, transparent 100%);
}

.pid-hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.pid-hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin: 0;
}

.pid-section {
    padding: 2rem 0 3rem 0;
}

.pid-card-wrapper {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 1rem;
}

.pid-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.pid-card-header {
    padding: 1.75rem 2rem 0.75rem 2rem;
    text-align: center;
}

.pid-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 0.25rem 0;
}

.pid-card-body {
    padding: 2rem;
}

.pid-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafbfc;
    min-height: 200px;
}

.pid-dropzone:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.03);
}

.pid-dropzone.dragover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.06);
    border-style: solid;
}

.pid-dropzone-icon {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.pid-dropzone-icon svg {
    width: 48px;
    height: 48px;
}

.pid-dropzone-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 0.375rem 0;
}

.pid-dropzone-helper {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 1.25rem 0;
}

.pid-choose-btn {
    padding: 0.625rem 1.5rem;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pid-choose-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.pid-preview {
    display: none;
    text-align: center;
}

.pid-preview.show {
    display: block;
    animation: pidFadeIn 0.3s ease;
}

.pid-preview img {
    max-width: 100%;
    max-height: 240px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.75rem;
}

.pid-change-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pid-change-btn:hover {
    background: rgba(59, 130, 246, 0.06);
}

.pid-identified {
    display: none;
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-top: 1.25rem;
    animation: pidFadeIn 0.3s ease;
}

.pid-identified.show {
    display: block;
}

.pid-identified-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.pid-identified-header svg {
    width: 18px;
    height: 18px;
    color: var(--primary-dark);
}

.pid-identified-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pid-identified-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
}

.pid-identified-item {
    display: flex;
    flex-direction: column;
}

.pid-identified-key {
    font-size: 0.75rem;
    color: rgba(30, 58, 138, 0.6);
    font-weight: 500;
}

.pid-identified-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e3a8a;
}

.pid-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-light);
    font-size: 0.875rem;
}

.pid-divider::before,
.pid-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.pid-search-row {
    display: flex;
    gap: 0.75rem;
}

.pid-search-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.pid-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.pid-search-input::placeholder {
    color: var(--text-light);
}

.pid-form-group {
    margin-top: 1.5rem;
}

.pid-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.pid-form-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.pid-form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: white;
    appearance: auto;
    cursor: pointer;
}

.pid-form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.pid-cta {
    margin-top: 1.5rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.pid-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}

.pid-cta:active {
    transform: translateY(0);
}

.pid-cta:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.pid-cta svg {
    width: 20px;
    height: 20px;
}

.pid-cta-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: pidSpin 0.8s linear infinite;
    display: none;
}

@keyframes pidSpin {
    to { transform: rotate(360deg); }
}

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

.pid-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.875rem;
    display: none;
}

.pid-error.show {
    display: block;
    animation: pidFadeIn 0.3s ease;
}

.pid-loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.pid-loading-overlay.active {
    display: flex;
}

.pid-loading-content {
    text-align: center;
}

.pid-loading-content img {
    width: 72px;
    height: 72px;
    margin-bottom: 1rem;
}

.pid-loading-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
}

.pid-loading-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.pid-loading-bar-track {
    width: 200px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin: 1rem auto 0 auto;
    overflow: hidden;
}

.pid-loading-bar {
    width: 40%;
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    animation: pidLoadingSlide 1.5s ease-in-out infinite;
}

@keyframes pidLoadingSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

@media (max-width: 576px) {
    .pid-card-body {
        padding: 0 1.25rem 1.5rem 1.25rem;
    }

    .pid-card-header {
        padding: 1.5rem 1.25rem 0.5rem 1.25rem;
    }

    .pid-dropzone {
        padding: 2rem 1rem;
    }

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

    .pid-search-row {
        flex-direction: column;
    }

    .pid-identified-grid {
        grid-template-columns: 1fr;
    }
}
