* {
    box-sizing: border-box;
}

.contenedor-publicar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.formulario-publicar {
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px;
}

.preview-publicar {
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.publicar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.publicar h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1a3a5c;
}

.publicar a {
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #1a3a5c;
}

.publicar a:hover {
    color: #d97706;
}

.campo-titulo {
    margin-bottom: 16px;
}

.campo-titulo h2 {
    font-size: 14px;
    font-weight: 600;
    color: #1a3a5c;
    margin-bottom: 8px;
}

.campo-titulo input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
}

.campo-cuerpo {
    margin-bottom: 16px;
}

.campo-cuerpo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.campo-cuerpo-header h2 {
    font-size: 14px;
    font-weight: 600;
    color: #1a3a5c;
    margin: 0;
}

.contador-caracteres {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.cuerpo-texto {
    width: 100%;
    height: 120px;
    padding: 12px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
}

.campo-imagen {
    margin-bottom: 20px;
}

.campo-imagen h2 {
    font-size: 14px;
    font-weight: 600;
    color: #1a3a5c;
    margin-bottom: 8px;
}

.campo-imagen input {
    width: 100%;
    padding: 8px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.enviar {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background-color: #d97706;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.enviar:hover:not(:disabled) {
    background-color: #b85f00;
}

.enviar:disabled {
    background-color: #d1d5db;
    cursor: not-allowed;
    opacity: 0.6;
}

.preview-header-text {
    font-size: 14px;
    font-weight: 600;
    color: #1a3a5c;
    margin-bottom: 12px;
}

.tarjeta-preview {
    background-color: #f9fafb;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px;
    flex: 1;
}

.preview-titulo-vacio {
    font-size: 18px;
    font-weight: 600;
    color: #9ca3af;
    margin: 0 0 12px 0;
}

.preview-titulo-lleno {
    font-size: 18px;
    font-weight: 600;
    color: #1a3a5c;
    margin: 0 0 12px 0;
}

.preview-cuerpo-vacio {
    font-size: 14px;
    color: #9ca3af;
    font-style: italic;
    margin: 0 0 12px 0;
}

.preview-cuerpo-lleno {
    font-size: 14px;
    color: #374151;
    margin: 0 0 12px 0;
}

.preview-contenedor-img {
    margin-top: 12px;
}

.preview-contenedor-img img {
    width: 100%;
    border-radius: 8px;
    display: none;
}

.mensaje-exito {
    text-align: center;
    padding: 12px;
    margin: 16px 0;
    background-color: #d1fae5;
    border: 1px solid #6ee7b7;
    border-radius: 8px;
    color: #065f46;
}

.mensaje-error {
    text-align: center;
    padding: 12px;
    margin: 16px 0;
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    color: #7f1d1d;
}

.imagen-actual {
    margin-bottom: 15px;
}

.label-imagen {
    font-size: 12px;
    color: #666;
    margin: 0 0 8px 0;
}

.img-actual {
    max-width: 100%;
    border-radius: 8px;
}

.preview-imagen-visible {
    display: block;
}