* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #fcfcfd;
    color: #333;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.app-container {
    display: flex;
    width: 100%;
    flex: 1;
    min-height: 0;
    position: relative;
}

.form-panel {
    width: 50%;
    height: 100%;
    overflow-y: auto;
    padding: 24px;
    background: #ffffff;
    transition: width 0.4s ease;
}

.form-panel.expanded {
    width: 100%;
}

.gov-header {
    background-image: linear-gradient(265deg, #4a1e9e, #560080);
    color: white;
    padding: 12px 24px;
    width: 100%;
    flex-shrink: 0;
}

.gov-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.gov-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.gov-logo-portal {
    height: 52px;
    width: auto;
    flex-shrink: 0;
}

.gov-ministry-name {
    border-left: 1px solid rgba(255,255,255,0.35);
    padding-left: 14px;
}

.gov-ministry-name span {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    line-height: 1.5;
}

.gov-logo-sf {
    height: 36px;
    width: auto;
}

.sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid #eaecf0;
}

.main-title {
    font-size: 24px;
    font-weight: 500;
    color: #101828;
}

.proposal-btn {
    background: transparent;
    border: 1px solid #7f56d9;
    color: #7f56d9;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.evaluation-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    text-align: left;
}

.evaluation-table th {
    background: #f9fafb;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #475467;
    border-bottom: 2px solid #eaecf0;
}

.evaluation-table td {
    padding: 16px;
    font-size: 14px;
    vertical-align: top;
    border-bottom: 1px solid #eaecf0;
}

.criteria-title {
    font-weight: 600;
    color: #101828;
}

.criteria-desc {
    font-size: 13px;
    color: #667085;
    margin-top: 6px;
    line-height: 1.4;
}

.grade-input {
    width: 90px;
    padding: 10px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 14px;
}

.calc-score {
    font-weight: 600;
    color: #344054;
    display: inline-block;
    margin-top: 10px;
}

/* הגדלת שדה הטקסט של ההערות בטבלה לפסקה מרווחת */
.comment-textarea {
    width: 100%;
    min-height: 110px; /* תיבה גדולה ומרווחת מראש */
    padding: 10px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    resize: vertical;
    font-size: 13px;
    line-height: 1.5;
    transition: border-color 0.2s ease;
}

.comment-textarea:focus {
    border-color: #7f56d9;
    outline: none;
}

/* תיבות האזהרה של ה-AI מתחת לשדות */
.ai-feedback-container {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.ai-feedback-inline {
    margin-top: 8px;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    display: none;
}

.ai-red { background-color: #fef3f2; color: #b42318; border: 1px solid #fda29b; }
.ai-amber { background-color: #fffaeb; color: #b54708; border: 1px solid #fec84b; }
.ai-green { background-color: #ecfdf3; color: #027a48; border: 1px solid #6ce9a6; }

.summary-section {
    background: #f9fafb;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #eaecf0;
}

.total-score-box, .general-comments-box, .recommendation-box {
    margin-bottom: 20px;
}

.summary-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #344054;
    margin-bottom: 6px;
}

.summary-section input[type="text"], .summary-section select, .summary-section textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
}

#totalScore {
    width: 120px;
    font-weight: bold;
    background: #f2f4f7;
    text-align: center;
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.btn-save {
    background: #53389e;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.btn-submit {
    background: #4a154b;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.split-divider {
    width: 16px;
    background: #f2f4f7;
    border-left: 1px solid #eaecf0;
    border-right: 1px solid #eaecf0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: #667085;
    font-weight: bold;
    user-select: none;
}

.split-divider:hover { background: #eaecf0; }

.pdf-panel {
    width: 50%;
    height: 100%;
    background: #525659;
    position: relative;
    transition: width 0.4s ease;
}

.pdf-panel.collapsed { width: 0%; overflow: hidden; }
.pdf-frame { width: 100%; height: 100%; border: none; }

.pdf-fallback {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #667085;
    padding: 40px;
    text-align: center;
    z-index: -1;
}

.fallback-icon { font-size: 48px; margin-bottom: 16px; }

.ai-loading {
    background-color: #f0f4ff;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
}