/* Formular inscriere S+T UAPR */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f5f7fa;
    color: #1a1a2e;
    line-height: 1.6;
    min-height: 100vh;
}

.header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: white;
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header .logo { max-height: 60px; margin-bottom: 12px; }
.header h1 { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.header h2 { font-size: 16px; font-weight: 400; opacity: 0.9; }

.container {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 16px;
}

fieldset.pas {
    background: white;
    border: none;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

fieldset.pas.hidden { display: none; }

fieldset.pas legend {
    font-size: 18px;
    font-weight: 600;
    color: #1e3a5f;
    padding: 0 8px;
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; }
}

.form-group { display: flex; flex-direction: column; }

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.req { color: #dc2626; }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-group small {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
}

.form-group .error {
    font-size: 11px;
    color: #dc2626;
    margin-top: 4px;
    min-height: 14px;
}

.form-group input.invalid,
.form-group select.invalid { border-color: #dc2626; }

.audit-box {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    display: none;
}

.audit-box.show { display: block; }
.audit-box.ok { background: #dcfce7; color: #166534; border-left: 3px solid #16a34a; }
.audit-box.warn { background: #fef3c7; color: #92400e; border-left: 3px solid #f59e0b; }
.audit-box.err { background: #fee2e2; color: #991b1b; border-left: 3px solid #dc2626; }

.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.btn-primary, .btn-secondary {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.15s;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover:not(:disabled) { background: #1d4ed8; }
.btn-primary:disabled { background: #94a3b8; cursor: not-allowed; }

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-secondary:hover { background: #e2e8f0; }

.info-box {
    background: #eff6ff;
    border-left: 3px solid #2563eb;
    padding: 16px;
    border-radius: 6px;
    margin-top: 20px;
    font-size: 13px;
}

.info-box strong { display: block; margin-bottom: 8px; color: #1e3a5f; }
.info-box ol { margin-left: 20px; }
.info-box li { margin-bottom: 4px; }
.info-box a { color: #2563eb; }

.footer {
    text-align: center;
    padding: 30px 20px;
    color: #64748b;
    font-size: 12px;
}

.success-screen {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.success-screen .icon { font-size: 64px; margin-bottom: 20px; }
.success-screen h2 { color: #16a34a; margin-bottom: 12px; }
.success-screen p { color: #475569; margin-bottom: 8px; }
.success-screen .reg-num {
    font-size: 20px;
    font-weight: 700;
    color: #1e3a5f;
    background: #f1f5f9;
    padding: 12px 24px;
    border-radius: 8px;
    display: inline-block;
    margin: 16px 0;
}

/* ═══ PROGRESS BAR (6 pasi) ═══ */
.progress-bar {
    background: white;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.progress-step.active {
    background: #2563eb;
    color: white;
}

.progress-step.done {
    background: #16a34a;
    color: white;
}

.progress-label {
    text-align: center;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

/* ═══ UPLOAD DOCUMENTE ═══ */
.upload-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.upload-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    background: #fafbfc;
}

.upload-label {
    margin-bottom: 10px;
}

.upload-label strong {
    font-size: 13px;
    color: #1e3a5f;
}

.upload-label small {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

.upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    background: white;
}

.upload-zone:hover {
    border-color: #2563eb;
    background: #f0f7ff;
}

.upload-zone.filled {
    border-style: solid;
    border-color: #16a34a;
    background: #f0fdf4;
}

.upload-zone.error {
    border-color: #dc2626;
    background: #fef2f2;
}

.upload-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.upload-text {
    font-size: 12px;
    color: #64748b;
}

.upload-info {
    font-size: 11px;
    color: #16a34a;
    margin-top: 6px;
    font-weight: 600;
    word-break: break-all;
}

/* ═══ PORTOFOLIU ═══ */
.upload-portofoliu-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #fafbfc;
    transition: all 0.15s;
}

.upload-portofoliu-zone.dragover {
    border-color: #2563eb;
    background: #eff6ff;
    transform: scale(1.01);
}

.upload-portofoliu-zone .upload-text {
    font-size: 14px;
    margin-top: 8px;
}

.portofoliu-counter {
    margin-top: 16px;
    font-size: 13px;
    color: #475569;
    text-align: center;
}

.portofoliu-list {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.portofoliu-item {
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    background: white;
    text-align: center;
}

.portofoliu-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    background: #f1f5f9;
}

.portofoliu-item .file-icon {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: #f1f5f9;
    border-radius: 4px;
}

.portofoliu-item .file-name {
    font-size: 10px;
    margin-top: 4px;
    word-break: break-all;
    color: #475569;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.portofoliu-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portofoliu-item.uploading {
    opacity: 0.6;
}

.portofoliu-item.error {
    border-color: #dc2626;
    background: #fef2f2;
}

.portofoliu-item .status {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
}

/* ═══ OPIS ═══ */
.opisis-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
}

.opisis-box h3 {
    font-size: 16px;
    color: #1e3a5f;
    margin-bottom: 8px;
}

.mini-txt {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 12px;
}

.opis-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.opis-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    border-left: 3px solid #16a34a;
}

.opis-item.missing {
    border-left-color: #dc2626;
    color: #991b1b;
}

.opis-item .status-icon {
    font-size: 16px;
    font-weight: bold;
}

/* ═══ SUCCESS SCREEN — butoane ═══ */
.success-screen {
    text-align: center;
    padding: 40px 20px;
}

.success-screen .icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.success-screen h2 {
    color: #16a34a;
    font-size: 24px;
    margin-bottom: 16px;
}

.success-screen p {
    margin: 10px 0;
    color: #475569;
}

.success-screen .reg-num {
    background: #f1f5f9;
    border: 2px dashed #16a34a;
    border-radius: 8px;
    padding: 16px 24px;
    font-size: 22px;
    font-weight: 700;
    color: #1e3a5f;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    display: inline-block;
    margin: 12px 0;
}

.success-butoane {
    margin-top: 32px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.success-butoane a.btn-primary,
.success-butoane button.btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.success-butoane a.btn-primary {
    background: #2563eb;
    color: white;
}

.success-butoane a.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.success-butoane button.btn-secondary {
    background: #e2e8f0;
    color: #1e3a5f;
}

.success-butoane button.btn-secondary:hover {
    background: #cbd5e1;
    transform: translateY(-1px);
}

/* Print friendly */
@media print {
    .success-butoane { display: none; }
    .header, .footer { display: none; }
    .success-screen { padding: 20px; }
}

/* ═══ ACTIVITATE ARTISTICA (Pas 4) ═══ */
.activitate-sectiune {
    margin-bottom: 28px;
    padding: 16px;
    background: #fafbfc;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.activitate-titlu {
    font-size: 14px;
    color: #1e3a5f;
    margin-bottom: 12px;
    font-weight: 700;
}

.activitate-header {
    display: flex;
    gap: 12px;
    padding: 8px 12px;
    background: #e2e8f0;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.activitate-header .col-data {
    width: 160px;
    flex-shrink: 0;
}

.activitate-header .col-denumire {
    flex: 1;
}

.activitate-randuri {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.activitate-rand {
    display: flex;
    gap: 8px;
    align-items: center;
}

.activitate-rand .activitate-data {
    width: 160px;
    flex-shrink: 0;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
}

.activitate-rand .activitate-denumire {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
}

.activitate-rand input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.activitate-rand .btn-sterge {
    padding: 8px 10px;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.15s;
}

.activitate-rand .btn-sterge:hover {
    background: #dc2626;
    color: white;
}

.btn-adauga {
    padding: 8px 16px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.15s;
}

.btn-adauga:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-adauga:active {
    transform: translateY(0);
}
