/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}
.container { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }

/* Header */
.header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 30px 0;
    text-align: center;
}
.logo { font-size: 28px; font-weight: 700; margin-bottom: 5px; }
.tagline { font-size: 15px; color: #aab; }

/* Main */
.main { padding: 40px 0; min-height: 60vh; }
.step { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

h2 { font-size: 24px; color: #1a1a2e; margin-bottom: 15px; text-align: center; }
.description { text-align: center; color: #666; margin-bottom: 30px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Check form */
.check-form { max-width: 600px; margin: 0 auto 30px; }
.input-group {
    display: flex;
    gap: 10px;
    background: white;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.input-group input {
    flex: 1;
    border: none;
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 8px;
    outline: none;
}
.input-group input::placeholder { color: #aaa; }
.error-text { color: #dc3545; font-size: 14px; margin-top: 8px; text-align: center; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-primary { background: #e94560; color: white; }
.btn-primary:hover { background: #d63451; }
.btn-primary:disabled { background: #ccc; cursor: not-allowed; }
.btn-secondary { background: #16213e; color: white; }
.btn-secondary:hover { background: #0f1a2e; }
.btn-outline { background: white; color: #1a1a2e; border: 2px solid #1a1a2e; }
.btn-outline:hover { background: #f0f2f5; }
.btn-text { background: none; color: #666; padding: 8px; }
.btn-text:hover { color: #333; }
.btn-large { padding: 16px 32px; font-size: 16px; width: 100%; }
.btn-full { width: 100%; }

/* Features */
.features {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}
.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-size: 14px;
}
.feature-icon { font-size: 20px; }

/* Progress */
.progress-container { max-width: 500px; margin: 30px auto; }
.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e94560, #1a1a2e);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
}
.progress-text { text-align: center; color: #666; margin-top: 12px; font-size: 14px; }
.progress-detail { text-align: center; color: #999; font-size: 13px; }

/* Results summary */
.results-summary {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.summary-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
}
.stat { text-align: center; }
.stat-number { display: block; font-size: 32px; font-weight: 700; color: #1a1a2e; }
.stat-label { font-size: 13px; color: #888; }
.compliance-text { text-align: center; font-weight: 600; font-size: 15px; }
.compliance-good { color: #28a745; }
.compliance-medium { color: #ffc107; }
.compliance-poor { color: #fd7e14; }
.compliance-critical { color: #dc3545; }

/* Violations list */
.violations-list { margin-bottom: 20px; }
.violation-card {
    background: white;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    border-left: 4px solid #e94560;
}
.violation-card.severity-medium { border-left-color: #ffc107; }
.violation-card.severity-low { border-left-color: #17a2b8; }
.violation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.violation-type { font-weight: 600; font-size: 14px; }
.severity-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.severity-high { background: #dc3545; color: white; }
.severity-medium { background: #ffc107; color: #333; }
.severity-low { background: #17a2b8; color: white; }
.violation-text { font-style: italic; color: #e94560; margin: 6px 0; font-size: 14px; }
.violation-law { font-size: 12px; color: #0f3460; margin-top: 6px; }
.violation-recommendation { font-size: 13px; color: #555; margin-top: 6px; }

/* Locked section */
.locked-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.lock-overlay { position: relative; z-index: 1; }
.lock-icon { font-size: 40px; display: block; margin-bottom: 10px; }
.locked-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0,0,0,0.02) 10px, rgba(0,0,0,0.02) 20px);
}

/* Action buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}
.modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}
.modal h3 { text-align: center; margin-bottom: 8px; }
.modal-subtitle { text-align: center; color: #666; font-size: 14px; margin-bottom: 20px; }

/* Invoice tabs */
.invoice-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}
.tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: #f5f5f5;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}
.tab-btn.active {
    background: #1a1a2e;
    color: white;
}
.tab-btn:hover:not(.active) {
    background: #e8e8e8;
}

/* Upload area */
.upload-area {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: border-color 0.2s;
}
.upload-area:hover {
    border-color: #e94560;
}
.upload-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}
.upload-area input[type="file"] {
    display: block;
    margin: 12px auto;
    font-size: 14px;
}
.upload-area .btn {
    margin-top: 10px;
}
.upload-status {
    text-align: center;
    color: #666;
    font-size: 15px;
    padding: 30px 0;
}

/* Form */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; color: #555; }
.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
}
.form-group input:focus { border-color: #e94560; outline: none; box-shadow: 0 0 0 3px rgba(233,69,96,0.1); }
.form-group input::placeholder { color: #bbb; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.hint { font-size: 12px; color: #999; margin-top: 4px; }

/* Invoice success */
.invoice-success {
    text-align: center;
    margin-bottom: 20px;
}
.success-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}
.success-text { text-align: center; font-size: 18px; font-weight: 600; margin-bottom: 5px; }
.success-detail { text-align: center; font-size: 14px; color: #666; }
.invoice-note {
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-top: 15px;
    line-height: 1.5;
}
.invoice-note a { color: #e94560; }

/* Footer */
.footer {
    background: #1a1a2e;
    color: #aab;
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
}
.footer-links {
    margin: 8px 0;
}
.footer-links a {
    color: #8899bb;
    text-decoration: none;
    font-size: 12px;
}
.footer-links a:hover {
    color: #e94560;
    text-decoration: underline;
}
.footer-sep {
    color: #556;
    margin: 0 8px;
}
.disclaimer { margin-top: 8px; font-size: 11px; color: #778; }

/* Responsive */
@media (max-width: 600px) {
    .input-group { flex-direction: column; }
    .input-group button { width: 100%; }
    .summary-stats { flex-direction: column; gap: 15px; }
    .form-row { flex-direction: column; gap: 0; }
    .features { flex-direction: column; align-items: center; }
    .invoice-tabs { flex-direction: column; }
    .modal-content { padding: 20px; }
}
