.post-create-page {
    padding: 2rem 0 4rem;
    background: var(--bg-secondary, #f5f5f5);
    min-height: 100vh;
}

.page-header {
    margin-bottom: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted, #6b7280);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary, #A8BBA3);
}

.page-header h1 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
}

.page-subtitle {
    margin: 0;
    color: var(--text-muted, #6b7280);
}

/* Form Layout */
.form-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
}

.form-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: calc(var(--header-height, 160px) + 1.5rem);
}

/* Sections */
.form-section {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.sidebar-section {
    padding: 1.25rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}

.section-title i {
    color: var(--primary, #A8BBA3);
}

/* Collapsible sections */
.collapsible .section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.collapsible .section-title {
    margin: 0;
}

.toggle-icon {
    transition: transform 0.2s;
}

.section-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.section-content {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary, #374151);
}

.form-label.required::after {
    content: ' *';
    color: var(--danger, #dc2626);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary, #A8BBA3);
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-textarea.rich-editor {
    min-height: 400px;
}

.form-hint {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-muted, #9ca3af);
}

/* Checkboxes & Radios */
.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-label input,
.radio-label input {
    margin-top: 0.125rem;
    width: 18px;
    height: 18px;
    accent-color: var(--primary, #A8BBA3);
}

.checkbox-text,
.radio-text {
    display: flex;
    flex-direction: column;
}

.radio-text strong {
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}

.radio-text small {
    font-size: 0.8125rem;
    color: var(--text-muted, #9ca3af);
}

/* Tags */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-secondary, #f3f4f6);
    border-radius: 20px;
    font-size: 0.8125rem;
    color: var(--text-primary, #374151);
}

.tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: none;
    background: none;
    color: var(--text-muted, #9ca3af);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
}

.tag-remove:hover {
    background: var(--danger, #dc2626);
    color: #fff;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary, #A8BBA3);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark, #1e3a0f);
}

.btn-outline {
    background: #fff;
    color: var(--text-primary, #374151);
    border: 2px solid var(--border-color, #d1d5db);
}

.btn-outline:hover {
    border-color: var(--primary, #A8BBA3);
    color: var(--primary, #A8BBA3);
}

/* Translations */
.translation-panel {
    padding: 1rem;
    background: var(--bg-light, #f9fafb);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.translation-panel:last-child {
    margin-bottom: 0;
}

.translation-lang {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
}

/* Type-specific fields */
.type-fields {
    animation: fadeIn 0.2s ease;
}

.type-fields[style*="display: none"] {
    animation: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group-half {
    flex: 1;
    min-width: 0;
}

.form-current-file {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.625rem 1rem;
    background: var(--bg-secondary, #f3f4f6);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary, #6b7280);
}

.form-current-file i {
    color: var(--primary, #A8BBA3);
}

/* Responsive */
@media (max-width: 1024px) {
    .form-layout {
        grid-template-columns: 1fr;
    }

    .form-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .post-create-page {
        padding: 1rem 0 2rem;
    }

    .form-section {
        padding: 1rem;
        border-radius: 12px;
    }

    .form-row {
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
