@import url('https://fonts.googleapis.com/css2?family=Vazir:wght@300;400;500;700;900&display=swap');

.pp-public-container {
    max-width: 960px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Vazir', 'IRANSans', Tahoma, sans-serif;
    direction: rtl;
}

.pp-header {
    text-align: center;
    margin-bottom: 35px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #4a6cf7 0%, #6a4cf7 100%);
    border-radius: 20px;
    color: #fff;
    box-shadow: 0 15px 40px rgba(74, 108, 247, 0.4);
}
.pp-header h1 { font-size: 28px; font-weight: 900; margin: 0; text-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.pp-header p { margin: 10px 0 0; opacity: 0.9; font-size: 16px; }

.pp-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 16px;
    padding: 6px;
    margin-bottom: 35px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}
.pp-tab-btn {
    flex: 1;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s ease;
    font-family: 'Vazir', 'IRANSans', Tahoma, sans-serif;
}
.pp-tab-btn:hover { color: #4a6cf7; background: rgba(74, 108, 247, 0.08); }
.pp-tab-btn.active {
    background: linear-gradient(135deg, #4a6cf7, #6a4cf7);
    color: #fff;
    box-shadow: 0 8px 25px rgba(74, 108, 247, 0.35);
    transform: translateY(-2px);
}
.pp-tab-btn .pp-tab-icon { margin-left: 8px; font-size: 18px; }
.pp-tab-content { display: none; animation: ppFadeIn 0.4s ease; }
.pp-tab-content.active { display: block; }

.pp-form-card {
    background: #fff;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.04);
}
.pp-form-card h2 {
    font-size: 22px;
    color: #2d3436;
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f3f5;
}
.pp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 5px;
}
.pp-form-group { margin-bottom: 18px; }
.pp-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #2d3436;
}
.pp-form-group .required { color: #e74c3c; margin-right: 3px; }
.pp-form-group input, .pp-form-group select, .pp-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Vazir', 'IRANSans', Tahoma, sans-serif;
    transition: all 0.3s ease;
    background: #f8f9fa;
    box-sizing: border-box;
    color: #2d3436;
}
.pp-form-group input:focus, .pp-form-group select:focus, .pp-form-group textarea:focus {
    border-color: #4a6cf7;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(74, 108, 247, 0.12);
}
.pp-form-group textarea { resize: vertical; min-height: 80px; }
.pp-form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    padding-left: 40px;
}
.pp-form-note { color: #6c757d; font-style: italic; font-size: 14px; margin-top: 5px; }

.pp-birthdate-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}
.pp-birthdate-row select { padding: 12px 16px; }

.pp-submit-btn {
    width: 100%;
    padding: 16px 40px;
    background: linear-gradient(135deg, #4a6cf7, #6a4cf7);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
    font-family: 'Vazir', 'IRANSans', Tahoma, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(74, 108, 247, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.pp-submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(74, 108, 247, 0.45);
}
.pp-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.pp-submit-btn .btn-loader {
    display: none;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ppSpin 0.8s linear infinite;
}
.pp-submit-btn.loading .btn-text, .pp-submit-btn.loading .btn-icon { display: none; }
.pp-submit-btn.loading .btn-loader { display: block; }

#pp-register-message, #pp-error-message {
    margin-top: 18px;
    padding: 16px 20px;
    border-radius: 12px;
    display: none;
    font-weight: 500;
    font-size: 15px;
    animation: ppSlideDown 0.3s ease;
}
#pp-register-message.success {
    display: block;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #b8daff;
    border-right: 5px solid #28a745;
}
#pp-register-message.error {
    display: block;
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-right: 5px solid #dc3545;
}
#pp-error-message {
    display: block;
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-right: 5px solid #dc3545;
}

#pp-rules-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #e9ecef;
    margin: 20px 0;
}
#pp-rules-section h2 { margin-top: 0; color: #2d3436; }
.pp-rules-content {
    max-height: 300px;
    overflow-y: auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    margin: 15px 0;
    border: 1px solid #e9ecef;
    line-height: 1.8;
}
#pp-rules-section label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    font-weight: 500;
    cursor: pointer;
}
#pp-rules-section label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #4a6cf7;
    cursor: pointer;
}

