#sp-app {
    max-width: 680px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1a1a2e;
}

.sp-header { margin-bottom: 24px; }

.sp-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #1a1a2e;
}

.sp-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.sp-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.sp-tab {
    padding: 7px 16px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: transparent;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.sp-tab:hover { background: #f5f5f5; }

.sp-tab-active {
    background: #f0f0f0;
    color: #1a1a2e;
    border-color: #bbb;
    font-weight: 500;
}

.sp-panel textarea {
    width: 100%;
    min-height: 160px;
    padding: 12px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    color: #1a1a2e;
    resize: vertical;
    line-height: 1.6;
    box-sizing: border-box;
}

.sp-panel textarea:focus {
    outline: none;
    border-color: #1a1a2e;
}

.sp-dropzone {
    display: block;
    border: 1px dashed #ccc;
    border-radius: 10px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    background: #fafafa;
    transition: background 0.15s;
}

.sp-dropzone:hover { background: #f0f0f0; }

.sp-drop-icon { margin-bottom: 10px; }

.sp-drop-main {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.sp-drop-sub {
    font-size: 12px;
    color: #888;
}

.sp-file-preview {
    margin-top: 10px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
}

.sp-btn-analyze {
    margin-top: 14px;
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid #1a1a2e;
    border-radius: 10px;
    background: #1a1a2e;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.15s;
    font-family: inherit;
}

.sp-btn-analyze:hover { opacity: 0.85; }
.sp-btn-analyze:disabled { opacity: 0.4; cursor: not-allowed; }

.sp-error {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fff2f2;
    border: 1px solid #fcc;
    border-radius: 8px;
    font-size: 13px;
    color: #c00;
}

.sp-result {
    margin-top: 24px;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
}

.sp-result-section {
    border-bottom: 1px solid #e8e8e8;
}

.sp-result-section:last-of-type { border-bottom: none; }

.sp-result-label {
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sp-label-green { background: #f0fbf6; color: #085041; }
.sp-label-purple { background: #f3f2fe; color: #3C3489; }
.sp-label-orange { background: #fef5ed; color: #712B13; }

.sp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sp-dot-green { background: #1D9E75; }
.sp-dot-purple { background: #7F77DD; }
.sp-dot-orange { background: #D85A30; }

.sp-result-body {
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.75;
    color: #1a1a2e;
    white-space: pre-wrap;
}

.sp-result-footer {
    padding: 10px 16px;
    background: #f9f9f9;
    border-top: 1px solid #e8e8e8;
    font-size: 12px;
    color: #888;
    font-style: italic;
}

.sp-loading {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 14px 16px;
}

.sp-loading-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ccc;
    animation: sp-pulse 1.2s ease-in-out infinite;
}

.sp-loading-dot:nth-child(2) { animation-delay: 0.2s; }
.sp-loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes sp-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.sp-hidden { display: none !important; }

@media (max-width: 480px) {
    .sp-title { font-size: 18px; }
    .sp-tabs { flex-direction: column; }
    .sp-tab { text-align: center; }
}

/* GDPR notice */
.sp-gdpr-notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 16px;
    background: #EBF4FD;
    border: 1px solid #B5D4F4;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #0C447C;
    line-height: 1.6;
}

.sp-gdpr-notice a { color: #185FA5; }

/* Consent checkbox */
.sp-consent-wrap {
    margin-top: 14px;
    margin-bottom: 4px;
}

.sp-consent-label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    cursor: pointer;
}

.sp-consent-label input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.sp-consent-label a { color: #185FA5; }