.pp-total-progress {
    background: linear-gradient(135deg, #4a6cf7, #6a4cf7);
    color: #fff;
    padding: 20px;
    border-radius: 16px;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(74, 108, 247, 0.3);
}
.pp-total-progress.complete {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}
.pp-total-progress .progress-number { font-size: 32px; }

.pp-client-info {
    background: #f8f9fa;
    padding: 20px 25px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 30px;
}
.pp-client-info h3 {
    grid-column: 1 / -1;
    margin: 0 0 10px;
    color: #2d3436;
    font-size: 18px;
}
.pp-client-info p { margin: 5px 0; font-size: 14px; color: #495057; }
.pp-client-info p strong { color: #2d3436; }

.pp-plan-section {
    margin: 25px 0;
    padding: 20px 25px;
    background: #f8f9fa;
    border-radius: 16px;
    border: 1px solid #e9ecef;
}
.pp-plan-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2d3436;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}
.pp-plan-section h3 .plan-badge {
    background: linear-gradient(135deg, #4a6cf7, #6a4cf7);
    color: #fff;
    font-size: 11px;
    padding: 2px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.pp-progress-item {
    background: #fff;
    padding: 16px 20px;
    margin: 10px 0;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}
.pp-progress-item:hover { border-color: #4a6cf7; box-shadow: 0 4px 15px rgba(74, 108, 247, 0.08); }
.pp-progress-item.completed { border-right: 5px solid #28a745; }
.pp-progress-item.in-progress { border-right: 5px solid #ffc107; }

.pp-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.pp-progress-title { font-weight: 600; font-size: 15px; color: #2d3436; }
.pp-progress-number {
    font-weight: 700;
    color: #4a6cf7;
    background: rgba(74, 108, 247, 0.1);
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 14px;
}
.pp-progress-item.completed .pp-progress-number {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.pp-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}
.pp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a6cf7, #6a4cf7);
    transition: width 0.8s ease;
    border-radius: 10px;
}
.pp-progress-item.completed .pp-progress-fill {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.pp-stats-footer {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 18px 25px;
    border-radius: 14px;
    margin-top: 25px;
    text-align: center;
    font-size: 15px;
    color: #2d3436;
    border: 1px solid #dee2e6;
}
.pp-stats-footer p { margin: 0; }
.pp-stats-footer strong { color: #4a6cf7; }

.pp-custom-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    animation: ppFadeIn 0.3s ease;
}
.pp-custom-popup {
    background: #fff;
    max-width: 460px;
    width: 92%;
    padding: 45px 35px 35px;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    text-align: center;
    animation: ppSlideUp 0.4s ease;
    position: relative;
    overflow: hidden;
}
.pp-custom-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #4a6cf7, #6a4cf7, #28a745);
}
.pp-popup-icon { font-size: 64px; margin-bottom: 12px; display: block; }
.pp-custom-popup h2 { color: #2d3436; font-size: 22px; margin: 0 0 12px; font-weight: 800; }
.pp-custom-popup p { color: #6c757d; font-size: 15px; line-height: 1.8; margin: 0 0 25px; }
.pp-popup-btn {
    background: linear-gradient(135deg, #4a6cf7, #6a4cf7);
    color: #fff;
    border: none;
    padding: 14px 45px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Vazir', 'IRANSans', Tahoma, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(74, 108, 247, 0.4);
}
.pp-popup-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 35px rgba(74, 108, 247, 0.5); }

.pp-loading {
    text-align: center;
    padding: 50px 20px;
    color: #6c757d;
    font-size: 16px;
}
.pp-loading:after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    border: 3px solid #e9ecef;
    border-top-color: #4a6cf7;
    border-radius: 50%;
    animation: ppSpin 0.8s linear infinite;
    vertical-align: middle;
}
.pp-error {
    text-align: center;
    padding: 30px 20px;
    color: #dc3545;
    font-size: 16px;
    background: #f8d7da;
    border-radius: 12px;
}

@keyframes ppFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ppSlideUp { from { opacity: 0; transform: translateY(30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes ppSlideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ppSpin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
    .pp-form-row { grid-template-columns: 1fr; gap: 0; }
    .pp-birthdate-row { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
    .pp-client-info { grid-template-columns: 1fr; gap: 5px; }
    .pp-tab-btn { font-size: 14px; padding: 12px 10px; }
    .pp-tab-btn .pp-tab-icon { margin-left: 5px; font-size: 16px; }
    .pp-form-card { padding: 20px; }
    .pp-header h1 { font-size: 22px; }
    .pp-custom-popup { padding: 30px 20px 25px; }
    .pp-total-progress { font-size: 18px; padding: 15px; }
    .pp-total-progress .progress-number { font-size: 26px; }
}
@media (max-width: 480px) {
    .pp-birthdate-row { grid-template-columns: 1fr; gap: 0; }
    .pp-tabs { flex-direction: column; gap: 4px; border-radius: 12px; }
    .pp-tab-btn { border-radius: 8px; }
    .pp-header { padding: 20px 15px; border-radius: 14px; }
    .pp-header h1 { font-size: 18px; }
}
/* ===== مشخصات فنی ===== */
.pp-technical-info {
    background: #f8f9fa;
    padding: 20px 25px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}
.pp-technical-info h3 {
    margin: 0 0 15px;
    color: #2d3436;
    font-size: 18px;
}
.pp-tech-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 30px;
}
.pp-tech-item {
    padding: 6px 0;
    font-size: 14px;
    color: #495057;
    border-bottom: 1px dashed #e9ecef;
}
.pp-tech-item strong {
    color: #2d3436;
    margin-left: 8px;
}

@media (max-width: 768px) {
    .pp-tech-grid {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}